Saturday, February 25, 2012

Add filters dynamically

Hi,

I am using a ReportViewer control on the windows form to connect to Report Server, process the report remotely (ServerReport) and render the report in PDF format.

The user wants to add some fiter(criteria) each time before the report is rendered. The filter (criteria) is generated separately. The original content of RDL should not be changed. I know, Report Builder is an option available. But, the end-user doesnt want to use Report builder to design the report.

I need to know, is there anyway I can retrieve the dataset->commandtext of the report(published on REport Server), edit and set it back dynamically, before rendering to PDF or any API, which can allow to add filters programmatically.

Thanks in advance.

You can pass it as report parameter. But is must be done carefully to prevent SQL injections)

No comments:

Post a Comment