cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports 13 for VS2013 Hangs when report deployed via Clickonce

Former Member
0 Kudos

Hi,

We have upgraded from vs2008 to vs2013 one of our .net C# projects. Project consist of a Server and a windows client. Reports are run in the client, and data transported with disconnected Datasets ( No direct connection to the database ). We use Microsoft clickonce to deploy this application to our users.

The problem we have is that after the migration clients deployed with clickonce experience a delay of about 1 minute while the report is shown with a message "please wait while the document is processing". However if we run the application directly from the filesystem the report is shown immediately.

running the clickonce deployed shows the following message using process monitor, however after ~1 minute the report displays correctly.

6:08:05.5863138 PMECMWin.exe18156CreateFileMappingD:\Users\o\AppData\Local\Temp\2\temp_6a4d2478-2cab-45d5-8e21-af5d5d3a761a {56013444-9297-4F76-A8DE-00A08C289BBF}.rptFILE LOCKED WITH WRITERSSyncType: SyncTypeCreateSection, PageProtection:

Code:

        CrystalReport1 c = new CrystalReport1();

        public Form1()

        {

            InitializeComponent();

            c.Load();

        }

        Stopwatch s = new Stopwatch();

        private void Form1_Load(object sender, EventArgs e)

        {          

            if (c.IsLoaded)

            {

                crystalReportViewer1.ReportSource = c.FileName.Replace("rassdk://", ""); ;

                Console.WriteLine("crystalReportViewer1.ReportSource = c;:" + s.Elapsed.TotalMilliseconds.ToString());

            }

        }

* Note:

1. the report from the code above is empty and has no connections to database.

2. Using Vs2013

3. Using SAP Crystal Reports, developer version for Microsoft Visual Studio - Service Pack 9 - Fixed Issues a...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Finally found the issue:

Our windows application every 20 minutes ( 1 minute in debug ) check for clickonce updates in an independent thread using CheckForDetailedUpdate method and then it sleeps.

public void ApplicationUpdateTimerThread()

{

  int updateInterval = applicationUpdateTimer.Interval = 1200000; // 20 mins

  if (ApplicationDataAccess.IsDebug) { updateInterval = 60000; }

  while (true)

  {

     UpdateCheckInfo updateInfo = appDeployment.CheckForDetailedUpdate();

     Thread.Sleep(updateInterval);

  }

}

Doing this was locking the filesystem where now Crystal is putting their temporary report files and therefore preventing file access until the thread was active again ( The reason for the 60 seconds delay )

So Creating a new thread to only check for update and let it die inmediately fixed the issue.

public void ApplicationUpdateTimerThread()

{

  int updateInterval = applicationUpdateTimer.Interval = 1200000; // 20 mins

  if (ApplicationDataAccess.IsDebug) { updateInterval = 60000; }

  while (true)

  {

  System.Threading.Thread t1 = new System.Threading.Thread (delegate()

  { UpdateCheckInfo updateInfo = appDeployment.CheckForDetailedUpdate(); });

  t1.Start();

  Thread.Sleep(updateInterval);

  }

}

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

if we run the application directly from the filesystem

Meaning if the app is run on the server? If that is the case, create a new app and get it to load your empty report. Copy the app exe to the client, run the exe there. I suspect it will also load pretty fast. So, then the question is, what is happening between the client and the server? E.g.; why a one minute delay:

6:08:05.5863138 PMECMWin.exe18156CreateFileMappingD:\Users\o\AppData\Local\Temp\2\temp_6a4d2478-2cab-45d5-8e21-af5d5d3a761a {56013444-9297-4F76-A8DE-00A08C289BBF}.rptFILE LOCKED WITH

To me this looks like some sort of a network issue (permissions, authentication, etc.(?)). See if running the exe as Admin will help.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos
if we run the application directly from the filesystem

Meaning we are running the app from the client as Admin.

If we run the app as Admin directly from the filesystem on the client computer the report loads fast.

if we run the app as Admin using clickonce on the client computer the reports hangs for ~1 minute showing "please wait while the document is processing" and then loads the report.

Unable to reproduce in a dev environment as it only happens when launched from clickonce.

What is Crystal Viewer doing between the moment we assign ReportSource and the report is displayed? what libraries it needs or what comms are being tried to be established during that time that may cause the hang?