>>>Hello,
>>>
>>>I have this problem:
>>>
>>>My reports are usually based on a table I create in a "workdir" on the local drive in which I collect the necessary data. For instance: "c:\workdir\reportdata.dbf". Very simple and works fine.
>>>
>>>But now I have an application where the users are very often using "terminal services" to access the network and the application. So when several users at the same time request the same report, the trouble starts because they all want to create the same table which is already in use.
>>>
>>>I wanted to solve this by creating a workdir for each user who logs in to the app, no problem there, but then I have to get the report to use the table in the users' workdir such as "c:\workdir\username\reportdata.dbf". The problem is don't seem able to change the cursorsource property in the dataenvironment of the report when I call the report...
>>>
>>>Does anyone have a suggestion on how to solve this?
>>>
>>>Thank you
>>
>>Ivo,
>>Use a cursor instead.
>>Cetin
>
>Thank you for your suggestion, I think you' re right, that will be the solution.
>The down side of this solution is that in every report I'll have to remove the table out of the dataenvironment, and open the cursor in every calling form before calling the report. And because there are a lot of reports in the app it will be a job. But since there is no other way, I'll get started...
>
>Again: many thanks!
It might not be a big job. I didn't mean to remove table(s) from report DE. Report doesn't know if it's a table or cursor - it only cares to find that alias and if not found opens seeking the table.
Try this :
use customer
create report custest from alias() && Create a quick report for test
Now custest has customer in its dataenvironmet.
close all
Select * ;
from customer ;
where country = 'Germany' ;
into cursor crsRep ;
nofilter
Use in customer
Use Dbf('crsRep') In 0 Again Alias customer
Use in crsRep
Report Form custest prev
In your case it's even easier. Instead of creating reportdata as a table you'd end your final SQL as '..into cursor ReportData'. For users its name on disk is unique (something like a sys(2015) result).
Cetin