Xtrareport Devexpress bind data from dataset -
i have problem xtrareport. trying binding data report datatable. result blank.
i have documentviewer in design
code try bind data
datatable dt = bdmvanbanden.selectall(); var report = new rptvanbanden(); report.datasource = dt; documentviewerreport.report = report; documentviewerreport.databind();
this report
and result :
so, that's why?
in rapport must define binding of xrtablecell
:
public partial class rptvanbanden: devexpress.xtrareports.ui.xtrareport { public rptvanbanden(datatable dt) { initializecomponent(); //*********you must repeat block each `xrtablecell` xrbinding binding = new xrbinding(); binding = new xrbinding("text", dt,dt.columns["ngayden"].columnname); ngayden.databindings.add(binding); //"ngayden" here isname of xrtablecell //*********************** } }
now can call repport :
datatable dt = bdmvanbanden.selectall(); rptvanbandenreport = new rptvanbanden(dt); documentviewerreport.report = report; documentviewerreport.databind();