Count "No. Printed" when the report is printed or saved but not count when it is previewed

wolfskinwolfskin Member Posts: 84
Hi everyone,

the table sales invoice header has a fields "No. Printed". I would like to count this field when the report is printed. I've checked the standard report (Report 1306). It works fine unless it cannot be previewed.

How can I count the field "No. Printed" when the report is printed or saved and the report still be previewed?


Thank you.

Best Answer

  • aripermadiaripermadi Member Posts: 9
    Answer ✓
    You should still able to preview it. Please check your report properties and ensure DefaultLayout is RDLC.

Answers

  • aripermadiaripermadi Member Posts: 9
    Hi you can use below code inside your report:

    IF NOT CurrReport.PREVIEW THEN
    "No. Printed" := "No. Printed" +1;
  • wolfskinwolfskin Member Posts: 84
    aripermadi wrote: »
    Hi you can use below code inside your report:

    IF NOT CurrReport.PREVIEW THEN
    "No. Printed" := "No. Printed" +1;

    Thank you aripermadi, I've tried but the report cannot be previewed.
  • aripermadiaripermadi Member Posts: 9
    Answer ✓
    You should still able to preview it. Please check your report properties and ensure DefaultLayout is RDLC.
  • wolfskinwolfskin Member Posts: 84
    aripermadi wrote: »
    You should still able to preview it. Please check your report properties and ensure DefaultLayout is RDLC.

    It's work. Thank you so much.
Sign In or Register to comment.