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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 ssrs 2012 - dataset does not populate in designer
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Flowing Fount of Yak Knowledge

1433 Posts

Posted - 03/14/2014 :  11:09:29  Show Profile  Reply with Quote
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?


Flowing Fount of Yak Knowledge

2780 Posts

Posted - 04/07/2014 :  15:13:22  Show Profile  Reply with Quote
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.

Edited by - gbritton on 04/07/2014 15:14:28
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000