|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Crystal Reports and VB6
Hi,
I am using Crystal reports shipped with visual studio 6. I am attempting to display a report from the app Ii am developing. I place the crystal report activex on a form and set the report source property to crptReport and the ReportFileName property to where the report file is located. Then I set the Destination property to crptToWindow. I then call CrystalReport1.PrintReport from a commad button, but the report does not display. What do I need to do to get the report to display? Please Help. |
|
#2
|
|||
|
|||
|
Here is some code that I use.
CrystalReport1.Reset CrystalReport1.Destination = crptToWindow CrystalReport1.Connect = "DSN=" & gDSN & ";UID=" & gRptUID & ";PWD=" & gRptPWD & ";DSQL=" & gDSN CrystalReport1.PrinterName = gOrdPrinter CrystalReport1.PrinterPort = gOrdPrinterPort CrystalReport1.PrinterDriver = "winspool" CrystalReport1.ReportTitle = "ORDER PICKING LIST" CrystalReport1.ReportFileName = App.Path + "\Report Folder\PickList.rpt" CrystalReport1.ParameterFields(0) = "User;" & strUserName & ";true" CrystalReport1.ParameterFields(1) = "@OrderNum;" & txtOrderNum.text & ";true" CrystalReport1.ParameterFields(2) = "@OrderVer;" & txtOrderVer.text & ";true" CrystalReport1.PrinterSelect If CrystalReport1.PrintReport <> 0 Then MsgBox CrystalReport1.LastErrorString End If Notice I set the printer and do the PrinterSelect before doing the PrintReport, not sure if that makes a difference or not. Stanton |
|
#3
|
|||
|
|||
|
CRYSTl report with 4 parms
I have a report who asks for 4 parms by itslelf it works.
If i call it from vb i get a dll error??? How do you pass the 4 values to the report optionally. Tom |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Crystal Reports and VB6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|