Create xtrareport with xml in asp.net

Tuesday, November 3, 2015

I am trying to create a xtrareport with xml in asp.net using c#. I created xml and reference to xtrareport. I have also selected data source schmema and data member on xtrareport design and put fields to labels. I have also debugged dataset and it is not empty. But i can't see data on my report page.



        SqlConnection conn = new SqlConnection(@"blabla");
SqlCommand select = new SqlCommand(@"select * from table",conn);

conn.Open();
SqlDataAdapter da = new SqlDataAdapter(select);
DataSet ds = new DataSet();
da.Fill(ds);

//ds.WriteXmlSchema(@"C:\dataset.xml");

XtraReport1 rpr = new XtraReport1();
rpr.DataSource = ds;

rpr.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.ClosePreview, DevExpress.XtraPrinting.CommandVisibility.None);
rpr.CreateDocument(true);`

0 comments:

Post a Comment