none
Where to Begin RRS feed

  • Question

  • Hi,

    I am new to the world of SQL Reporting, although I have used Crystal reports extensively.

    I am trying to write a web page that will load an SQL report, prompt for any parameters required, automatically render the report to PDF and display the result.
    I have this working already using Crystal, but the same page needs to be able to do the same with SQL reports. For Crystal I have a collection of report files on the server (the user can upload new ones) which are presented to the user in a tree control.

    I have searched around, and have ended up going in circles!

    I need to do the following:  (Bold sections are where I am having problems)

    - The report in use is selected by the user.
    - Required parameters must then be determined.
    - Prompt for and verify parameters
    - Apply the Parameter values to the report.
    - Apply any required database login information to the report.
    - Render the Report to PDF.
    - Display the resulting PDF File

    All help greatly appreciated.

    Thankyou.

    Paul
    Wednesday, May 2, 2007 5:47 PM

All replies

  • A great place to start is www.gotreportviewer.com.  It contains several samples that use all of the ReportViewer API calls you would need for your list of requirements.  Specific things to look at in the MSDN documentation are:

     

    ReportViewer.ServerReport.GetParameters()

    ReportViewer.ServerReport.SetParameters()

    ReportViewer.ServerReport.GetDataSources()

    ReportViewer.ServerReport.SetDataSourceCredentials()

    ReportViewer.ServerReport.Render() (use "PDF" as the format)

    Tuesday, May 8, 2007 7:54 PM
    Moderator