Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal 8 and parameters, also xls exports
Message
From
03/06/2001 15:45:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Crystal 8 and parameters, also xls exports
Miscellaneous
Thread ID:
00514354
Message ID:
00514354
Views:
52
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
Reply
Map
View

Click here to load this message in the networking platform