The Registry entries described in this topic enable you to select a specific system printer by report functions and Id, customize a dialog box, specify that the Windows printer dialog box appears, set the report orientation, etc.
Testing Your Registry Entries
The system does not verify the validity of registry entries. Be sure to test your registry entries after completing them to verify that they are functioning correctly.
Setting Values are Uppercase-Lowercase Sensitive:
The Setting Value is 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.
Id: sys-printer-dialog-functionid-branchid-userid
This registry may be used to customize the dialog box, where functionid is replaced by SAM Pro's function name for the report. For example, the function name for Report PO Forms is rpofrm. The function name is listed in the Menu or Reports list when the FunctionsbyIdbyAlpha sort is displayed and is required.
If this entry is specific to a branch the optional branch id should be included in the registry entry id.
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.
Example 1
(customized PO Forms dialog box for all users):
sys-printer-dialog-rpofrm
Example 2
(customized PO Forms dialog box for branch 47 users):
sys-printer-dialog-rpofrm-47
Example 3
(customized PO Forms dialog box for user Felix in branch 47):
sys-printer-dialog-rpofrm-47-felix
Note that all of the above examples can exist simultaneously: their implementation is hierarchical. If Felix logged on and printed a PO, the customized dialog box in example 3 would appear. If a user from branch 47 other than Felix printer a PO, the dialog box in Example 2 would appear. Finally, global users and users from branches other than branch 47 would see the dialog box with the Example 1 key.
Example: Drum Labels
For each branch printing drum labels, you would create a registry entry using the format sys-printer-DrumLabels-branchid, where branchid is replaced with the actual Id of the Branch. The contents field should specify the printer that these labels should be output to at this branch (e.g., printer=MainDrumLabel).
If the contents/setting key of a sys-printer-dialog-functionid-branchid-userid registry entry is set to olddialog, the Windows' dialog box will appear instead of the list of printers. When olddialog is enabled, the From - To Pages settings in the Report viewer are NOT carried to the Second Windows printer box where it must be set. To print only a few pages of a report, the page number must be entered in the second Windows Dialog.
Setting Key: olddialog Setting Value: true
See Global Windows Dialog Box for a global option to use the Windows Dialog Box for all reports.
Setting Key: names Setting Value: printername1,printername2 ...
is used only in a sys-printer-dialog entry to limit the number of eligible printers displayed on the dialog box.
Id: sys-printer-functionid-branchid-userid
Setting Key: orientation Setting Value: 1 or 2
Enter 1 or 2 to force the paper orientation to portrait or landscape respectively.
This registry entry results in the report being sent directly to the specified printer without a dialog box being displayed.
Id: sys-printer-functionid-branchid-userid
Setting Key: defaultprinter Setting Value: printername
where printername is the name of the printer that should be set as the default printer for this report (and branch and user, if applicable) exactly as it appears in the Name field of the Windows Printer dialog box. Please note that this field is upper/lower case sensitive. If this registry option identifies an invalid printer, the user will be warned via a Confirmation Box and a print dialog box will be displayed.
Tip: To list the printername of the printer that you wish to output on:
A. Double-click on the Windows' My Computer icon
B. Double-click on the Prints folder
C. Single-click on the printer you want to this report on
D. Right-click on the printer to display a menu, and select Properties.
E. When the Properties box appear, click Print Test Page.
F. The Printer name is listed on the test page; enter this in your Registry Contents.
Setting Key: class Setting Value: Printer or RawPrinter
Enter the Printer or RawPrinter parameter (in sys-printer or sys-printer-dialog) if you need to force the printer output to Windows' Printer Driver (Printer) or raw output not using the Windows' printer driver (RawPrinter).
If class=RawPrinter is specified, you can also make the following entries separated by semicolons to control the printer's behavior at the end and beginnings of lines and forms:
cr (carriage return)
lf (line feed)
on-begin-ff (the printer is to ff on beginning of report
on-end-ff (the printer is to ff on end of report