Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass a querystring to a report

Status
Not open for further replies.

gtjr921

Programmer
Aug 30, 2006
115
I have report viewer on an asp.net 2.0 page with a
Sql report from sql 2005 embedded in the report viewer.
I thought I could just put report parameter in the query string and it would just pass the parameter to the report but that did not work.

For instance I have a report the has a parameter- ID
I thought I could just create a link to the report like
myreport.aspx?ID=1234

That did not pass the parameter to the report.
How can I do that?

Thanks
 
No, unless you tell the report what each parameter value is is can't just guess. Have you set up any parameters on the report? How are you calling the report and displaying it? An example of your code will help.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
I don't have any real code just using the asp.net report viewer with the server url to my report in the viewer
As I stated above "I have report viewer on an asp.net 2.0 page with a Sql report from sql 2005 embedded in the report viewer."
This all works, so long as i enter the parameter when the page is displayed, but I would like to populate the report parameter with the URL String parameter value
Code:
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
        Height="778px" ProcessingMode="Remote" Width="1193px">
        <ServerReport ReportPath="/reportfolder/myreport" ReportServerUrl="[URL unfurl="true"]http://myserver/reportserver"[/URL] />
    </rsweb:ReportViewer>
</asp:Content>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top