Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ReportListener: it is powerful or not?
Message
From
28/01/2005 11:26:54
 
 
To
28/01/2005 10:29:53
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00981650
Message ID:
00981766
Views:
23
Hi David,
Thanks for the answer.

>Fabio,
>
>>A possible way is with User and Comment fields,
>>but how I can read the values User and Comment of an object of the report
>>in ReportListener code ?
>
>There are a couple of places that you can easily get the values of User and Comment fields. First, in the BeforeReport method, you can get to the internal copy of the FRX that VFP sets up for you to reference during the report run. Doug Hennig covers this in an article in the February issue of FoxTalk 2.0, and here is a snippet based on that code:
function BeforeReport
>dodefault()
>with This
>  .SetFRXDataSession()
>  * at this point, you can scan through the FRX copy
>  * looking for information in any of the fields
>  * (Doug used it to populate an array property with FRX record numbers
>  * that need special processing later, by looking for a directive in
>  * the User field)
>  .ResetDataSession() && be sure to clean up before leaving
>endwith
>You can also check the same FRX record in EvaluateContents when it is called as each field is being prepared for rendering during the report run. EvaluateContents is called by the report engine with two properties: tnFRXRecno and toObjProperties, and you can .SetFRXDataSession and locate the record specified by tnFRXRecno to read any FRX fields.
>

I see it 3' after my post.
This is not fantastic, but it is acceptable.

>This may not solve your problem, but that should point you in the general direction as far as how to get to the User and Comment fields during a report run. If, however, you want to change the order that report objects are evaluated, that would have to come earlier in the process than BeforeReport, because by that time the report engine has already read the FRX and created its own internal structures. In that case, you might want to intercept things in the LoadReport method, which fires before BeforeReport and before the engine has loaded its info from the FRX.
>

Here the VFPT has a negatively surprised to me.
Where it is the ReportFRXFile property R/W that contains the reference to the frx file?

>The Help file topics on those methods should also give you some good ideas, and there is also Cathy Pountney's advanced white paper on the MS site, which shows some similar things.

I have given one read without to read.
I would prefer to read something written from who has thought and designed this outline of operations; but this happens very rarely.

Normally I see articles written from third persons,
than based on what they have understood,
they interpret the thought of who has made really the things.

I write this why you are the Editor of Fox Talk 2.0.
It is not a controversy, is only one my preference.
Any comments ?

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform