none
Rendering Reports from C# ASP.Net RRS feed

  • Question

  • Hai Experts

    I need to render a report from C# ASP.Net page and export it to excel.
    I face a probem in ReportItem

    ReportItem item = new ReportItem();

    In this line it prompts a error that i am missing assembly or reference, when i add Microsoft.ReportingServices.ReportRendering as reference i obtain the erro in 

    comboBox1.Items.Add(new ReportItem(item.Name,item.Path));      

    Cannot create an instance of the abstract class or interface 'Microsoft.ReportingServices.ReportRendering.ReportItem'

    Kindly correct me.

    Thanks in Advance

    Regards
    Vinoth
    Friday, October 31, 2008 9:22 AM

All replies

  • umm I could be wrong,, but I don't think you can add a reportitem to a combobox

    You can only add ListItems.

    comboBox1.Items.Add(new ListItem(item.name,item.path));
    Living my life at 123mph in 11.15 seconds
    Friday, October 31, 2008 12:45 PM
  • If you just want to render a report and export to excel you don't need to use the ReportRendering assembly, that is specifc to creating you own export formats and only works when Reporting Services is installed. All you need to do is create a web site with the ASP.Net ReportViewer control on a page then add a report to your project. You can render the report using the Render method on ReportViewer control and specifiying Excel in the format parameter. You can find and example here:

    http://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.localreport(VS.80).aspx


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, October 31, 2008 3:52 PM