Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS 2008R2 Data set Properties Error Expand / Collapse
Author
Message
Posted Sunday, February 3, 2013 1:23 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 21, 2013 9:49 AM
Points: 16, Visits: 112
I have a stored procedure which i have to design the report for this i have connected to the datasource and in dataset properties i have selected the sp and tried to refresh the fields i have given the parameters also but after sometimes error message is giving that

(could not create a list of fields for the query.Verify that you can connect to the data source and that your query syntax is correct)[size="7"][/size]

But the stored procedure is running and data is also comming correctly when i execute in sql
Post #1414990
Posted Monday, February 4, 2013 1:32 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:38 AM
Points: 5,143, Visits: 4,942
does the account running the datasource have access to run the proc?



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1415158
Posted Monday, February 4, 2013 4:46 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 21, 2013 9:49 AM
Points: 16, Visits: 112
Yes the datasource have access to run the proc i have designed so many reports using the same datasource and same database.

Another thing is when we select new report option and select this sp and execute data is comming but after clicking ok it is coming out of the screen.

If we select existing item option and select this sp that error message is comming
Post #1415229
Posted Monday, February 4, 2013 10:45 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 7, 2014 2:30 PM
Points: 579, Visits: 2,086
I know That's usually a different error message by do you have any duplicate column names? Maybe there are some column names that BIDS doesn't like?
Post #1415405
Posted Tuesday, February 5, 2013 3:27 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 3:42 PM
Points: 452, Visits: 848
One issue with stored procedures in reporting services is that if the stored procedure is quite complex, e.g. has multiple select statements, that SSRS has trouble parsing them correctly to determine the columns.

The usual workaround for that is to put a 'dummy' query in the very beginning of the stored procedure that has the same columns & datatypes as are returned by the procedure. SSRS will start to parse the stored procedure, get to that first select query and then use it as the columns for the report.

This BOL article has the key info:

See the heading "Understanding Report Datasets and Queries"
"If multiple result sets are retrieved through a single query, only the first result set is processed, and all other result sets are ignored".

It is also possible to explicitly set the columns required for the query (edit dataset properties and then "fields") and set the stored procedure as the dataset query without executing the query or letting it refresh fields.I don't recommend doing that though, the other way is easier. You just have to make sure that if you change your SP that you also change the dummy query to keep the fields the same as those that are actually returned.
Post #1416132
Posted Thursday, April 18, 2013 10:50 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 11:45 AM
Points: 317, Visits: 823
One issue with stored procedures in reporting services is that if the stored procedure is quite complex, e.g. has multiple select statements, that SSRS has trouble parsing them correctly to determine the columns.


Very true. You may have a SP with branched logic.. IE...
If @var <5
-- do something
select col1, col2, col3
else if @var>=5 <10
--do something else
select col1, col2, col3, col4
else
--do this instead
select col1, col2, col3, col4, col5

This creates confusion when SSRS is trying to create the dataset columns.
Post #1444007
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse