Skip to Content
0
Former Member
Apr 10, 2013 at 06:59 PM

VS 2012 with Crystal Reports 13 having report.load(strFileName) issue

51 Views

VS 2012 with Crystal Reports 13, Web reports taking over a minute to load some times and not others. Code:

using (ReportDocument repDoc1 = new ReportDocument())

{

DateTime dteStart = DateTime.Now;

dteDoneFlag = dteStart;

repDoc1.Load(strFileName);

DateTime dteEnd = DateTime.Now;

storeDelay(fcnDelayed( dteStart,dteEnd));

...

}

public static string fcnDelayed( DateTime dteStart, DateTime dteEnd)
{
TimeSpan strDiff = (dteEnd - dteStart);
string strMinutes = strDiff.Minutes.ToString();
string strSeconds = strDiff.Seconds.ToString();
string strMilSeconds = strDiff.Milliseconds.ToString();
return strMinutes + "Min" + strSeconds + "Sec" + strMilSeconds + "MS since: " + dteStart;
}

Example times:

1Min32Sec141MS since: 4/10/2013 10:27:36 AM

0Min2Sec125MS since: 4/10/2013 10:27:35 AM

0Min0Sec984MS since: 4/10/2013 10:14:37 AM

1Min38Sec516MS since: 4/10/2013 10:07:23 AM

1Min39Sec672MS since: 4/10/2013 10:07:22 AM

0Min0Sec312MS since: 4/10/2013 9:45:08 AM

0Min0Sec187MS since: 4/10/2013 9:45:07 AM

0Min0Sec296MS since: 4/10/2013 9:45:03 AM

0Min0Sec171MS since: 4/10/2013 9:43:00 AM

1Min4Sec219MS since: 4/10/2013 9:36:41 AM

1Min5Sec187MS since: 4/10/2013 9:36:40 AM

1Min36Sec875MS since: 4/10/2013 9:34:42 AM

1Min38Sec578MS since: 4/10/2013 9:34:41 AM

1Min37Sec906MS since: 4/10/2013 9:34:41 AM

1Min39Sec735MS since: 4/10/2013 9:34:39 AM

1Min36Sec31MS since: 4/10/2013 9:06:46 AM

1Min37Sec172MS since: 4/10/2013 9:06:45 AM

0Min1Sec265MS since: 4/10/2013 9:00:55 AM

0Min1Sec328MS since: 4/10/2013 9:00:54 AM

1Min25Sec781MS since: 4/10/2013 9:00:19 AM

1Min26Sec891MS since: 4/10/2013 9:00:18 AM

I tried every solution I could find, to include subreport, printer, and running a throw away report, but no consistant solution was found. Threading one report first seems to help the latter most of the time but still undependable.

Your help will be greatly appreciated.

Hugh