OCX - passing Datasource

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Ben_(Guest)
Posts: 9
Joined: Tue Oct 10, 2017 12:44 pm

OCX - passing Datasource

Post by Ben_(Guest) » Thu Sep 12, 2002 9:51 am

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???____________

ColinDow
Posts: 39
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: OCX - passing Datasource

Post by ColinDow » Thu Sep 12, 2002 11:53 am

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.____

Ben_(Guest)
Posts: 9
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: OCX - passing Datasource

Post by Ben_(Guest) » Thu Sep 12, 2002 12:30 pm

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

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: OCX - passing Datasource

Post by kfleming » Fri Sep 13, 2002 7:16 am

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

Post Reply