Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECTed work area is lost during REPORT FORM...
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00109545
Message ID:
00109622
Views:
41
>>Hello All,
>>
>>I wonder if anybody experienced the problem when selected work area is lost during REPORT FORM...
>>I do the SELECT... INTO CURSOR to create report cursor, SELECT myCursor and when I try to print the report it starts complaining that it cannot find some of its fields. At the same time it shows the preview just fine. After the error I find that the work area shifted to InitialSelectedAlias of the form.Dataenvironment.
>>I tried 2 other versions - using the view in the report Dataenvironment and SELECT... INTO CURSOR in the report Dataenvironment.Init(). In both cases if I run standalone report it works just fine, but if I run it from the form the above situation repeats. It always shows the preview. It is VFP 5.0 and VFX 5.0 framework. Other reports from similar forms work fine. I tried to recreate report but nothing changes. Weird thing is that if I trace my onPrint method in the Debugger everything works fine.
>>
>>Any ideas?
>>
>>Nick
>
>Nick,
>Do you have anything in your InitialSelected Alias? Are you using a Private report datasession? When you put the SELECT... in the DE.Init() were you in a Private DS?

Yes, I have InitialSelectedAlias set. If I set the Report datasession to Private it also works fine. I have an option to run the report from the other place. But report with Private datasession may not be the solution in every case. I just wonder what possibly can cause change in the work area when the report already fired the Preview and it looks OK. And why everything works fine when I am tracing all this stuff?
I have other reports in different forms which work on cursors, and they are fine.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform