Question displaying report on Crystal Report

Roger

New member
Joined
Mar 18, 2016
Messages
1
Programming Experience
5-10

[TD="class: votecell"][/TD]
[TD="class: postcell"]I am developing a desktop application with C#. However, when I run the application to see the report, only report viewer form (blank form) is displayed and unable to see a crystal report data (which is CPSummary.rpt in this case ). The data table ( dtgetbydate ) works fine and fetches data from the database. Here's the piece of code that runs the report.

CashPosition.Report.CPSummary sumrep = new CashPosition.Report.CPSummary();

void getReportbyDate()
{
DataTable dtgetbydate = dac.getrepbydate((DateTime)dtpFrm.Value, (DateTime)dtpTo.Value);
sumrep.SetDataSource(dtgetbydate);
reportviewer.ReportSource = sumrep;
reportviewer.ShowDialog();
this.Close();
}

Appreciate your support in advance.

[/TD]
 
Last edited:
Back
Top Bottom