Showing posts with label simply. Show all posts
Showing posts with label simply. Show all posts

Friday, February 24, 2012

Dynamic Connection String

I've seen some threads here about Dynamic Data Sources.

I am using the ReportViewer Control for WebForms.

I simply want to say the following:

reportviewer fv = new Microsoft.Reporting.WebForms.ReportViewer();

rv.ServerReport.SetConnectionString(......);

I want to avoid using parameters to do this if I can. I've read that stored procedures don't work when you use parameters.

Is this possible?

Thanks

It sounds like you are using the ReportViewer control in LocalMode. In that case, your application has to directly provide the data as a dataset to the ReportViewer control. There is no connection string, because the ReportViewer control will never execute any queries in LocalMode. More information is available here: http://www.gotreportviewer.com/definedata/index.html and here: http://www.gotreportviewer.com/objectdatasources/index.html

If you use the ReportViewer control in ServerMode, it will just point to a report on a report server. That report is executed on the report server and could use an expression-based connection string, as discussed here: http://msdn2.microsoft.com/en-us/library/ms156450.aspx (scroll to the "Data Source expressions" section).

-- Robert

Friday, February 17, 2012

Dynamic building of reports in C# for ASP.NET

I saw a post earlier referencing a book on how to dynamically building reports. But does anybody know of a web site I can review to simply get an idea of how to do it to see if this is what we want to do vs simply using a data grid for reporting.

Thanks

We are currently doing this for an enterprise solution, however we have hit a couple of snags. See my other posts. As far as materials for this, there is very little. The best idea is to generate a few reports, and look at the RDL files that are generated. All you then have to do is create an engine to dynamically generate this content, which can then be executed.

Unfortuantely I am unable to share with you are current application code as it is confidential however I would be more than happy to answer a few help questions.

Matthew Christopher
.Net Developer / Consultant
Edmonton, AB, Canada
matt_chrs@.hotmail.com(nospam)

|||It's a lot of work. This article is a start.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/AdHocRepSr.asp