0
votes

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.

3
Have you thought about running it as a RDLC (local report)? - RobS

3 Answers

0
votes

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/.

0
votes

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.

0
votes

Yes...

to do so, you will need to either have an existing rdl file to modify, or you need to completely generate it from code.

All the SSRS xml is stored in the database in a table called catalog. You'll have to use the GUID of that report to access it, or insert a new row creating a new report.

once you're done swapping out your report server xml, the report server will have a "new" report that you can then call via your web page, or via SSRS url parameters.

past that clean up the catalog table if you see the need to.

I'll be honest with you though, this is very far from best practice, best practice that I'm aware of would be to embed the data you need to display in your web page in the form of a widget.