it is been a while i am struggling with this issue.
i have a main report which holds a subreport.i also need to run multiple instance of main report at the same time . each time sureport runs a separate query as this:
Static intCallCount As Long
If intCallCount = 0 Then
Me.RecordSource = "sqlquery"
intCallCount = intCallCount + 1
and here is my module to open multiple intance of report:
Public Function OpenAClient(id As String)
'Purpose: Open an independent instance of Report
' Static rpt As Report
' Set rpt = New Report_Report1---> this is my main report
' rpt.Visible = True
' rpt.CurrentView = 1
' rpt.Caption = [Forms]![F_Client]![Client Name]
' clnClient.Add Item:=rpt, Key:=CStr(rpt.Hwnd)
' Set rpt = Nothing
where the clnClientis a public collection variable.
Now here is the problem. as soon as progrom runs
set rpt=New Report_Report_1
the programs gives me this error on OnOpen event of subreport
"you can't set the recordsource property in print preview or after prnting"
i really dont know what is going on here. appreciate if you can give it a thought