Solved

Caching query parameters in reporting services

Posted on 2007-03-26
4
833 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

867 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

12 Experts available now in Live!

Get 1:1 Help Now