Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Support on C# (displaying report on Crystal Report)

RogerRoger EthiopiaMember Posts: 1
edited March 2016 in C#

Hi,

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

Many thanks for your support.

Tagged:
Sign In or Register to comment.