views:

83

answers:

1

Hi,

we are trying to create reports programmatically in asp.net using microsoft reporting services. We are not sure if it is possible though. We have several queries for our reports. Instead of creating a separate .rdlc report for each of those queries, we are looking for a way so that we can feed the query / stored procedure to the reporting services engine and the reporting services engine will create a report and display it on the web. Is that possible?

Thanks

+1  A: 

Not the way you are describing it.

Reporting services needs a report definition to generate the report (the .rdlc). It can't just guess. You can create the definition programmatically. After all, the .rdlc is just XML in the form of the report definition language schema.

You could loop through the result set, creating new report table columns for each column in the result set or something like that. I've never tried this, but I think it will be damn near impossible to get reliable formatting if the columns, sizes, etc are not known ahead of time. I don't know how many different queries you are talking about, but the effort to do something like this may not be worth it.

Are these queries radically different? Do they return the same basic type of data?

NYSystemsAnalyst