Home All Groups Group Topic Archive Search About

Generate reports programmatically with reporting services & SQL server 2005

Author
17 Jan 2006 7:33 AM
Martin Widmer
Hi guys

I am looking for the best way to generate new reports with reporting
services for SQL server 2005. The reports will be generated programmatically
from a .Net VB application. So far I see the only way to do it is to feature
my objects (text blocks, pictures, tables drawn from excel and databases
etc.) with a "render to RDL"- function and thus create an RDL definition of
the report, then push that one to the server using the reporting web
service.

I found though on the MSDN site the
"Microsoft.ReportingServices.ReportRendering" name space, which seems to be
there for extending the reporting services features. Instead of writing code
to produce RDL, isn't there a way to use that object model to create a new
report using something like this?:

Dim repIt as new Microsoft.ReportingServices.Report
Dim imgIt as new Microsoft.ReportingServices.Image

'Adjust properties of image here, and load it

repIt.Add(imgIt)

'More of the same

'Deploy and use the report

Am I thinking totally wrong, or how could I do more elegant than producing
RDL with my application? I prefer to use the proper object model than
producing RDL.

I am happy for any hints in this matter.

Martin

Author
17 Jan 2006 12:24 PM
Ken Tucker [MVP]
Hi,

        Didnt sql server 2005 add a Report server project and report server
wizard to the business intelligence projects in vs 2005?

Ken
------------------------
Show quoteHide quote
"Martin Widmer" <martin.wid***@businessnet.de> wrote in message
news:dqi7nr$qoa$1@nntp.init7.net...
> Hi guys
>
> I am looking for the best way to generate new reports with reporting
> services for SQL server 2005. The reports will be generated
> programmatically
> from a .Net VB application. So far I see the only way to do it is to
> feature
> my objects (text blocks, pictures, tables drawn from excel and databases
> etc.) with a "render to RDL"- function and thus create an RDL definition
> of
> the report, then push that one to the server using the reporting web
> service.
>
> I found though on the MSDN site the
> "Microsoft.ReportingServices.ReportRendering" name space, which seems to
> be
> there for extending the reporting services features. Instead of writing
> code
> to produce RDL, isn't there a way to use that object model to create a new
> report using something like this?:
>
> Dim repIt as new Microsoft.ReportingServices.Report
> Dim imgIt as new Microsoft.ReportingServices.Image
>
> 'Adjust properties of image here, and load it
>
> repIt.Add(imgIt)
>
> 'More of the same
>
> 'Deploy and use the report
>
> Am I thinking totally wrong, or how could I do more elegant than producing
> RDL with my application? I prefer to use the proper object model than
> producing RDL.
>
> I am happy for any hints in this matter.
>
> Martin
>
>
>
Author
17 Jan 2006 2:06 PM
Martin Widmer
Hi Ken

"Ken Tucker [MVP]" <vb***@bellsouth.net> schrieb im Newsbeitrag
news:ui68GE2GGHA.2012@TK2MSFTNGP14.phx.gbl...
> Hi,
>
>        Didnt sql server 2005 add a Report server project and report server
> wizard to the business intelligence projects in vs 2005?

Yes exactly. But I don't want to create reports using a wizard. I need to
create the report programmatically. And I wonder if there is a way using the
report object model for that. I could do it by simply creating a RDL file by
code, but using objects is more elegant :)

Martin