Hi,
I'm using VB6 (SP3) and CR6. What I'd like to do is not have a seperate form for each and every report I have in my project, however, the way VB and CR inter-relate, my simple task seems virtually impossible.
What happens is when the for is loaded, it creates a global variable (to the form) of the type of the report. So, if my report is called MyReport1 then the following code is generated in the form:
Dim Report as New MyReport1 (even BEFORE Option Explicit)
Then, in the form load:
crvViewer.ReportSource = Report
crvViewer.ViewReport
What I'd like to do is assign the report I want to see at runtime, but haven't found where I can do this. I've tried reassigning a different report to the variable, but all I get is "Variable not defined" error, with the name of the report I want (i.e. Rep1 in "Report = Rep1")
Anybody know how to do this? I've tried a direct assignment ( Report = Rep1) and setting it since it seems to be an object (Set Report = Rep1), both to no avail.
TIA,
Hugo
"My get up and go must've got up and went"
-Steve Tyler, Aerosmith