Error adding a Custom SRS Report (.rdl file)

We have been making reports on a datawarehouse for a customer.

Uploading these new reports kept generating errors like these: Look for the data sources section in the XML

 

[2009-07-01 12:51:51.7] Process: w3wp |Organization:7d795b17-dd71-dd11-a3c0-00163e0c8691 |Thread: 5 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ErrorInformation.LogError

>MSCRM Error Report:

——————————————————————————————————–

Error: Exception has been thrown by the target of an invocation.

Error Message: Exception has been thrown by the target of an invocation.

Source File: Not available

Line Number: Not available

Request URL: http://crm.website.com/organization/crmreports/reportproperty.aspx

Stack Trace Info: [NullReferenceException: Object reference not set to an instance of an object.]

at Microsoft.Crm.Reporting.SRSReport.convertDataSource()

at Microsoft.Crm.Reporting.SRSReport..ctor(String xmlContent, String originalFilter, Boolean convertReportToCrm, ExecutionContext context)

at Microsoft.Crm.ObjectModel.ReportService.CreateInternal(IBusinessEntity entity, Boolean isScheduledReport, ExecutionContext context)

at Microsoft.Crm.ObjectModel.ReportService.Create(IBusinessEntity entity, ExecutionContext context)

 

The whole point of MS CRM 4.0 generating the errors in this case was the fact that a different data source was used for the new reports.

All we had to do is:

  • Open the report in code view
  • <DataSources>

    <DataSource Name=”Organisation_MSCRM”>

    <rd:DataSourceID>e4625bd3-c843-4b26-9911-a052ae5daf2c</rd:DataSourceID>

    <DataSourceReference>Organization_MSCRM</DataSourceReference>

    </DataSource>

</DataSources>

  • The data source name has to be the data source all MS CRM 4.0 reports use, when you use a different one.. this error will occur.
  • Replace in all datasets the correct data source name with the data source of all the MS CRM 4.0 reports. This will render the report not functional, but MS CRM 4.0 will accept it.
  • When MS CRM 4.0 had accepted the fawlty report, go to the report server website and correct the data source in the report properties.

 

That’s all there’s to it.

Good luck creating all the reports you want, using whatever data source you need.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s