Intermittent report printing hangs Navision

Toddy_BoyToddy_Boy Member Posts: 231
Dynamics 2013 - When printing a report from an item card REPORT.RUN(reportno, TRUE, FALSE, Rec), the print dialog is displayed as usual. Select the Printer and click Print we intermittently experience the Navision client hanging with the print dialog box still open and more curiously the Item card behind clears all its fields as if the record has been deleted (but it hasn't) or the card has moved to a new record. It can happen on the first print or the 5th/6th/7th totally randomly.

Has anyone else experienced this or similar?
Life is for enjoying ... if you find yourself frowning you're doing something wrong

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2017-10-26
    Do you have any pictures included on the report?

    It could be caused by the content of the report - if you data set includes pictures, and the printed records actually has some picture data it could lead to massive amount of data transferred between server and the client, consuming lots of resources both on the NST and client PC

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • kylehardinkylehardin Member Posts: 257
    There were also some cumulative update bug fixes related to reporting in 2013. That having been said, the picture suggestion is probably your culprit.
    Kyle Hardin - ArcherPoint
  • Toddy_BoyToddy_Boy Member Posts: 231
    The report is a very small label with 3 images, a barcode and some parameter information.

    On trying to recreate the scenario, I can print a report, get another user to post a consumption and output journal (a locking issue maybe), during this process I run the report - enter parameters and print - at this point it hangs, doesn't return any rows and won't allow focus on the report dialog box to click cancel.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Does the report try to modify anything?
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Toddy_BoyToddy_Boy Member Posts: 231
    No. Tried different TransactionType properties but get the same problem.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    It might be a locking issue. If you print in the middle of transaction updating Item Ledger Entry or Value Entry, and your report tries do calcfields something based on either one it might be locked out.

    I'd try to take printing out of posting, run it after the data is committed
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Toddy_BoyToddy_Boy Member Posts: 231
    The printing is not part of the posting it's a report printed from the Item Card. Just so happens I tried printing at the same time another user was posting - a hunch that would replicate the problem which it did.

    What's more confusing is that the production posting wasn't related to the Item I was looking at.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Yes it is confusing but it still might be a locking issue. If you update Item Ledger Entry or Value Entry, SQL needs to update all linked indexed views, that may cause a locks preventing other processes from using any flowfields based on one of these tables.

    Try to log to the NST box and examine Application Event log. NST server inserts an entry if a query takes longer than predefined time - not sure however if that feature is available in 2013 version, but worth checking.


    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Toddy_BoyToddy_Boy Member Posts: 231
    Sadly nothing written to the Application Event log.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    You can still catch long running queries using SQL's Extended Events. I've used that technique for our 2009 R2 databse

    Look at this Brent Ozar's blog entry to see how to set it up and how to read the data from the log file

    Once you have it up and runnig re-try your test with posting/printing in parallel and see what gets logged, and get a proof that it is indeed locking related issue.

    If you have too many locking events caought you may limit what gets logged by modify the example code and adding a WHERE clause after ADD EVENT .. (ACTION(...), like this
    CREATE EVENT SESSION ... ON SERVER 
    ADD EVENT sqlserver.blocked_process_report(
        ACTION(...)
        WHERE (
    	 [package0].[equal_int64]([database_id],(put_your_database_id_here)) --run SELECT DB_ID() in your database context to get the number
    	 AND [package0].[greater_than_uint64]([duration],(query_time_threshold_in_microseconds)))) --put 1000000 to catch queries executing longer than 1 secs
    ADD TARGET ...
    

    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Toddy_BoyToddy_Boy Member Posts: 231
    Further testing (but not complete) leads to the RefreshOnActivate property on the Item Card. This was set to Yes (standard Nav), however setting to No on the surface seems to have resolved the issue.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
Sign In or Register to comment.