Skip to Content
0
Former Member
Apr 09, 2014 at 01:28 PM

CR datasource as xml and dataset

243 Views

Hello All..

I need to generate a crystal report based on xml file and a dataset. xml file contains all the headers and have to map this with respective dataset( where actual data is).

what i've done so far: added xml file to report( add--new item -- CrystalReport1 -- using the report wizard -- create new conection(ADO.NET xml) )

file path -- my xml file path

class name --- empty

use dataset from class --- (checked it)

dataset names --- showing empty dropdown and clicked on 'Finish' button .

the report is opened up with xml fields --- dragged 2 fields on to the report. (end of report design)

now with aspx page :

CrystalReportInstance.SetDataSource(ds); // dataset contains data with same headers as xml file

CrystalReportViewer1.ReportSource =CrystalReportInstance ;

CrystalReportViewer1.DataBind();

Result received after executing above: report with only headers

Using : crystal reports(13.0.7.1136)

windows 7 ultimate

sql server 2008 r2, enterprise edition.

and i did search on this here.. really have not seen any similar threads answering. is this the correct way to do this.. please suggest me!!