1578329 - How to connect Crystal Reports to Microsoft WCF Data Services (OData)?

SAP Knowledge Base Article - Public

1578329 - How to connect Crystal Reports to Microsoft WCF Data Services (OData)?

Symptom

  • Crystal Reports does not have a specific "database" driver (CRDB_*.DLL) for WCF Data Services
  • Is there a way to connect a report to WCF Data Service?

Resolution

  1. Create a DataSet that matches the format of the OData service
  2. Create an XML off the above Dataset:  myDataset.WriteXml(xmlPath, XmlWriteMode.WriteSchema)
  3. Create your report off of the above XML
  4. In your application use the report and pass it the dataset with any updates;

Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
crReportDocument.Load("C:\Crystal\myWFCReport.rpt")
crReportDocument.SetDataSource(dataSet) or crReportDocument.SetDataSource(dataSet.Tables(0))
 
'Bind the report to the viewer
CrystalReportViewer1.ReportSource = crReportDocument

Keywords

Open Data Protocol representational state transfer (REST) , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

Crystal Reports 2008 V1