Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: CommandClauses.File is Writeable, but ignored
Message
From
31/01/2005 15:37:21
 
 
To
31/01/2005 12:55:26
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00982188
Message ID:
00982438
Views:
20
>Fabio -
>
>>> Observed: ReportListener.CommandClauses.File is Writeable in
>>> LoadReport methods, but the Report engine ignore the updated filename,
>>> and uses the REPORT filename.
>>>
>>> Expected: ReportListener.CommandClauses.File is Writeable
>>> in LoadReport methods, and the Report engine uses the updated filename.
>
>What gives you this expectation? Did you read the help file?
>
>The following table lists the CommandClauses members and discusses their contents and availability. Unless otherwise specified, the member and correct value is available from LoadReport through UnloadReport during a report run. Also, unless otherwise specified, neither the Report Engine nor the ReportListener base class uses these values; they are provided for the use of code in classes derived from ReportListener.
>
>No bug in my opinion.
>
>- Colin

Hi Colin,
I'm content that you answer.

Of course, you know better than me the help
(effectively I have only given highly summarized reading),
and writing in this way CommandClauses it becomes floating properties container
and therefore no program bugs can exist here.

But, then, it was not better to fix them to readonly? It would have been surer.
In this way, every possible future development of VFP will have many difficulties to change the operation of these properties, because some developer will use to them in the more unforeseeable ways and then there will be a compatibility problem.

Moreover, you can comment my comment to the example written in LoadReport;
this is the true reason for which I expected that the updates made on CommandClauses in LoadReport
came used from the Report Engine.

From Message #981824
But the LoadReport example it does not appeal to to me at all.
Apply into this case:
- LoadReport rename the RealFRX to tempFRX
- Application crash ( nobody can put the hand on the fire and say that it cannot happen )
- At this point the Application have lost the RealFRX!!!

If the crash happen between the two RENAME in UnloadReport
you have merged the userFRX with RealFRX.
Whit the expected design choice, THIS.CommandClauses.FILE or another property RW into LoadReport:
copy GetFile("frx") report into a tempFRX ( same for frt )
* set the source report file
THIS.CommandClauses.FILE = THIS.tempFRX
This is immune from crash why it does not leave status into the hard disk.

Of course, the workaround is immediate, but RW is more simple.

Thanks
Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform