Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to identify private data session in report (good thr
Message
 
 
To
18/05/2001 21:59:48
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00507942
Message ID:
00511623
Views:
28
It has been awhile [been on vacation the last week]. Why would you have the report use a private DS then switch to another private DS for a source of data? This just leads to trouble trying to force a report to use data from 2 private DSs. I would continue to use a form with a private DS and have the report NOT use a private DS. Call the report from the form so the report uses its private DS.

If you continue to SET DATASESSION to the form's private DS with the function call, you should reset the DS back to what it was before the report finishes. You could make another function call in the report Summary band that sets the DS back to the DS of the report. Your problem is probably a dangling report DS when the report finishes executing.

>Mark,
>
>I have a new problem with my report datasession I wanted to bounce off of you or anyone else out there.
>
>Here is the senario.
>
>I start up my app and open a form using a private datasession before I run my report. I then run the code below to create my cursor to be used by my report.
>
>This report is using a private datasession and in the datasession.init I run the code you provided in your previous response to determine the datasession where my cursor was created so I can set the datasession and select the cursor. In this senario the datasession always winds up being default(1) and everything works.
>
>However, as soon as I run a different report the cursor gets created in the private datasession of the form and I'm unable to select it so my report blows up.
>
>I'm trying to determine how I can force the method used to create the cursor to use the default datasession everytime or create a new private datasession, but with no luck. Is this possible to do?
>
>Keith
>
>
>>I have a VFP report using a private datasession that I execute as follows:
>>
>>public oFilters
>>
>>oFilters=NEWOBJECT('reportsfilter','appfilters')
>>oFilters.rpt_closure_key()
>>
>>REPORT FORM CURDIR()+'report\&gcReportName'
>>
>>
>>.rpt_closure_key() is the method that creates the cursor "proposal" used by the report.
>>
>>
>>My question is, how do I tell the report the name of the cursor to use. I can't add it as a table in the data environment. In the report datasession init I tried adding:
>>
>> set datasession to 1
>> select proprosal
>>
>>That works if nothing else is open, however, if I have a form open first then the report doesn't use datasession 1.
>>
>>Keith
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform