Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Why isn't SP returning correct range of fields to Dataset


Why isn't SP returning correct range of fields to Dataset

Author
Message
swhedges47
swhedges47
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 59
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 ...

Crazy

[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"?
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16544 Visits: 13210
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 SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
swhedges47
swhedges47
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 59
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) ...
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16544 Visits: 13210
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 SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search