This is a migrated thread and some comments may be shown as answers.

Passing Parameters to DataSet

2 Answers 232 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Glenn Miller
Top achievements
Rank 1
Glenn Miller asked on 15 Aug 2008, 11:18 AM
Hi:

I have a few simple questions - i hope.

Q1. ----------------------------------------------------

I have a report that needs to retreive its data from an SQL function. The SQL Function requires 3 parameters (company,startdate,stopdate)  to be passed to it, and then it returns a table with the desired information.

I created a report (using the wizard)  that has 3 Report Parameters. They are defined as:

1. MyCompany, 2. MyStartDate, 3. MyStopDate

All are these are set as visible, so that they show up in the Report Viewer, and allow the user to select the 3 required values.

What I need to do is have the Report Parameters to be automatically passed to the SQL function.

For ex. Whatever the user enters for "MyCompany" to automatically be used as the "company" parameter when calling the SQL Function.

We can do this with MS SQL Reports, but can't seem to get your report system to make this work.


Q2. --------------------------------------

Also, another problem I'm having is that I can't seem to get the Refresh button on the Web Report Viewer to actually refresh a report. I can't find any event that gets raised when the Refresh button is clicked. Please tell me how I can use this button with server side code. I need to know when the button is clicked on the web page, so that I can somehow rebuild the report, and have the refreshed report re-displayed on the web page.


Thanks for any help you can provide.










2 Answers, 1 is accepted

Sort by
0
Hrisi
Telerik team
answered on 15 Aug 2008, 12:46 PM
Hello Glenn,

You can follow "Using data source with parameters in Telerik Reporting" article in our KB to accomplish the result you want.

Your second question related to the solution of the first question. If you implement the suggestions the Preview button should recalculate the report taking into account new values of the Report Parameters and render it.

If you have any other questions please do not hesitate to contact us further.

All the best,
Hrisi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Glenn Miller
Top achievements
Rank 1
answered on 16 Aug 2008, 11:04 AM
Thanks Hrisi. We were able to get it to work using your information.
Tags
General Discussions
Asked by
Glenn Miller
Top achievements
Rank 1
Answers by
Hrisi
Telerik team
Glenn Miller
Top achievements
Rank 1
Share this question
or