Hi All,
I have a crystal report(.rpt file). I need to export that to excel in my vb(6.0) application. Everything works great. The only issue i have is, when i export the file to excel, the Page Header is not getting exported. So the excel has only the data without column names.
Any ideas?
This is what i am doing.
cdlAdHoc.ShowSave
cdlAdHoc.Filter = "*.xls"
strFileName = cdlAdHoc.FileName
constr = "DSN=" & gDSN & ";"
constr = constr & "UID=" & gLoginID & ";"
constr = constr & "PWD=" & gPWD & ";"
constr = constr & "DATABASE=" & gDatabase & ";"
' Here print the report
frmReports.crReports.Connect = constr
frmReports.crReports.Destination = crptToFile
frmReports.crReports.PrintFileType = crEFTExcel80
frmReports.crReports.PrintFileName = strFileName
frmReports.crReports.ReportFileName = App.Path & "\rptNickGeneralInfo.rpt"
frmReports.crReports.Action = 1
I have a crystal report(.rpt file). I need to export that to excel in my vb(6.0) application. Everything works great. The only issue i have is, when i export the file to excel, the Page Header is not getting exported. So the excel has only the data without column names.
Any ideas?
This is what i am doing.
cdlAdHoc.ShowSave
cdlAdHoc.Filter = "*.xls"
strFileName = cdlAdHoc.FileName
constr = "DSN=" & gDSN & ";"
constr = constr & "UID=" & gLoginID & ";"
constr = constr & "PWD=" & gPWD & ";"
constr = constr & "DATABASE=" & gDatabase & ";"
' Here print the report
frmReports.crReports.Connect = constr
frmReports.crReports.Destination = crptToFile
frmReports.crReports.PrintFileType = crEFTExcel80
frmReports.crReports.PrintFileName = strFileName
frmReports.crReports.ReportFileName = App.Path & "\rptNickGeneralInfo.rpt"
frmReports.crReports.Action = 1