Registry Report Graphics, Autosave, Initial Values, Other Options (sys-report-functionid)


This registry entry is used for the following purposes:

To require that a report with a “Did this Report Print” confirmation is printed before it can be e-mailed.

To Autosave a copy of the specified report to disk. This feature is particularly useful for archiving invoices, payroll reports and so on. All features are currently available for user-defined reports and the system Purchase Order. All features except ^sectionkey^ and ^sectiondirectory^ are available for all system reports. A list of Reports that Support Section Key Logic may be viewed by following this link.

Password Protect Non-Section Key Reports Autosaved as PDF's

Set Document Records FM, CRM, Sub, or Tech Viewable Fields When Report is Auto-Attached

To Auto-email supported reports .

To specify custom Report_Graphics.

To specify the positioning of the AP and Payroll check sections on the check form (this option is discussed in the help topic Registry Entry for Independent Check Section Positioning .

To limit this registry entry to your live database only as described in Comparison_Against_Database.

To specify the delimiter and text qualifier characters used when this report is exported to CSV format, and to suppress report headers from the files.

Specify a Last Page (Backer) Bitmap for Selected Reports.

Registry option to set Maximum Lines per Page by report

Print report criteria on first or last page.

Display report as PDF (or disable global setting for a specific report)

Specify Initial Default Settings for a Report

Text Box Width

Related Registry Entries:

See Registry Entry Global Settings for details on setting up a temporary local directory to be used it a network drive is not available for file saving.

Testing Your Registry Entries
The system does not verify the validity of registry entries. Test your registry entries after completing them to verify that they are functioning correctly. This is particularly important for the Autosave option.

Setting Values are Uppercase-Lowercase Sensitive:
The Setting Value may be case-sensitive: be sure that you enter the value exactly as specified in the documentation. If the documentation specifies a value of true, do NOT enter True or TRUE.

Important Fields:


sys-report-functionid- -userid (specific user that does not belong to a branch)

where functionid is replaced by the function id that specifies the report (e.g., sys-report-rininv3 for construction invoices or sys-report-serviceinvoice for Service Compute Invoices). If this entry is specific to a user, the branch must be specified if a user belongs to a branch. If branches are not implemented, two dashes (not separated by a space) must precede the user id.

Service Compute Notes
When using this registry option to print invoices by Branch, Service Compute does NOT use the Branch Id on the workorder, it uses the Branch Id of the user running the function. If the Billing Agent field is cleared out, all invoices for all branches will print using the branch/registry option graphic setup for the User Logged in.

Disable the Email Button on the Report Screen Always or Before Printing

These options can be implemented for reports that have a ‘did this report print successfully’ confirmation box, such as the Purchase Order and Service Invoice. Note that  for the Service Invoice, emailing the invoice via the Email button allows it to be sent without being posted!

Registry Id: sys-report-functionid

Setting Key: OkToEmail Setting Value: false (default is true)

This setting will permanently disable the SendEmail button; this report cannot be emailed from the report screen's Email button, including when a report has been saved as a DBR.

Setting Key: OkToEmailWithoutPrint Setting Value: false (default is true) 

If this option is set to false, the Email button will be disabled (grayed-out) when the report is first displayed. The button will be enabled only when the report has been printed.

Example: Service Invoice

If a Service Invoice is brought up to screen, the user can click the email button and email the invoice without posting it. The following registry will prevent this from happening.

Registry Id: sys-report-serviceinvoice

Setting Key: OkToEmailWithoutPrint Setting Value: false (default is true)

Example: Purchase Order Control

If a PO is not linked to a Quote, the Vendor may be changed if items have not been received AND the PO had not been printed. Some users were completing a Purchase Order, emailing it to the Vendor, and then changing the Vendor on it. Implementing the following registry forces the Purchase Order to be printed before it can be e-mailed. Since the Vendor cannot be changed on a Printed Purchase Order, this entry effectively stops the undesirable practice of ‘reusing’ PO's.

Id: sys-report-rpofrm

Setting Key: OkToEmailWithoutPrint Setting Value: false 

Autosave Options

Registry Id: sys-report-functionid

Setting Key: autosave Setting Value: true  


Setting Key: autosavewhenprinted Setting Value: true

This automatic saving of reports is implemented when you specify one of these options. If you specify the autosave option, the report will be saved when it appears on the screen. If you specify the autosavewhenprinted option, the report will be saved when it is sent to the printer; this option is highly recommended for rininv3 and rininv4 and required for report serviceinvoice.

Import Note for Service Compute Invoices:
The autosavewhenprinted option must be specified in the registry entry sys-report-serviceinvoice due to the manner in which is invoked via the start service compute front end.

Note for Progress Invoice / Construction Invoices:
See the Record Billing Adjustment Registry for an option to prevent the user from setting an invoice to Posted in Record Billed Adjustments. This is HIGHLY RECOMMENDED if your construction invoices are auto-saved, to prevent them from being accidentally posting without a printed invoice.

Setting Key: autosavefiletype Setting Value: filetype

where filetype is replaced by the format in which you wish to save the report. If you do not include this entry, DBReport is selected. The following are valid options:

 Value  Notes

 PDF  (Adobe Acrobat)

 DBReport  (Requires Data-Basics report reader to view)

 Text  (text only, no formatting)

 HTML  (view with web browser)

 CSV  (use only for spreadsheet-type reports)

Setting Key: autosavedirectory Setting Value: path   OR
Setting Key: autosavedirectory Setting Value: path\^sectiondirectory^\

where path is replaced by full path to the directory that you want your reports stored in. If you are specifying a url share path make sure that the directory below the ones that will be created is shared.

Important Note: The ^sectiondirectory^ option is NOT supported by RININV3. The autosave path that you specify an appropriately named subdirectory, such as ConstructionInvoices.

The \^sectiondirectory^\ option stores your reports in a subdirectory derived from the sectionkey field (if available) in the report. If this subdirectory does not already exist, it will be created as needed by the system.

Service Invoices: 'invoices' is defined as the sectiondirectory in the Service Invoice report, so these invoices would be stored in the \invoices directory.

Purchase Orders: The Vendor Id is defined as the sectiondirectory of Purchase Order report, all PO’s would be stored by Vendor Id:

Setting Key: autosavefilename Setting Value: name,^sectionkeyvalue^,^date^,^time^

You may use some or all of the parameters in this option. If more that one is used, parameters should be separated by commas.

If used, name should be replaced a short description of the report (e.g., Invoice, PO).

If used, the system will replace ^sectionkeyvalue^ with the corresponding value stored in the report. For example, the invoice report (rininv3) specifies the invoice number as the sectionkeyvalue. If you use this parameter you must also specify the autosavebysection=true option discussed below.

If used, the ^date^ and ^time^ parameters will be replaced by the system date and time when the report is run. These parameters effectively prevent the system from overwriting existing copies of the report (the date and time combination will serve to create a unique filename). In some cases this would be useful (e.g., balance sheets). In other cases, keeping only the most recent version of a document might be the best plan (invoices). If only the most recent version of a document is to be retained, the ^date^ and ^time^ parameters should not be used.

Setting Key: autosavebysection Setting Value: true
This option is used to save the report sections as individual files. Typically, this would be used for reports such as purchase orders, Invoices (AIA, service invoices, job invoices, COP Invoices and COP Export Invoices). autosavebysection=true should only be used in conjunction with the ^sectionkeyvalue^ parameter of the autosavefilename option discussed above.

Setting Key: autosaveoverwrite Setting Value: true or false (true is default)
If you specify the true option, the system will overwrite the most recent copy of a report file. Typically, this is the setting that you would use for invoices. false prevents a report file from being overwritten - the first copy a file would be retained, not the most recent.

Set Document Record's FM, CRM, Sub or Tech Viewable Fields When Report is Auto-Attached

The following options enable the ability to set the Document's 'Viewable' flags when a report is auto-attached to an applicable record.

Registry Id: sys-report-functionid

Setting Key: ViewableFM  Setting Value: true  (default is false)
This registry controls the Web Viewable FM? flag in the Document viewer that is used to determine if an FMAnywhere (or old CRM/Client Web Interface) Web User will have access to the associated report.

Setting Key: ViewableCRM   Setting Value: true  (default is false)
This registry controls the Web Viewable CRM? flag in the Document viewer that is used to determine if an CRMAnywhere (or old CSR) User will have access to the associated report.

Setting Key: ViewableTech    Setting Value: true   (default is false)
his registry controls the Web Viewable Tech? flag in the Document viewer that is used to determine if an TechAnywhere Technician will have access to the associated report.

Setting Key: ViewableSub    Setting Value:  true   (default is false)

This registry controls the Web Viewable Tech? flag in the Document viewer (available in 8.2.545.031) that is used to determine if an TechAnywhere Technician will have access to the associated report.

Auto Email

Registry Id: sys-report-functionid

Setting Key: autoemail  Setting Value: true  

Setting Key: autoemailwhenprinted   Setting Value: true (required when autosavewhenprinted is enabled)

Setting Key: emailbysection  Setting Value: true

These options may be enabled for supported reports that you wish to automatically email by section when they are displayed and/or printed. These reports currently include the service invoice and vendor insurance expiration (rexprdinsrnce) reports, Report Customer Statements (rcuststmnt dated 8/30/2011 or later) and  sys-report-reftchckdtlvndr (for EFT AP Vendors) .

Important Note: autoemailwhenprinted and autosavewhenprinted
If autosavewhenprinted is enabled for a report, autoemailwhenprinted should also be enabled if you wish the report to be emailed.  

Service Invoice: The system uses the Job’s Invoice Email Address. If the email address is filled in AND the following registry entry is set, then the report omits the invoice address, and replaces with the Emailed To: address. However, the autoemailwhenprinted option is responsible for the actual emailing of the report.

Setting Key: autoemail  Setting Value: true  

The To: email address will be derived from each section depending upon the report.

The From: email address required to send the email is derived from the User’s Contact record. This means that, in order for this functionality to work, Users running the report MUST have a Contact ID in their User record AND a valid email address in that Contact record. If these requirements are not met, the email will fail.

Email Customer Statements: If an e-mail address exists in the Client Collections Email Address field, a copy of their section of the report will be emailed to that address.

Document Archiving: When auto-emailing is enabled for Service Invoices, the system no longer attempts to archive the emailed copy in addition to the copy that is being saved / archived as defined in the registry settings for the report.

Do Not Email User Running Report if Section lacks a Recipient Email Address

By default, if the User's email is completed in the User's Contact Record AND the appropriate Email To address is blank (for example, the Email Invoice Address (or Billing Address Id) in the Job is blank for service invoices), the invoice is sent to the User's Email Address in the Contact record. This may be undesirable. The following registry setting applies to auto-emailing in general and may be implemented on a report by report basis to disable the emailing of a report section when the section does NOT have a recipient email address available.

Registry Id: sys-report-functionid

Setting Key: SkipEmailNoAddress Setting Value: Y (default is N)

Report Graphics

Registry Id: sys-report-functionid

Setting Key: bitmap Setting Value: sharepath\bitmap.bmp

The ‘bitmap’ entry enables you to specify the name and location of the files used to display your company logo and contact information on invoices, customer statements, and other reports, as well as provide formatting for purchase orders.  A Windows .bmp file is required. The Setting Value is the full path to the bitmap itself, including the filename. A path using a named drive is recommended to prevent problems down the road if a new server is installed.

If you will be emailing your reports as .PDF’s, a .jpg version of the graphics file must also be in place. The filename must be the same as the .bmp file but the extension must be .jpg. Note that the .bmp file is displayed in the SAMPro report viewer, while the .jpg file is required for the PDF.

Example using a Drive Designation (recommended) for Service Invoice

Id: sys-report-serviceinvoice
Setting Key: bitmap Setting Value: n:\documents\bitmaps\myinvoice.bmp

In this example, the files myinvoice.bmp and myinvoice.jpg would both reside in n:\documents\bitmaps\

Additional Override Bitmap Functionality for Service Invoice and Quotes
See Specify Override Bitmap by Site's Account Manager, Service Manager, Dispatcher or Branch for details on implementing this functionality for the Service Invoice, and for the Quote in Specify Override Bitmap by Sites Account Manager, Service Manager, Dispatcher or Branch.

Using Printed Stationary on the DBReport and a Graphic Image in the PDF
Some users print some or all of their DBR reports to preprinted stationary but want to include an image in the pdf images that they email.  If this case, the .bmp image would simply be a small white square that would not actually print anything when the report was run from SAMPro. The .jpg file would be of the actual image (usually a logo and address) that would be used when the PDF was generated from SAMPro. Note that the .bmp would be referenced in the registry setting - the software knows to look for the corresponding .jpg file when the report is pdf'd.

Important Note on Redisplaying Saved Reports:
Any time a DBR is saved, it stores the registry values in the DBR file itself. Namely, the bitmap directory. When that DBR file is opened in SAMPro, it will recall the old bitmap directory to go out and find the logo to print to screen. See Saved Reports and Bitmaps for additional steps which may be taken to find the bitmap for display.


Setting Key: copystampbitmap Setting Value: sharepath\copystamp.bmp

The 'copystampbitmap' option lets you designate the 'copy' graphics that should appear on reports that are being printed for a second time.


Last Page Bitmaps for Selected Reports

This registry enhancement may be used to print a ‘backer’ type bitmap as the last page of selected reports. Currently this feature is available only on the PO Form, standard Quote Form, and enhanced AIA-style billing reports.  This functionality can be added to other section-based reports as needed.  A relatively small change is required.

Registry Id: sys-report-functionid

Setting Key: sectionbackerbitmap Setting Value: sharepath\backerbitmapname.bmp

If you will be emailing the report or saving it as a .pdf, make sure that a .jpg version of the backer bitmap also exists in the same directory.

Text Box Width (selected reports)

The TextBoxWidth registry setting allows a user to change the default width for textbox processing in certain reports. This option affects text boxes like work performed on a Service Invoice, Quote Scope Description, RININV3 invoice description, etc. It controls how far to the right the box extends. The left-hand position of the box is controlled by the report itself.

Registry Id: sys-report-functionid

Setting Key: textboxwidth       Setting Value: # of columns (usually either 80, 100 or 110)

This option is supported in the following reports dated 2015-01-27 or later:

RCO (Report Change Order)

RININV3 (Report Invoice Template 3 - Progress Billing)

RQTEFRM (Report Quote Form (Standard)

SERVICEINVOICE (Report Service Invoice)

SERVICEWORKSHEET (Report Worksheet for srvce_jbs)

RSRVCEHSTRYDTL (Report Site Service History)

DWOSMMRY (Report Work Order Summary)

RBLLRPT (Report Job Billing Recap)

woticket-db (Workorder Field Ticket (Standard))

JPG Bitmap Support for PDF Files

SAMPro supports the use of custom .jpg graphics that will be displayed in the .pdf versions of reports, invoices, work orders and other documents generated from SAMPro. The .jpg file should correspond in appearance and name to the bitmap (.bmp) file used to customize the native SAMPro report (DBReport format). Like the bitmap file, the .jpg must reside in the directory specified in the registry entry (sys-report-ReportfFuctionId). Note that the position and size modifiers, and multiple .jpg files are NOT supported in .PDFs: if whitespace is required at the top or left-hand side for the graphic to align correctly, it must be included in the .jpg graphic itself.


Suppose your registry entry for the Purchase Order Form (sys-report-rpofrm) includes the following option:

Setting Key: bitmap   Setting Value: \\myserver\sampro\graphics\po1.bmp

In this instance, a jpg file named po1.jpg must reside in \\myserver\sampro\graphics in order for the .pdf version of the custom graphic to be supported.

JPG Format

Since JPG is a compressed format, you may wish to specify an RGB image rather than palletized. The size in inches of the .jpg file must correspond to the desired size in inches as printed in the native Data-Basics report. For each, full page graphics (such as a PO form, or the landscape COP invoice) should be generated to 10.50” in height by 8.00” in width (landscape). A typical graphic to be used as an invoice or statement logo would be generated at 1.50” in height and 4.00-5.00” in width.

The dpi resolution of the jpg file typically ranges from 100dpi – 300dpi, depending upon the graphics involved and the requirement of the customer. With the exception of the copystamp element, all jpg’s will be positioned at the upper left-hand corner of the page. If positioning is required, it should be incorporated into the graphic as white space.

JPG Support of Copystamp

Copystamp Bitmap functionality (where available by report and implemented by the appropriate registry setting) is also supported for pdf’s. When the copystampbitmap is used in the pdf file, it will be positioned 2 inches down and to the right regardless of the positioning specified in the registry.  If the copystamp will be used on a check, additional whitespace on the left and top may be needed to position the COPY graphic in the check rather than the stub portions of the page.

Comparison Against Database

These options enable you to prevent copies of your database (which may be running for training or testing purposes) from interfering with “live” operations. You may specify either or both. For example, implementing one or both of them for sys-report-serviceinvoice would help avoid inadvertently overwriting your real invoices while running a copy of your data to train new personnel.

Registry Id: sys-report-functionid

Setting Key: eng Setting Value: enginename

where enginename is replaced by the engine name that your live data runs under.


Setting Key: dbn Setting Value: databasename

where databasename is replaced by the name of your live database. Do not include the .db extension in the databasename (mydata rather than mydata.db).

CSV Delimiter, Text Qualifier and Report Header Options

These enable you to set the delimiter and text qualifier characters for a specific report. This allows you to override the standard system values as well as those specified in the sys-csv registry entry for a specific report.

Registry Id: sys-report-functionid

Setting Key: delimiter Setting Value: character

where character is replaced by:

tab (for tab-delimited files)

comma (the default)



any other character (e.g., :)

Setting Key: textqualifier Setting Value: value

where value is replaced by:

doublequote (the default)



Setting Key: includeHeading Setting Value: N

By default, reports which output to the spreadsheet format will both include data and header lines. This option enables you to include only the data in your CSV files.

Registry Option to Set Maximum Lines per Page by Report

Specify the maximum number of lines for a specific report. This entry would commonly be used to shorten a report so that a footer bitmap could be used.

Registry Id: sys-report-functionid

Setting Key: LinesPerPage Setting Value: x

Where x is the maximum number of lines (including header blank lines) per page for this report.

The ideal lines per page will vary depending on whether the report is landscape or portrait, the font size specified in the report, and the size of the footer bitmap. You may wish to begin with a setting of 75 lines per page for portrait reports, and 55 for landscape reports, print the report, and then make appropriate adjustments to the lines per page.

Escalation Manager Pagination
Since reports launched by the escalation manager do not know which printer they will be sent to, the default length was being set to 60 lines per page in some cases – much too short for a portrait report. The scheduled report manager will look at the LinesPerPage option in the sys-report-functionid registry setting when calculating the lines per page. Typically, somewhere between 78 and 80 lines would be appropriate for a portrait report.

Print report criteria on first or last page

This enhancement enables the optional printing of your report settings and ranges appear together as a page on the 'printed' report. Some reports aren't eligible for printing the report criteria.  These exceptions tend to be reports that use pre-printed forms and/or have report-printed-ok confirmation prompts.  Examples are Checks, Invoices, PO forms, etc. To activate this option for specific reports:

Registry Id: sys-report-functionid

SettingKey: PrintReportCriteria 

SettingValue: reportfirstpage Or reportlastpage OR sectionfirstpage OR false (default false)

Display Report as PDF

When this option is enabled, reports will be previewed as PDF’s instead of in SAM Pro’s Report viewer. This option may be implemented for all reports that do NOT require posting (e.g., invoices, po’s, etc.) by creating the following registry setting:

Registry Id: sys-report-functionid

SettingKey: PreviewReportsAsPDF SettingValue: true

Note that if the user attempts to preview a report with no contents (e.g, the ranges have been set so that zero pages will be generated), the system will display the message “Report has zero pages to display no PDF File will be created.”

Regardless of any new registry settings, SAMPRO rejects PDF previewing for certain reports that require posting code.  Generally, that list includes all reports that have a 'Print Ok?' prompt.  This includes printing AP Checks, PR Checks, PO Forms, etc.

Override Global Preview Reports as PDF Option

The setting the sys-ffv-global-settings option PreviewReportsAsPDF to true results in all reports (except posting reports such as service invoice) being displayed as PDF's when they are run. This release provides the ability to disable this functionality on an individual report basis by implementing the following registry:

Id: sys-report-reportfunctionid

Setting Key: PreviewReportsAsPDF   Setting Value: false

Specify Initial Default Report Settings

The software now supports general functionality for registry entries for reports which will allow for the default setting for Settings and Range type fields to be specified.

Setting Key: InitialValueFor~fieldId Setting Value: fieldvalue

Note that ”fieldId” is displayed on the report range screen when you lay your cursor over it. For boolean fields (check boxes), the field value of true is for checked, and false is for blank.

Example: enable the Estimated Sales Tax box on the updated Quote Form report

Id: sys-report-rqtefrm

Setting Key: initialValueFor~p_shw_estmtd_tx  Setting Value: true

Important: Service Invoice and Service Worksheet Initial Settings
Since the Service Worksheet and Service Invoice are run from Starter functions, the initial value settings must be made for the appropriate Starter Registry: see Start Service Billing Worksheet and Start Compute Service Invoice for details.

Password Protect Non-Section Key Reports Autosaved as PDF's

An updated XmlToPdf.jar file (dated 1/16/2014 or later) and the following registry entry(ies) are required to implement this behavior for reports which do NOT contain section logic. These settings can be used to password protect PDF files which are auto-saved.  Note that the registry must also include the applicable autosave (or autosavewhenprinted), autosavefilename, and autosavedirectory entries.  In addition, the autosavefiletype option MUST be set to PDF (Setting Key: autosavefiletype  Setting Value: PDF).

Id: sys-report-functionid   (be sure to implement for all Branch and or Security entries)

Setting Key: ReportPasswordProtect   Setting Value: true

This option implements password protection for this report.

Setting Key: ReportUserPassword    Setting Value: password

This option specifies the password required to open the auto-saved report.  Note that if this password is changed, reports created with earlier password still require the earlier password to open.

Setting Key: ReportOwnerPassword   Setting Value: password

A default Owner password (for Data-Basics Support only) will be used unless one is set through this registry entry.

Default Collate and Number of Copies Settings by Report

Setting Key: Collate
Setting Value: true/false (true is the default)

Setting Key: Copies
Setting Value: anInteger (1 is the default)