Reputation: 969
I have an ssrs report that uses a Shared Dataset to extract a maximum datetime value that I want to use for multiple reports. I have created a shared dataset called MaxSnapshotDateTime.rsd that uses the query:
select max(snapshot_DT) as snapshot_DT from dbo.SystemLog (nolock) where sync= 1
My report dataset Snapshotdatetime uses the shared dataset. And my parameter @snapshotdatetime takes available and default values from the Snapshotdatetime dataset. I want to be able to use this @snapshotdatetime parameter for embedded datasets.
The @snapshotdatetime parameter is the first in the list of parameters. And the Snapshotdatetime dataset is the first in the list of datasets. When I preview the report in SSDT it displays correctly initially. But once I select View Report the snapshotdatetime parameter displays as a dropdown with "Select a Value" as the default value and my snapshot datetime available in the dropdown. If I set my available values for the parameter to be None then I get different behaviour: the parameter appears correctly but it is not available for other dataset queries. Unfortunately I don't have sufficient permissions for a trace. And I have been unable to replicate with another source. Can anyone shed some light on what is happening when View Report is being clicked?
Upvotes: 0
Views: 70
Reputation: 5243
I am taking a wild guess here, but I have faced such issue before and have done lot of head-scratching. Turns out there is a rdl.data file in the solution where the rdl file resides(and it gets created automatically). This is the cache file for the report. When you "Preview" a report, the data and design for the report is fetched from this cache file, not the actual dataset. Hence there are chances it might be stale.
If you really want to see the report's output, instead of previewing it, try running the report from solution. That would be much more reliable.
Hope it helps you.
Upvotes: 1