Page 1 of 1

Cash Book printed event

PostPosted: Tue Dec 15, 2015 8:49 am
by DannyC
Hi,

I am trying to locate the Printing or Printed event on a Cash Book receipt form, but it doesn't seem to be there.
I Just need to see who the Jiwa user is who is printing a particular form & cancel if not the correct user.

I must be missing something.

Cheers

Danny

Re: Cash Book printed event  Topic is solved

PostPosted: Tue Dec 15, 2015 9:18 am
by Scott.Pearce
Could you instead use permissions to restrict access to the Print button on the ribbon?

1. Create a new user group called "Not allowed to print Cash Book Receipts".
2. Add users who you want to stop from printing Cash Book Receipts. Save.
3. Open Cash Book Receipts form, choose Utilities->Set Permissions.
4. Choose the "Not allowed to print Cash Book Receipts" group on the "Set Permissions" form.
5. Back on the Cash Book Receipts form, click on the Main tab, then click on the "Print" button to select it.
6. Back on the "Set Permissions" form, check that the "Currently Selected Item" is "ID_RecordPrint", click the "Disallow" button for Read, and click the "Disallow" button for Write. Save.
7. Now when a member of the "Not allowed to print Cash Book Receipts" user group loads the Cash Book Receipts form, they will *not* see a print button.

Re: Cash Book printed event

PostPosted: Sat Feb 27, 2016 5:52 pm
by Mike.Sheen
Bumping as was never marked as solved.

Re: Cash Book printed event

PostPosted: Tue Mar 08, 2016 7:19 pm
by Mike.Sheen
The events relating to printing is a bit lacking, so I've added bug 12575 to make this a bit easier.

In the meantime, Scott's suggestion works for removing the print ability.

If you only want to limit printing to some of the reports configured, you will need to remove the report from the ReportDefinitionCollection of the cash book receipts form when the form is loaded - that way the user only gets to print certain reports.

Re: Cash Book printed event

PostPosted: Wed Mar 09, 2016 2:05 am
by DannyC
Thanks Mike, and Scott.
I've marked Scott's answer as answered. Once the new events have been added, I may revisit this for a more elegant solution but for now am running with Scott's suggestion.

Re: Cash Book printed event

PostPosted: Wed Mar 09, 2016 11:15 am
by Mike.Sheen
Ok, FYI 07.155.00 now has the events you need included.

Attached is an example plugin using these events in the Cash book receipts form - it throws a permission denied exception when the user "Admin" tries to print the "Cash Book Deposit Slip" report from the cash book receipts form.

Plugin Cash Book Receipt - Cancel print of report.xml
Sample Plugin
(29.55 KiB) Downloaded 725 times