This is a migrated thread and some comments may be shown as answers.

sqldatasource stored procedure no results

1 Answer 148 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Frank Flores
Top achievements
Rank 1
Frank Flores asked on 11 Aug 2011, 12:33 AM
Hi,
when i try and run a complex stored procedure using sqldatasource:

      this.sqlDataSource1.SelectCommandType = Telerik.Reporting.SqlDataSourceCommandType.StoredProcedure  ;
      this.sqlDataSource1.SelectCommand = "myProc";
      crosstab1.DataSource = sqlDataSource1;

 it does NOT return any results.

if i use text:      this.sqlDataSource1.SelectCommandType = Telerik.Reporting.SqlDataSourceCommandType.Text   ;
      this.sqlDataSource1.SelectCommand = "EXEC myProc";
      crosstab1.DataSource = sqlDataSource1;


This used to work until i had to upgrade to:  4.2.10.1221

What do i need to do, 
i need to execute as StoredProc as i pass in parameters.etc.

I've verified if i made a simple proc, and do:

      this.sqlDataSource1.SelectCommandType = Telerik.Reporting.SqlDataSourceCommandType.StoredProcedure  ;
      this.sqlDataSource1.SelectCommand = "mySimpleProc";
      crosstab1.DataSource = sqlDataSource1;

it also works.

The complex proc has temp tables, and calclations,etc...

Also when using the crosstabwizard or reporting wizard, the columns comeback but executing the the proc "myProc" also does NOT give results in preview.



1 Answer, 1 is accepted

Sort by
0
Frank Flores
Top achievements
Rank 1
answered on 11 Aug 2011, 02:10 AM
I've narrowed it down, the stored proc had some group by and having clause that had extra parentheses or something and the Command just didn't like it for some reason. I've cleaned up the stored procedure and it seems to be working now.
Tags
General Discussions
Asked by
Frank Flores
Top achievements
Rank 1
Answers by
Frank Flores
Top achievements
Rank 1
Share this question
or