Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal 8 and parameters, also xls exports
Message
De
03/06/2001 15:45:45
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Crystal 8 and parameters, also xls exports
Divers
Thread ID:
00514354
Message ID:
00514354
Vues:
54
When I run this code, it prints that current value is set, but prints a blank as its value, and then the report prompts me for the parameter.

on a separate note, when it exports to xls, it leaves blank columns at the beginning in the xls spreadsheet. Can that be fixed?


Any ideas?

Thanks in advance.


* Create the CR Object
loCr = CREATEOBJECT("CrystalRuntime.Application")
* Open the report
loCrRpt = loCr.OpenReport("C:\crystal\top_telephones.Rpt")
* Set the parameters
loCrRpt.EnableParameterPrompting = .F.
loCrRpt.ParameterFields.Item(1).AddCurrentValue("Test Title")
? 'Is Current Value Set'
? loCrRpt.ParameterFields.Item(1).IsCurrentValueSet
? 'Current Value'
? loCrRpt.ParameterFields.Item(1).Value
* Set the data location
loCrData = loCrRpt.Database
loCrTables = loCrData.Tables
loCrTables.Item(1).Location = "c:\crystal\top_telephones.dbf"
* Set the export options
loExportOptions = loCrRpt.ExportOptions
loExportOptions.DestinationType = 1 && crEDTDiskFile
loExportOptions.FormatType = 29 && crEFTExcel80
loExportOptions.DiskFileName = "c:\crystal\top_telephones.xls"
* Export the file
loCrRpt.DiscardSavedData()
loCrRpt.Export(.F.)
* Manual garbage collection
loExportOptions = NULL
loCrTables = NULL
loCrData = NULL
loCrRpt = NULL
loCr = NULL
Répondre
Fil
Voir

Click here to load this message in the networking platform