December 29, 2013 at 10:09 pm
Hi,
I am creating a RDL file dynamically using a custom .net application. During the RDL creation process, I embed the connection string information like below. But when I open the RDL file via Report builder, the connection string information stored in the RDL file is not detected - so we are forced to manually configure the connection information again. But my requirement is - Report builder should automatically detect the connection information and run the report automatically.
Connection String stored in the RDL file:
<DataSources>
<DataSource Name="DB">
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>Data Source=XXXXXXX;User ID=YYYYYYYY;Password=ZZZZZZZZZ;Initial Catalog=VVVVV;</ConnectString>
</ConnectionProperties>
</DataSource>
</DataSources>
Not sure if I had missed anything here.. Please let me know how to resolve this issue.
Thank you
December 30, 2013 at 2:19 am
It's not so simple. Are you using the SQL Connection Wizard for building the connection String?
You are missing two elements: SecurityType and DatabaseID. Take a look at this:
<DataSources>
<DataSource Name="DataSource1">
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>Data Source=.;Initial Catalog=AdventureWorks</ConnectString>
</ConnectionProperties>
<rd:SecurityType>DataBase</rd:SecurityType>
<rd:DataSourceID>71b7ad7f-32cb-47b6-bb4f-1f84472d4ae4</rd:DataSourceID>
</DataSource>
</DataSources>
and look at the bold text.
December 30, 2013 at 2:21 am
The DataSourceID depends on your Reporting Services Instance.
December 30, 2013 at 2:31 am
Thanks for your reply ndiro.
I am not using BIDS/Report builder for generating the RDL file.
I am creating the RDL file programmatically (.net). So not sure how to get the Datasource ID when i generate the RDL file.Can you let me know how to do it?
December 30, 2013 at 2:40 am
Honestly i've never buil datasource programmaticaly but you can look at this:
I don't know if this is the best solution....sorry
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply