- Messages
- 7
- Reaction score
- 0
- Points
- 16
Pahelp po sa VB6 hindi po kasi properly nag aadd ng values sa parameter ng crystal report with multiple values. lagi po ung last value lang ang kinukuha niya. ito po ung code sa baba:
With CRx
.Reset
.ReportFileName = App.path & "\reports\test.rpt"
For i = 1 To lvw.ListItems.Count
If lvw.ListItems(i).Checked Then
.ParameterFields(1) = "branchID;" & lvw.ListItems(i) & ";True"
End If
Next i
'print preview
.Destination = crptToWindow
'print directly
'.Destination = crptToPrinter
.WindowShowSearchBtn = True
.WindowShowPrintSetupBtn = True
.WindowState = crptMaximized
.PrintReport
End With
ung selection po dya is listview po with checkbox. Thanks po sa responses.
With CRx
.Reset
.ReportFileName = App.path & "\reports\test.rpt"
For i = 1 To lvw.ListItems.Count
If lvw.ListItems(i).Checked Then
.ParameterFields(1) = "branchID;" & lvw.ListItems(i) & ";True"
End If
Next i
'print preview
.Destination = crptToWindow
'print directly
'.Destination = crptToPrinter
.WindowShowSearchBtn = True
.WindowShowPrintSetupBtn = True
.WindowState = crptMaximized
.PrintReport
End With
ung selection po dya is listview po with checkbox. Thanks po sa responses.