Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10671

Re: Performance Monitor crystal report ?

$
0
0

CR has no API's built in to do this. You will have to handle turning it on and off and where and when etc.

 

Here's some samples:

 

DateTime dtStart;

TimeSpan difference;

// init report

dtStart = DateTime.Now;

ReportDocument rdReport = new ReportDocument();

difference = DateTime.Now.Subtract(dtStart);

textBox1.Text += "Report Doc initialization: " + difference.Seconds.ToString() + "\r\n";

 

 

 

//load report

dtStart = DateTime.Now;

rdReport.Load("c:/test/TpCtLudek2008.rpt");

difference = DateTime.Now.Subtract(dtStart);

textBox1.Text += "Report Document Load: " + difference.Minutes.ToString() + ":" + difference.Seconds.ToString() + "\r\n";

 

//view report

dtStart = DateTime.Now;

crystalReportViewer1.ReportSource = rdReport;

 

difference = DateTime.Now.Subtract(dtStart);

textBox1.Text += "Sent to viewer: " + difference.Minutes.ToString() + ":" + difference.Seconds.ToString() + "\r\n";

 

Don


Viewing all articles
Browse latest Browse all 10671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>