Hello,
I am using CR8 in GE Fanuc iFix (VBA). Within my application
I have a report that previews fine in the CRVeiwer however doesn't print when I press the print button. When I press the print button the printer dialog box opens, I press print... and that's where the wheels fall off. No print job.
Can anyone suggest a reason for this strange behaviour?
Here is my code
Thanks,
Lou
I am using CR8 in GE Fanuc iFix (VBA). Within my application
I have a report that previews fine in the CRVeiwer however doesn't print when I press the print button. When I press the print button the printer dialog box opens, I press print... and that's where the wheels fall off. No print job.
Can anyone suggest a reason for this strange behaviour?
Here is my code
Code:
Private Sub cmdPrintDaily_Click()
Dim crApp As CRAXDDRT.Application
Dim rpt As CRAXDDRT.Report
Dim srpt As CRAXDDRT.Report
Dim strSQL As String
Set crApp = New CRAXDRT.Application
Set rpt = crApp.OpenReport("C:\Program Files\GE Fanuc\Proficy iFIX\Reports\Daily.rpt")
Set srpt = crApp.OpenReport("C:\Program Files\GE Fanuc\Proficy iFIX\Reports\srptDailyCal.rpt")
rpt.Database.Tables(1).SetLogOnInfo "DNS_NAME", "DB", "UID", "PWD"
srpt.Database.Tables(1).SetLogOnInfo "********", "**", "***", "***"
rpt.DiscardSavedData
srpt.DiscardSavedData
strSQL = "{viewHourlyWithBias.DateAndTime} = Date(" & Format(cboDailyReportDate, "YYYY,MM,DD") & ")"
rpt.RecordSelectionFormula = strSQL
rpt.VerifyOnEveryPrint = True
frmReport.CRViewer1.ReportSource = rpt
frmReport.CRViewer1.EnableRefreshButton = True
frmReport.CRViewer1.EnableSelectExpertButton = True
frmReport.CRViewer1.DisplayGroupTree = False
frmReport.CRViewer1.ViewReport
frmReport.Show
End Sub
Thanks,
Lou