Setting Datasource to XML doesn't work
I've created a Crystal Report over a blank XML file. Then when I use following lines to set the DataSource to a populate XML data file, the report still comes out blank.
Can anyone help me please?
Code:
Dim rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument
rpt = New CCRpt1002
rpt.SetDataSource(cXMLPopulatedFileName)
Re: Setting Datasource to XML doesn't work
Found the answer.
just for future reference, you need to create a dataset from the XML first.
Code:
Dim myDataset As New DataSet
myDataset.ReadXml(cXMLPopulatedFileName)
rpt.SetDataSource(myDataset)