none
Programatically Generate RDLC Report RRS feed

  • Question

  • Hi,
    I would like to create one RDLC report and map it to ReportViewer control on a web page. Here my report does not have static columns, always it populates dynalically as a DataTable from a class library.

    Can you please guide me to create RDLC files programatically from scratch.

    thank you,
    -nm reddy
    thank you -nm reddy
    Sunday, May 10, 2009 11:38 AM

All replies

  • If the layout elements of your report are not dynamic than you don't necessarily have to generate the RDL programmatically; however if you are using tables and the columns sets (or some other layout element) are differant  and you can't achieve what you need through expressions than you may need to. If you need to generate the RDL programmatically then you need to use the various XML classes provided by the Framework to generate the report, you can refer to the RDL specification to get a better understanding of the RDL elements:

    http://msdn.microsoft.com/en-us/library/dd297486.aspx

    For local mode reports you need to refer the RDL 2005 specification, RDL 2008 will be supported in the next release of the control. One suggestion that could make manipulating RDL easier is to create the report in the designer first, save the RDL and then just manipulate the elements that you need to change instead of generating the whole report dynamically. Hope this helps



    Matt M.

    Monday, May 11, 2009 4:17 PM