ReportPro (2) in ADS environment

This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

ReportPro (2) in ADS environment

Post by ic2 »

After so many years of using ReportPro this sounds like a bit of an odd question. After posting this issue:

https://www.xsharp.eu/forum/topic/3958

the solution was to add every instantiation of a dbf in the array with swaps. This solved the problem that ReportPro asks for missing dbf's which aren't missing but gave kidsize stack errors. I checked some older newsgroup messages and now I wonder:

1 The reports use DBFCDX, the environment is ADS. This suggests that ReportPro doesn't use ADS. But how can this work? If I try to open a DBF, used by the ADS based program, with e.g. dbMax, it returns an error that this DBF is used exclusively elsewhere (which is ADS). I don't see anything explicitly in our code telling ReportPro that the dbf's are under ADS.

2 Do we actually need swaps? In my main program I only use it for some specific dbf's were a user specific copy exists.

Dick
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

Is that about the VO version of RP2 or the X# one? Or both? I must admit I have never used RP with ADS, but iwll give it a look.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

Hi Chris,

That would be great. For both. I have multiple reports but I do nothing as far as I can see to let it know the program uses ADS. But if ReportPro doesn't use ADS, why does it work at all in an ADS environment while dbMax would give that error trying to open a DBF.

Dick
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

I had the impression that you can specify additional RDDs (like the ADS ones) to report pro in the Rpwin.ini file (or another similar), but I can't find anything like that, so I think the only way is to use the arrays swaps at runtime, to tell RP that you want to use the servers you manually open (with the ADS driver) in your code.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

Hello Chris,

That's right. I found a full array including ADSDBFCDX in the swap parameters, somewhere in the comp.lang newsgroup. But that still makes me wonder how it can function if a RDD is not defined (so effectively using DBFCDX) where e.g. dbMax would give an error thinking that the (ADS opened) DBF files are in exclusive use.

Knowing how this works may help us to solve some other issues.

Dick
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

In the swap array, you pass to report pro the dbserver objects that you have already opened in your app using the ADS drivers, so there's nothing for RP to do regarding opening them etc, it just uses them directly, without caring what RDD they use or what method you used to open them.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

Hello Chris,

On it's own, that makes sense. But I only use swap arrays for some specific databases. That would mean ReportPro opens all the other dbf's using DBFCDX in a full ADS environment, right? Which still leaves the question: why can reportPro open these dbf's while dbMax gives an 'exclusive in use' ereror, doing the same?

Dick
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

Could it be RP (or dbMax) is opening the files from a different path?
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

Hello Chris,

No, all the same path where ADS controls the DBF's, ReportPro has no problems opening these very same dbf's with DBFCDX and dbMax says they are in exclusive use.

Dick
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

Then maybe you can check with a file/process monitor windows utility which app has the files opened? Or maybe a system restart will clean this up.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Post Reply