?
Solved

Caching query parameters in reporting services

Posted on 2007-03-26
4
Medium Priority
?
842 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

777 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