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

wolfskinwolfskin Posts: 50Member
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 Posts: 8
    Accepted Answer
    You should still able to preview it. Please check your report properties and ensure DefaultLayout is RDLC.

Answers

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

    IF NOT CurrReport.PREVIEW THEN
    "No. Printed" := "No. Printed" +1;
  • wolfskinwolfskin Posts: 50Member
    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 Posts: 8Member
    Accepted Answer
    You should still able to preview it. Please check your report properties and ensure DefaultLayout is RDLC.
  • wolfskinwolfskin Posts: 50Member
    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.