Data Bind did not work
Posted: Mon Jun 07, 2010 8:04 am
Hi, I'm tried to bind the data with DataTable in C#. Below is my code,
private void ReportBinding(object obj)
{
StiReport report = new StiReport();
report.Load(HttpContext.Current.Server.MapPath(string.Empty) + "\\Report02.mrt");
report.RegData("Customer", (DataTable)obj);
StiWebViewer1.Report = report;
}
I've checked the record in obj, its show me 1 record but the report showing record count is same as CommandText as report designer.
Its did not take effective after I'm RegData.
I've tried with added 2 lines of code after report.RegData but it still the same
report.Dictionary.Synchronize();
report.Compile();
Could you please help me on this?
Thanks.
private void ReportBinding(object obj)
{
StiReport report = new StiReport();
report.Load(HttpContext.Current.Server.MapPath(string.Empty) + "\\Report02.mrt");
report.RegData("Customer", (DataTable)obj);
StiWebViewer1.Report = report;
}
I've checked the record in obj, its show me 1 record but the report showing record count is same as CommandText as report designer.
Its did not take effective after I'm RegData.
I've tried with added 2 lines of code after report.RegData but it still the same
report.Dictionary.Synchronize();
report.Compile();
Could you please help me on this?
Thanks.