Problem with SetReportDataSource

Feb 8, 2013 at 9:40 AM
Hi

I can't get SetReportDataSource to work. Below is part of my deploy project. Task CreateDataSources works ok, datasource is created, but task SetReportDataSource ends with error: Reporting error SetReportDataSource: The value of parameter 'DataSources' is not valid
    <ItemGroup>
        <SQLReportDataSource Include="MyDatasource">
            <ConnectionString>$(DataSourceConnectionString)</ConnectionString>
            <DataSourceName>MyDatasource</DataSourceName>           
            <Provider>SQL</Provider>
            <Folder>$(DataSourcesFolderNameAndPath)</Folder>
            <OverWrite>True</OverWrite>
            <WindowsUser>user</WindowsUser>
            <WindowsUserPassword>pass</WindowsUserPassword>
        </SQLReportDataSource>
    </ItemGroup>

    <Target Name="CreateDataSources">
        <CreateReportingDataSource  ReportServerURL="$(ReportServerURL)" DataSources="@(SQLReportDataSource)"/>
    </Target>

    <Target Name="SetReportsDataSources">
        <SetReportDataSource    ReportServerURL="$(ReportServerURL)" 
                                Recursive="true" 
                                ReportItem="$(ReportsFolderNameAndPath)" 
                                DataSources="@(SQLReportDataSource)" 
                                UseMatchCase="False"/>
    </Target>
Feb 8, 2013 at 10:09 AM
Ok. I resolved my issue. Problem was with <DataSourceName>MyDatasource</DataSourceName>. This should by <ReportDataSourceName>MyDatasource</ReportDataSourceName>