I have an app that creates and sets report (call it rpt1)variables in a report object.
I then set a public report (rpt2) object in my report viewer screen to equal the populated report. The viewer form loads and shows the report.
Right after I frmViewer.Show I clear some variables in rpt1 since I must loop through and create another instance of the same report where almost all the variable are the same exceping the few I modify.
The problem is that as soon as I do this, since I have set rpt2 to = rpt1, when the viewer shows and/or prints the report the reset variables are missing. I know this is because the object is being passed BYREF, but have tried passing it into a function BYVAL, then setting a different report object but to no avail.
I guess I am looking for a way to set/pass my report object to the viewer where the passed object is NOT dependant upon the original. Anyone have any ideas?
Thanks,
Oliver
I then set a public report (rpt2) object in my report viewer screen to equal the populated report. The viewer form loads and shows the report.
Right after I frmViewer.Show I clear some variables in rpt1 since I must loop through and create another instance of the same report where almost all the variable are the same exceping the few I modify.
The problem is that as soon as I do this, since I have set rpt2 to = rpt1, when the viewer shows and/or prints the report the reset variables are missing. I know this is because the object is being passed BYREF, but have tried passing it into a function BYVAL, then setting a different report object but to no avail.
I guess I am looking for a way to set/pass my report object to the viewer where the passed object is NOT dependant upon the original. Anyone have any ideas?
Thanks,
Oliver