Xtrareport Devexpress bind data from dataset -


i have problem xtrareport. trying binding data report datatable. result blank.

  1. i have documentviewer in design

  2. code try bind data

datatable dt = bdmvanbanden.selectall();             var report = new rptvanbanden();             report.datasource = dt;             documentviewerreport.report = report;             documentviewerreport.databind(); 

this report

enter image description here

and result :

enter image description here

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(); 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)