views:

1232

answers:

2

I need to create a report(rdl) in SQL reporting services 2008. In that I need to create in runtime. The report has chart. I will specify the type of chart, font, alignment and all those stuff in runtime.

Is there any option for using this in SSRS 2008.

A: 

An rdlc is just an xml file so you can manipulate it at runtime, it's not a trivial undertaking though. You can find the rdl spec at http://download.microsoft.com/download/6/5/7/6575f1c8-4607-48d2-941d-c69622e11c32/RDL_spec_08.pdf.

There's a downloadable example of creating an rdlc for a table and a matrix dynamically, as well as lots of other useful report viewer info at http://www.gotreportviewer.com/.

Adam
A: 

You can generate the RDL however you want, it is just an XML file. But you will only be able to run the report locally. To run on the server you would need to deploy the report first, as the server does not run the RDL files directly.

I suppose this is still possible, but it would be pretty slow, and the report would not appear in the report manager or anything before hand.

However, your probably making this problem more complicated than it needs to be. I have work on projects where we generated the RDL and deployed daily with a custom application, and it is almost always not worth it. There is usually a better way.

You can set almost all the parameters of the chart using expressions. The only thing that can't be set is the chart type, but there are ways to get around that as well. Like having all the chart types you need created on the page, but making all except the one you want visible.

Nathan Reed
You can programatically deploy an RDL to SSRS using the SOAP interface
RobS