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

Why isn't SP returning correct range of fields to Dataset Expand / Collapse
Author
Message
Posted Wednesday, March 20, 2013 11:20 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 8, 2014 1:36 PM
Points: 8, Visits: 57
I've got a data source that I will need to use as the basis for some 12 to 15 reports and because the table is quite large (several million rows and over 50 columns), I created a SP that given a passed parameter, will return filtered datasets of varying numbers of rows and columns specific to the requirements of each report.

So I thought that for each separate report, I could create a Report Parameter, set it equal to the default value of the result set I wanted to return and then pass that value to a single Shared Dataset.

The problem is that when I create a Shared Dataset in SSRS (R2) and attempt to execute the SP with the passed parameter, I can't seem to get the SP to return the different datasets (it returns the same dataset regardless of what I've set the parameter to), even if I replace the parameter with the actual value of the result set I want returned.

I've set the parameter value every place I can think of (Report Data Parameter, Report Data Dataset, Solution Shared Dataset) but nothing seems to change the dataset that's returned when I refresh the Shared Dataset.

I've also tried using an embedded dataset rather than the Shared Dataset but the same issue persists, I can't get the correct set of fields to return when I refresh the data, even though the SP works without issue when executed in a query window ...



[edit] In a more general sense, I guess I'm asking, "what exactly happens when I hit 'Refresh Fields' in Dataset Properties when I'm using a dynamic SP"?
Post #1433359
Posted Wednesday, March 20, 2013 3:45 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:40 AM
Points: 13,614, Visits: 10,496
Maybe BIDS is using cached data when you run the report.
Make sure all the .data files are deleted before you run the report again.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1433515
Posted Wednesday, March 20, 2013 4:38 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 8, 2014 1:36 PM
Points: 8, Visits: 57
Unfortunately, that's one of the first things I tried.

Here's the thing though (and this is the reason I added the [edit]), refreshing the fields for a Report dataset (that doesn't have a .data file already created) doesn't create a .data file. So what *does* happen when I refresh the fields? It obviously compiles and evaluates the SP in some fashion, since it does return the list of fields from one of the queries in the SP (specifically #3) ...
Post #1433542
Posted Thursday, March 21, 2013 2:13 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:40 AM
Points: 13,614, Visits: 10,496
swhedges47 (3/20/2013)
Unfortunately, that's one of the first things I tried.

Here's the thing though (and this is the reason I added the [edit]), refreshing the fields for a Report dataset (that doesn't have a .data file already created) doesn't create a .data file. So what *does* happen when I refresh the fields? It obviously compiles and evaluates the SP in some fashion, since it does return the list of fields from one of the queries in the SP (specifically #3) ...


I once had a strange report with shared datasets that only "refreshed" everything when I deployed it to the server.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1433624
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse