How do you use ReportViewer to display a Reporting Services report?

Discussion in 'ASP .Net' started by S_K, Jul 1, 2008.

  1. S_K

    S_K Guest

    Hi and thanks in advance for your help.

    I have a Reporting Services report that I need to display in an
    ASP.NET web page using the ReportViewer. However I can't link the
    Reporting Services report (.rdl) to the ReportViewer! I have the
    ReportViewer.LocalReport.ReportPath set to the path of the .rdl report
    but the report still dosen't display.

    Can somebody help me on this?

    Thanks

    Steve
     
    S_K, Jul 1, 2008
    #1
    1. Advertising

  2. S_K

    David Wier Guest

    I may miss some steps here, but I'll come as close as I can, from the top of
    my head.
    It's not as simple as just copying the files -
    First - you need to rename the .rdl file to .rdlc
    You'll need to create the datasets in your ASP.Net application also
    Also - if you're using parameters, you will need to create the controls in
    the page, separately, and then use an event of some sort (button, etc) to
    trigger running the report

    I just copied some code here:
    (this is for use with 2 date text parameters - you'll need to make the
    reportviewer invisible at the start, then, when executing the code:)
    Dim dsSource As ReportDataSource = New
    ReportDataSource("DataSetName_DataTableName", MethodName(txtStartDate.Text,
    txtEndDate.Text))

    rpt.Visible = True
    rpt.LocalReport.DataSources.Clear()
    rpt.LocalReport.DataSources.Add(dsSource)
    rpt.LocalReport.Refresh()

    This is fairly close - you'll need to change it up a little for your own
    needs, but as you can see, it's not just a drop and use type of situation.
    Hopefully this will give you a start

    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "S_K" <> wrote in message
    news:...
    > Hi and thanks in advance for your help.
    >
    > I have a Reporting Services report that I need to display in an
    > ASP.NET web page using the ReportViewer. However I can't link the
    > Reporting Services report (.rdl) to the ReportViewer! I have the
    > ReportViewer.LocalReport.ReportPath set to the path of the .rdl report
    > but the report still dosen't display.
    >
    > Can somebody help me on this?
    >
    > Thanks
    >
    > Steve
     
    David Wier, Jul 1, 2008
    #2
    1. Advertising

  3. S_K

    David Wier Guest

    Follow-up:
    In the previous scenario, when using the smart tag, you would choose 'NONE'
    when choosing datasources, but you can choose the .rdlc file

    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "S_K" <> wrote in message
    news:...
    > Hi and thanks in advance for your help.
    >
    > I have a Reporting Services report that I need to display in an
    > ASP.NET web page using the ReportViewer. However I can't link the
    > Reporting Services report (.rdl) to the ReportViewer! I have the
    > ReportViewer.LocalReport.ReportPath set to the path of the .rdl report
    > but the report still dosen't display.
    >
    > Can somebody help me on this?
    >
    > Thanks
    >
    > Steve
     
    David Wier, Jul 1, 2008
    #3
  4. S_K

    S_K Guest

    Re: How do you use ReportViewer to display a Reporting Servicesreport?

    On Jul 1, 3:35 pm, "David Wier" <> wrote:
    > Follow-up:
    > In the previous scenario, when using the smart tag, you would choose 'NONE'
    > when choosing datasources, but you can choose the .rdlc file
    >
    > David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
    > bloated markup
    >
    > "S_K" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > Hi and thanks in advance for your help.

    >
    > > I have a Reporting Services report that I need to display in an
    > > ASP.NET web page using the ReportViewer. However I can't link the
    > > Reporting Services report (.rdl) to the ReportViewer! I have the
    > > ReportViewer.LocalReport.ReportPath set to the path of the .rdl report
    > > but the report still dosen't display.

    >
    > > Can somebody help me on this?

    >
    > > Thanks

    >
    > > Steve- Hide quoted text -

    >
    > - Show quoted text -


    Thanks that looks like it will work!
     
    S_K, Jul 1, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Allen
    Replies:
    0
    Views:
    440
    Scott Allen
    Aug 20, 2004
  2. David Dvali
    Replies:
    0
    Views:
    731
    David Dvali
    Dec 23, 2005
  3. =?Utf-8?B?amRzdGVudG8=?=

    IE display issue after printing Reporting Services report

    =?Utf-8?B?amRzdGVudG8=?=, Jan 30, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    369
    =?Utf-8?B?amRzdGVudG8=?=
    Jan 30, 2007
  4. Sheena Abraham
    Replies:
    0
    Views:
    1,811
    Sheena Abraham
    Nov 29, 2007
  5. Matt Swift

    Reporting Services - ReportViewer CSS ?

    Matt Swift, Nov 15, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    178
    Matt Swift
    Nov 15, 2004
Loading...

Share This Page