locked
Load rdlc report in reportviewer RRS feed

  • Question

  • Hi everyone,

    Can somebody please help me out....

    I have a rdlc report that will be loaded on a button click, the report is already designed (it will be the only rdlc report for the reportviewer to show). I have a form with a reportviewer on the form and  the Report to load is already selected (will always be only this report).... The problem is I'm not sure how to go further than this, I have looked at a lot of sites but my attempts to load the report fails. The report consist of textfields and a grid (gets data from 3different tables that is linked with each other through primary key). Can anybody please help me out on this? How do I load the report? (The report should be loaded on a specific "company name" )... Please help....

    Basically rdlc name = Report.rdlc

    My 3 tables is: 1. "Company", 2. "Part", 3. "Items"

    (Parth has a foreign key of company and items have a foreign key of part)....

    Any examples or anything that I can read that will be helpful will be much appreciate! Its getting urgent as I've been struggeling for almost a week now. First time I'm using reportviewer and rdlc (any reporting for that matter)....

    Thanks in advance!!!!!


    Rising Storm Technologies

    Wednesday, March 27, 2013 10:52 AM

Answers

  • Hi,

    There are 3 ways (I know) an SSRS report can be shown in report viewer control.

    1.When the SSRS report is published in SSRS Server, then the report mode is Server Report

    this.reportViewer.ServerReport (explore all properties like setting parameteres, path etc)

    after setting parameters, path etc

    this.reportViewer.RefreshReport()

    2. When the report is local report, explore

    this.reportViewer.LocalReport (explore all properties like setting parameteres, path etc).

    after setting parameters, path etc

    this.reportViewer.RefreshReport()

    3. When rdl is created dynamically created, then

    this.reportViewer.LocalReport.LoadReportDefinition(_rdl);  (_rdl may be stream or textreader)

    this.reportViewer.RefreshReport()

    Good luck.

    Regards

    Srini  

    • Proposed as answer by Fanny Liu Tuesday, April 2, 2013 3:16 AM
    • Marked as answer by linkit Tuesday, April 2, 2013 6:17 AM
    Wednesday, March 27, 2013 12:14 PM
  • Hello,
    Not good at asp.net programming. Since you had create a .rdlc report, you can add the dataset and report to a web application and add a ReportViewer control to load the report in application.
    Please refer to the walkthrough using ReportViewer control toload report in web page:
    http://msdn.microsoft.com/en-US/library/ms252123(v=vs.100).aspx

    If you have any question about ASP.Net, I suggestion you post the question in the ASP.NET forums at http://forums.asp.net/. It is appropriate and more experts will assist you.

    Regards,
    Fanny Liu


    Fanny Liu
    TechNet Community Support


    • Edited by Fanny Liu Thursday, March 28, 2013 6:44 AM
    • Proposed as answer by Fanny Liu Tuesday, April 2, 2013 3:16 AM
    • Marked as answer by linkit Tuesday, April 2, 2013 6:18 AM
    Thursday, March 28, 2013 6:42 AM

All replies

  • Hi,

    There are 3 ways (I know) an SSRS report can be shown in report viewer control.

    1.When the SSRS report is published in SSRS Server, then the report mode is Server Report

    this.reportViewer.ServerReport (explore all properties like setting parameteres, path etc)

    after setting parameters, path etc

    this.reportViewer.RefreshReport()

    2. When the report is local report, explore

    this.reportViewer.LocalReport (explore all properties like setting parameteres, path etc).

    after setting parameters, path etc

    this.reportViewer.RefreshReport()

    3. When rdl is created dynamically created, then

    this.reportViewer.LocalReport.LoadReportDefinition(_rdl);  (_rdl may be stream or textreader)

    this.reportViewer.RefreshReport()

    Good luck.

    Regards

    Srini  

    • Proposed as answer by Fanny Liu Tuesday, April 2, 2013 3:16 AM
    • Marked as answer by linkit Tuesday, April 2, 2013 6:17 AM
    Wednesday, March 27, 2013 12:14 PM
  • Hello,
    Not good at asp.net programming. Since you had create a .rdlc report, you can add the dataset and report to a web application and add a ReportViewer control to load the report in application.
    Please refer to the walkthrough using ReportViewer control toload report in web page:
    http://msdn.microsoft.com/en-US/library/ms252123(v=vs.100).aspx

    If you have any question about ASP.Net, I suggestion you post the question in the ASP.NET forums at http://forums.asp.net/. It is appropriate and more experts will assist you.

    Regards,
    Fanny Liu


    Fanny Liu
    TechNet Community Support


    • Edited by Fanny Liu Thursday, March 28, 2013 6:44 AM
    • Proposed as answer by Fanny Liu Tuesday, April 2, 2013 3:16 AM
    • Marked as answer by linkit Tuesday, April 2, 2013 6:18 AM
    Thursday, March 28, 2013 6:42 AM