Solved

Report from QueryString

Posted on 2014-10-24
2
107 Views
Last Modified: 2014-10-24
I'm fairly new to asp.net developing and probably trying to do something simple. I am using a Devexpress report and I want to use the querystring in the url to retrieve my report from the hyperlink in my default page. ~\Invoices\Print.aspx?OrderID=1234

When I run the report in the development side it runs fine through the parameter's scheme but I'm just having trouble grabbing the OrderID and implementing it in the report.

Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        ReportViewer1.Report = CreateReport()
    End Sub

    Private Function CreateReport() As XtraReport
        Dim report As New PrintInvoices()
        report.orderID.Value = GetSelectedValue(1)
        report.CreateDocument()
        Return report
    End Function

Open in new window


So i'm trying to get the value for the GetSelectedValue() function. Not sure if i'm going about this the right way.
0
Comment
Question by:Southern_Gentleman
2 Comments
 
LVL 11

Accepted Solution

by:
LordWabbit earned 500 total points
Comment Utility
I'm assuming GetSelectedValue looks something like this

    Public Function GetSelectedValue() As Integer
        Return Convert.ToInt32(Request.QueryString("OrderID"))
    End Function

Open in new window

0
 

Author Closing Comment

by:Southern_Gentleman
Comment Utility
Easy enough. Thank you
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now