Please visit support.cavallo.com

Start a conversation

Restricting Document Printing

Overview

Some situations require that a sales document not be printable until further action has been taken. There are three ways to restrict document printing in SalesPad and Dynamics GP:

  • Configuring workflow to disable printing
  • Restricting printing via the Security Editor
  • Creating a conditional watermark (when a document does not move through the workflow) Using a script, you can also hide specific details on a report, or the entire report, if conditions are met.
Disable Printing in Workflow

To disable printing using workflow, complete the following steps in GP and SalesPad:

IN GP:

Disable printing from the Sales Process Holds Setup card in GP:

  1. Go to Microsoft Dynamics GP menu > Tools > Setup > Sales > Process Holds
  2. Click the Lookup button ( ) to search for and select your Process Hold ID
  3. Check the Printing Documents box under Apply Hold to.
  4. Click Save
IN SALESPAD:
  1. Go to Modules > Settings
  2. Filter to Use GP
  3. Set Use GP Process Hold Print Setting to True.

As the last step in the move from one queue to another, this rule is evaluated and applied.

Restrict Printing via Batch/Queue

To stop a user from printing when a document is in a specific queue or batch in SalesPad.

Security
  1. Select the Security group to place the restriction on
  2. Find the Sales Document Entry security setting
  3. In the sub-setting Print Queue Access List, select the queues/batches the security group should be allowed access to. “*” allows access to all batches

Upon saving, the group will only be allowed to print from the selected batches.

Creating a Watermark

To create the watermark, find the OnBeforePrint event within the Report Designer (Modules > Report Manager > (select report) > Design):

  1. Click on the band at the top of the report (GroupHeader1 in most cases)
  2. Expand the Property Grid section
  3. Find the Scripts node and click the + to expand
  4. Select OnBeforePrint
  5. Click the ellipsis (). The Script Editor appears
  6. Paste the following script into the Script Editor (Change the report and batch name to match your environment):

using System.Data;
private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
string batch = ""; DataTable sd =
((DataSet)this.rptOrder1.DataSource).Tables["SalesDocument"];
batch = sd.Rows[0]["Sales_Batch"].ToString(); if (batch == "NEW ORDER")
rptOrder1.Watermark.Text = "NOT APPROVED";
else
rptOrder1.Watermark.Text = "";

The watermark will appear on the selected report.

Hiding Details using a Script

To hide a specific band or detail of a report based on a condition, use the following script in the Report Designer. The script can be applied to each band of the report to stop the entire report from being shown if conditions are met.

using System.Data;
private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
string batch = "";
DataTable sd = ((DataSet)this.rptOrder1.DataSource).Tables["SalesDocument"]; batch = sd.Rows[0]["Sales_Batch"].ToString();
if (batch == "NEW ORDERS")
{
e.Cancel = true;
}
}

Refer to the SalesPad Reports document for more information on configuring reports.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. SalesPad Support

  2. Posted
  3. Updated

Comments