Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving picture and using Crystal Reports
Message
 
À
21/08/2002 04:00:11
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00688256
Message ID:
00691931
Vues:
20
Walter,

Thank for your answer.
You were right on the drivers.
I had the version 8.5.0.217 and maintaining it is version 8.5.2.718.
IT is necessary to charge the patch 1,2,3,5 with http://support.crystaldecisions.com/updates /

I am interested in possible changes in your code for the future.
I can assure you that your code also functions when you exports without preview.

(extracted http://www.advisor.com/adv/AdvisorHome)
mark@msdcweb.com

*---------------------------------------------------------------------------------------------------
*-- Export a Crystal Report in a variety of formats.
PROCEDURE ExportReport
*---------------------------------------------------------------------------------------------------
LPARAMETERS cFormat
*
* cFormat Format type based on following table:
* A Adobe Acrobat
* E Microsoft Excel
* L Lotus 1-2-3
* T Paginated Text
* W Microsoft Word
*
* Default format to Excel if not otherwise specified
*
IF VARTYPE(cFormat) # 'C'
cFormat = 'E'
ENDIF
IF !(cFormat $ 'AELTW')
cFormat = 'E'
ENDIF

LOCAL oExportOptions, cExtension, cFileName
*
* Write the report out as a document of their choosing
*
WITH THIS
oExportOptions = .crreport.ExportOptions
.ncounter = .ncounter + 1
*!* cFileName = LEFT(.ReportFileName, AT(".", .ReportFileName) - 1) + ;
*!* ALLTRIM(STR(.ncounter))
*!* cFileName = PROPER(cFileName)
cFileName = THIS.DirectoryToExport + THIS.ExportFileName
ENDWITH

WITH oExportOptions
.DestinationType = 1 && Disk file
*
* Set the format type based on passed parameter
*
DO CASE
CASE cFormat = 'A' && Acrobat PDF
.FormatType = 31
.PDFExportAllPages = .T.
cExtension = '.pdf'

CASE cFormat = 'E' && Excel 5
.FormatType = 21
.ExcelTabHasColumnHeadings = .T.
.ExcelUseWorksheetFunctions = .T. && Use functions for subtotals
cExtension = '.xls'

CASE cFormat = 'L' && Lotus 1-2-3
.FormatType = 11
cExtension = '.wks'

CASE cFormat = 'T' && Text
.FormatType = 10
.NumberOfLinesPerPage = 60
cExtension = '.txt'

CASE cFormat = 'W' && Microsoft Word
.FormatType = 14
cExtension = '.doc'
ENDCASE
.DiskFileName = cFileName + cExtension
ENDWITH
*
* Do not prompt the user for information...
*
THIS.crreport.EXPORT(.F.)

RETURN oExportOptions.DiskFileName
ENDPROC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform