I don't believe you can do that when the ReportViewer is in "Remote" mode
but in "Local" mode you are the one that supplies the DataSource to report
so you can execute whatever queries you want and then pass the DataSource
into the report by doing ReportViewer.LocalReport.DataSources.Add.
You can find a lot of good examples and information for ReportViewer here:
http://www.gotreportviewer.com/ -------------------------------------
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
[quoted text, click to view] > From: "Chrisser" <cbj@egdatainform.dk>
> Newsgroups: microsoft.public.sqlserver.reportingsvcs
> Subject: 2005 Reporting service - change commandtext runtime from .net
> Date: Thu, 4 Oct 2007 13:44:22 +0200
>
> Hi
>
> I am new to SSRS and have some trouble.
>
> I have a report which is deployed and I can show this report
> in a project ( asp.net Framework vs. 2 ) using
> Microsoft.Reporting.WebForms.ReportViewer.
> Thats fine, but now I have to make up some code for changing the
> Query used in my datasets:
> I need to get my sql, and modify it ( put on some "Where... ", "exists()",
> and so on ) - then put the sql back in the report and then execute/show
the
> report.
>
> I am familiar with parameters, but parameters can't cover my needs.
>
> I've googled and found a lot of stuff, but I can't find any examples -
maybe
> it is because I don't know which words to use, or how to filter the
> information
>
> Hope somebody can help
>
> Thanks
> Christina
>
>
>