Page 1 of 1

OCX - passing Datasource

Posted: Thu Sep 12, 2002 9:51 am
by Ben_(Guest)
I am using the OCX to run reports from a VB application. My application passes variables (including the datasource) to the OCX and then runs it ie____reportscontrol.reportname = "mypath"__reportscontrol.datasource = "RRW"__reportscontrol.action = 1____the problem is that it doesnt pass the datasource...when I run the report it comes up with the error ____DATASOURCE ^EPL^ DOES NOT EXIST...WOULD YOU LIKE TO CREATE IT?____clicking OK on this error message cancels the report.__EPL is the datasource that the report was connected to in designer.__It appears not to be overwriting the datasource...am I doing something wrong???____________

=> RE: OCX - passing Datasource

Posted: Thu Sep 12, 2002 11:53 am
by ColinDow
Assuming you are trying to change the source from EPL to RSW the syntax looks the same as our module.____Two points.____Its worth checking that the case of your new DSN is exactly the same as that in the control panel.____Also although it was done a while ago so my mmory is hazy I notice that my code has a doevents after assigning the DSN.____

==> RE: OCX - passing Datasource

Posted: Thu Sep 12, 2002 12:30 pm
by Ben_(Guest)
yes, I am trying to change the Datasource from EPL to RRW...____whats strange is that cancelling out of this error message actually runs the report from the new datasource, so it looks like an OCX bug or something

===> RE: OCX - passing Datasource

Posted: Fri Sep 13, 2002 7:16 am
by kfleming
The problem is actually within the rswrun.exe executable.__If you try to pass a datasource, it looks for the saved data source anyway. Send me your email address and I will send you a version of the executable that corrects this problem.____Kathleen__R&R Support__kfleming@livewarepub.com