Solved

Caching query parameters in reporting services

Posted on 2007-03-26
4
830 Views
Last Modified: 2013-11-26
Hi Experts,

im working with reporting services in vb.net 2003, each time i load reload a report the query parameters is set to default.

How can i cache query parameters, so that the default parameters wont be loaded every time i reload a report.
0
Comment
Question by:Torsleff-Experten
  • 2
4 Comments
 
LVL 18

Expert Comment

by:chrismc
ID: 18792933
There isn't a built in facility as such.
But you could achieve it using SQL.
I would suggest you have a separate dataset that writes the parameters into a table;

Insert Into myRSParameters (Report, Parameter, Value)
  Values('myReportName', 'Param1', @Param1)

Now you'd have to get more involved because the record may already exist so you need to test for that and do either an Insert or Update depending on the result.
You could, and may want to save it against individual users too.

Then to load the defaults have a dataset that reads those values back in and then in the parameters properties, set it to use that dataset to get it's default value.

If you don't have much knowledge of SQL, you will struggle with this, but its not as complex as it sounds.

Cheers
Chris


You would have to have SQL inside the report that would write the value away
0
 
LVL 2

Author Comment

by:Torsleff-Experten
ID: 18798154
Thanks chrismc,  

But I think I would like a little exsmple, - cant I emulate caching for each query parameter, (3 of my parameter I get by sql querys) the first like this:

SELECT      '%' as stadie union
    SELECT cast(oc_description as varchar) as stadie
    FROM  msp_outline_codes
      WHERE  proj_id =(SELECT     proj_id
               FROM      msp_projects
               WHERE  proj_type = 2) AND oc_field_id = '188744593'

Giving me following fixed values to the paremeter stadie (stage):

1  %
2  Closed
3  Preanalyse
4  Open (default)
5  Closed
6  On hold

when i make a query with the value of this parameter set to Preanalyse i would like the browser (dataset) to remember last chosen value. When i close the browser and start a new we are back to default settings.

How can i "cache" my choise so that when I reload the page Preanalyse is (default).

0
 
LVL 18

Accepted Solution

by:
chrismc earned 50 total points
ID: 18798260
As far as I'm aware you can't cache parameters in this way.
You could try playing with the report caching by going to the properties of the report in the report manager and then go to execution. This merely records an image of the last report run for a set period of time.

Cheers
Chris
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now