Solved

Caching query parameters in reporting services

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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

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…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

705 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