Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal rpt export to Excel in VB code not getting Column Headers

Status
Not open for further replies.

CJwater

IS-IT--Management
Mar 26, 2008
34
US
Hi,

I'm Exporting a crystal report to Excel and I need to include the column headers.

The follow code does the report export but I don't get any header (It does gives me all report totals). Anyone have an idea what I'm doing wrong? missing?


Set report = appl.OpenReport("\\cr\\Rpt_WeeklySales.rpt")

report.ParameterFields.Item(1).AddCurrentValue StartDt
report.ParameterFields.Item(2).AddCurrentValue EndDt
report.ParameterFields.Item(3).AddCurrentValue mfgBrand
report.ExportOptions.DestinationType = crEDTDiskFile
report.ExportOptions.ExcelTabHasColumnHeadings = True
report.ExportOptions.FormatType = crEFTExcel80

report.ExportOptions.DiskFileName = "\\serverr\Sales(Excel) _" & Format(Date, "yyyymmdd") & ".xls"

report.Export False

Any thoughts on this?

Thanks
CJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top