Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 ssrs 2012 - dataset does not populate in designer

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2014-03-14 : 11:09:29
Hi,
Stored proc. (sp) returns fields in the query designer of SSRS 2012.
but the dataset does not populate fields in the designer.
in case it makes any difference, note that the sp uses functions in several places.
Any suggestions please?

Thanks

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-04-07 : 15:13:22
1. Manually define the fields in the dataset
2. set up a fake call in the proc to "fool" ssrs. e.g.


select cast('' as varchar(50)) as FirstFieldName,
cast(1 as int) as SecondFieldName,
cast(3.14 as float) as ThirdFieldName,
cast(0 as bit) as FourthFieldName,
... etc. ...
where 1=0


SSRS should do a SchemaOnly call to the proc to discover what is returned. The schema is defined by the first select. In this example, it's a fake since the condition ensures nothing is in fact returned. If that doesn't work, add a default parameter (@schemaonly as bit = 1) to the parameter list and change the where clause to "where 1 = @schemaonly")

The point is to fool ssrs so it sees what it wants.
Go to Top of Page
   

- Advertisement -