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...

View Entire Topic
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);

  }

}