Connection Information stored in RDL file not detected by SSRS

  • 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

  • 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.

  • The DataSourceID depends on your Reporting Services Instance.

  • 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?

  • Honestly i've never buil datasource programmaticaly but you can look at this:

    http://stackoverflow.com/questions/2360992/binding-a-datasource-to-a-rdl-in-report-server-programmatically-ssrs

    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