CrazyManiac
MIS
I've created some reports. They're launched from Lotus Notes database. Is it possible to pass an array of values from Lotus Script to one parameter field in report (and what type of parameter field it should be)? I've tried this script, but it doesn't work:
Sub Postopen(Source As Notesuidocument)
Dim Viewer As Variant
Set Viewer = Source.getObject( "Crystal Report Viewer Control 9" )
Dim App As Variant
Set App = createObject( "CrystalRuntime.Application" )
Dim Rep As Variant
Set Rep = App.openReport( "C:\Temp\report.rpt" )
Rep.Database.tables().setLogOnInfo server, db, user, pw
Dim paramar(1 To n) As String
paramar(1) = "string1"
paramar(2) = "string2"
paramar(3) = "string3"
...
paramar
= "stringN"
Rep.ParameterFields(3).AddCurrentValue paramar
Set Viewer.reportSource = Rep
Viewer.viewReport
Exit Sub
End Sub
Sub Postopen(Source As Notesuidocument)
Dim Viewer As Variant
Set Viewer = Source.getObject( "Crystal Report Viewer Control 9" )
Dim App As Variant
Set App = createObject( "CrystalRuntime.Application" )
Dim Rep As Variant
Set Rep = App.openReport( "C:\Temp\report.rpt" )
Rep.Database.tables().setLogOnInfo server, db, user, pw
Dim paramar(1 To n) As String
paramar(1) = "string1"
paramar(2) = "string2"
paramar(3) = "string3"
...
paramar
Rep.ParameterFields(3).AddCurrentValue paramar
Set Viewer.reportSource = Rep
Viewer.viewReport
Exit Sub
End Sub