×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

pass a querystring to a report

pass a querystring to a report

pass a querystring to a report

(OP)
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

RE: pass a querystring to a report

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,
http://aspnetlibrary.com

Need help finding an answer? Try the Search Facility or read FAQ222-2244: How to get the best answers.

RE: pass a querystring to a report

(OP)
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="http://myserver/reportserver" />
    </rsweb:ReportViewer>
</asp:Content>


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close