Solved

Caching query parameters in reporting services

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

770 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