Can i hide/disable the Print button

bluerockbluerock Member Posts: 32
I want to hide/disable the Print button in the request form....
Anyone knows how to do that?
Thank You.

Answers

  • ara3nara3n Member Posts: 9,256
    Is this a processing report? or you still want the user to preview?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    You can't hide the Print button, if it is a printing report.

    If it is a report that is used for a batch (like for modification of datas) u can set the property "processonly".
    So there is only a OK and Cancel button.

    If it is a print report and you whish only to use the "Preview" function, u can use WSH to send a "ALT+V" (Engl. caption). like
    YourReportAsVariable.RUN;
    CREATE(WshShell);
    WshShell.SendKeys('%{v}');
    CLEAR(WshShell);
    

    If you ever will not allow to print this report u can also use:
    Report - OnPreReport()
    if not CurrReport.PREVIEW then
      error('SORRY not allowed');
    

    So, the user can only use the preview and can't also print from the preview mode (ok, he can make a screen copy and print this :-) )

    Regards
    Do you make it right, it works too!
  • mabl4367mabl4367 Member Posts: 143
    This works great!

    I ofcourse had to change the "v" for an "h" since we use a swedish version.

    Do you know a way to get the character to use depending on the language setting?
  • AndwianAndwian Member Posts: 627
    garak wrote:
    YourReportAsVariable.RUN;
    CREATE(WshShell);
    WshShell.SendKeys('%{v}');
    CLEAR(WshShell);
    

    What is this code intended for?
    Regards,
    Andwian
Sign In or Register to comment.