SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
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
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

arkiboys
Flowing Fount of Yak Knowledge

1416 Posts

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

769 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  
 New 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.03 seconds. Powered By: Snitz Forums 2000