Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which .FRX form records are in Detail band?
Message
 
To
26/01/2004 09:49:18
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00870555
Message ID:
00870648
Views:
17
Hi Don,

It's a very convoluted formula to correctly determine which Report Bands that Report Objects are located in. I spent a lot of hours building test reports to create a mathematical formula to fugure out how to locate the Report Objects in the correct Report Band. I never understood why the objects weren't simply flagged as to what band they were located in in the FRX itself. But, the FRX dates back to the FoxPro DOS days. By reverse engineering, you can determine the actual band height calculation that VFP uses by sizing the Page Header to 0 and then placing a Line and a Report Expression object at the top of a Detail Band and then browse the FRX looking at the VPOS of those objects. You will see that the VPOS of the line is 2083.333 and the VPOS of the Report Expression is 1979.167.

Why aren't they the same? Well, the VPOS of the Report Expression has the line thickness of the bounding box accounted for in its value. The line object does not. The Report Expression object is the only object that has this adjusted value. Another important thing to note is that there is a fudge factor for ever 3 bands encountered in the report that must be accounted for as well.

You can see this code in the VCX of my Report Engine in the BETA download. The methods used in the Report Engine to locate objects are called LOCATEBANDS and FRXFUDGEFACTOR in the MINDSEYEREPORTENGINE CLASS of the MINDSEYEREPORTENGINE CLASS LIBRARY. The FRXFUDGEFACTOR method is used to add in a compensation depending on the Total Band count encountered so far in the report. I am not sure if it has ever been corrected in FRX2WORD, but the original code did not correctly handle reports with a large number of GROUP BANDS. Therefore, the use of the 1979.167 value without any Band Count compensation only works up to so many bands and then begins locating objects in the wrong bands. You should use 2083.333 for the band separator height and then compensate for the number of bands.

Hopefully, this explanation will save you some time!


When I am looking at the report form file how do I know (how does foxpro know) which records in the FRX file (which fields in the reports) are in the detail band?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform