Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 23, 2013 11:11 AM by DamienCourouble
Member
40 Points
8 Posts
Jul 06, 2006 02:54 PM|LINK
using (TextReader strReader = new StreamReader(@"c:\tmp\Reports\Report1.rdl")) { rpvReport.ServerReport.ReportServerUrl = new Uri(@"http://myserver/reportserver"); rpvReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; rpvReport.ServerReport.ReportServerCredentials = new ReportServerCredentials("myUserName", "myPassw", "ServerNameAsDomain"); rpvReport.ServerReport.LoadReportDefinition(strReader); }
<DataSources> <DataSource Name="RSData"> <rd:DataSourceID>bcbc2b09-6cc6-4496-8108-7a1a3f40e1da</rd:DataSourceID> <ConnectionProperties> <DataProvider>SQL</DataProvider> <ConnectString>Data Source=myServer;Initial Catalog=myDatabase</ConnectString> <IntegratedSecurity>true</IntegratedSecurity> </ConnectionProperties> </DataSource> </DataSources>
<DataSource Name="RS2006"> <rd:DataSourceID>c07c113a-349a-480b-849b-f55e37225694</rd:DataSourceID> <DataSourceReference>RSDataTwo</DataSourceReference> </DataSource>
2 Points
1 Post
Feb 23, 2013 11:11 AM|LINK
Hey joschua,
I know this post is very old now, but did you find a solution ?
Thanks
joschua
Member
40 Points
8 Posts
LoadReportDefinition dynamicly
Jul 06, 2006 02:54 PM|LINK
I created a Webform with an Reportviewer control and use the following code :
using (TextReader strReader = new StreamReader(@"c:\tmp\Reports\Report1.rdl")) { rpvReport.ServerReport.ReportServerUrl = new Uri(@"http://myserver/reportserver"); rpvReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; rpvReport.ServerReport.ReportServerCredentials = new ReportServerCredentials("myUserName", "myPassw", "ServerNameAsDomain"); rpvReport.ServerReport.LoadReportDefinition(strReader); }Everything is gone ok when in the report1.rdl the datasource is defined with the connection settings like the following :When I define a shared data source in the reportserver and define instead the datasource a DataSourceReference like the following :
I've got the following error message :
The report server cannot process the report. The data source connection information has been deleted. (rsInvalidDataSourceReference)
Could anybody help me ?
thanks a lot
joschua
DamienCourou...
Member
2 Points
1 Post
Re: LoadReportDefinition dynamicly
Feb 23, 2013 11:11 AM|LINK
Hey joschua,
I know this post is very old now, but did you find a solution ?
Thanks