Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong in this code ?
Message
 
To
All
General information
Forum:
Visual Basic
Category:
Third party products
Title:
What is wrong in this code ?
Miscellaneous
Thread ID:
00514781
Message ID:
00514781
Views:
49
Dear All,

The following code works fine accept the last part "printing the report directly", it displays a blank form without printing the report ?!!
is there any thing wrong with this code ?? ...
OR, there is another way to send the report to the printer passing the view prosess.

Set rstReport = New ADOR.Recordset

rstReport.Open pbMySql, myConn, adOpenKeyset

Dim pbReportName As rptBankList
Set pbReportName = New rptBankList

With pbReportName
.DiscardSavedData
.Database.SetDataSource rstReport
.txtReportTitle.SetText (pbReportCaption)
End With

CRViewer.ReportSource = pbReportName

' Check report destination
If pbReportDestination = "V" Then ' for view
Screen.MousePointer = vbHourglass
Screen.MousePointer = vbDefault
CRViewer.ViewReport
Else
CRViewer.PrintReport ' THIS LINE DOES NOT SEND THE REPORT DIRECTLY
' TO THE PRINTER... WHY ??
End If

I am using :
- VB 6 + sp4
- Crystal Report 7

Many thanks in advance..
<><><><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><><><>
Reply
Map
View

Click here to load this message in the networking platform