Consultor Eletrônico



Kbase P115685: How to restrict the export format and destination options of the Crystal Reports Viewer?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/28/2006
Status: Unverified

GOAL:

How to restrict the export format and destination options of the Crystal Reports Viewer?

GOAL:

How to Customize the export destination and format options of a Crystal Reports Report?

FIX:

One way to customize or restrict the export options of the Crystal Report Viewer Object is as follows:
1. Disable the Export button from the viewer. For example:
chCtrlFrame:CrystalActiveXReportViewer:EnableExportButton = FALSE.
2. Define a COMBO-BOX and populate its LIST-ITEM-PAIRS with the Export destinations you want to allow. For example:
DEFINE VARIABLE ExportDestination AS CHARACTER FORMAT "X(256)":U
LABEL "Select Export Destination"
VIEW-AS COMBO-BOX INNER-LINES 5
LIST-ITEM-PAIRS "No Destination"," 0",
"Disk File","1",
"MAPI Mail File","2",
"Mail VIM"," 3",
"Microsoft Exchange"," 4",
"Application"," 5",
"Lotus File"," 6"
3. Define a COMBO-BOX and populate its LIST-ITEM-PAIRS with the Export formats you want to allow. For example:
DEFINE VARIABLE ExportFormat AS CHARACTER FORMAT "X(256)":U
LABEL "Select Export Format"
VIEW-AS COMBO-BOX INNER-LINES 5
LIST-ITEM-PAIRS "No Format"," 0",
"Crystal Report"," 1",
"Data Interchange"," 2",
"XML"," 3"
DROP-DOWN-LIST
SIZE 36 BY 1 NO-UNDO.
3. Export the report after the user selection of the report destination and format using the Crystal Report Object's EXPORT() method. For example:
crReport:EXPORT(FALSE).