Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Zooming/Scaling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00933455
Message ID:
00933642
Vues:
15
Hello Cathy.

Seems that i still have a problem. after trying several different scenarious, i can not get this to calculate correctly. an example i've been testing is as follows:

the PageHeader shows in the report table with a height of 9532.000. if i add the "band height" to it this would calculate as follows:
6532.000
+2083.333

=11615.333

the 1st object after the band seperator is a label (showing in the report writer at position 0,0 in the group header). in the table this is specified with a vpos of 11562.500. as you can see this does not match taking a 'band-height' of 2083.333.

what am i doing wrong? thanks for your help!


>Most likely, the slight problems you are having with vertical positions have to do with the height of the gray bar that defines a band. It is included in all the calculations for vertical position. This height is a fixed 2083.333 FRUs, so if you are applying a straight 75% to the VPOS fields, this gets messed up. You would have to minus out 2083.333 and then apply the 75% to the remaining number, and then add the 2083.333 back in. This magic number applies to each band, so as you work your way down the report, and through additional bands, you will have to account for additional magic numbers of 2083.333.
>
>Cathy
>
>>Hello everybody.
>>
>>after my attemp in thread Re: Scale=? in expr field Thread #933256 Message #933358, to find a simple way to scale a report printout, turned to a nonworking solution, i am now trying something different in order to scale / zoom a printout of a report form.
>>
>>To Start i am working with Vfp 6 SP 5. The reports forms are created in Vfp 2.5 and are converted at runtime when needed into vfp 6 reports. i process the new report form in order to fix some alignemnt and font problems created though the conversion proccess.
>>
>>now, some of my reports are too wide to fit on a letter size (even legal sized) paper - so i need to scale them down. so far i have the following, which works actually supprisingly well:
>>LPARA ;
>>	ReportDbfName, ;
>>	ScaleFactor
>>LOCAL ;
>>	OldSelect
>>
>>OldSelect	= SELECT()
>>IF ScaleFactor > 1
>>	* *** convert 75% to .75
>>	ScaleFactor	= ScaleFactor/100
>>ENDIF
>>
>>SELE 0
>>USE (ReportDbfName) ALIAS _Report AGAIN
>>
>>SCAN
>>	* *** adjust font size
>>	IF _Report.FONTSIZE > 0
>>		REPL ;
>>			_Report.FONTSIZE WITH _Report.FONTSIZE - (_Report.FONTSIZE * ScaleFactor)
>>	ENDIF
>>
>>	* *** adjust top position 'VPos'
>>	IF _Report.VPos <> 0
>>		REPL ;
>>			_Report.VPos WITH _Report.VPos - (_Report.VPos * ScaleFactor)
>>	ENDIF
>>
>>	* *** adjust left position 'HPos'
>>	IF _Report.HPos <> 0
>>		REPL ;
>>			_Report.HPos WITH _Report.HPos - (_Report.HPos * ScaleFactor)
>>	ENDIF
>>
>>	* *** adjust height (this is also the line width on horizontal lines)
>>	IF _Report.HEIGHT > 0
>>		REPL ;
>>			_Report.HEIGHT WITH _Report.HEIGHT - (_Report.HEIGHT * ScaleFactor)
>>	ENDIF
>>
>>	* *** adjust width (this is also the line width on vertical lines)
>>	IF _Report.WIDTH > 0
>>		REPL ;
>>			_Report.WIDTH WITH _Report.WIDTH - (_Report.WIDTH * ScaleFactor)
>>	ENDIF
>>	
>>ENDSCAN
>>
>>
>>USE IN _Report
>>SELECT(OldSelect)
>>
>>
>>this alligns text and lines good enough for my purposes. however, it does recalculate group/band height not correctly and because of that some of the results are not placed in the correct position (hight-wise).
>>
>>am i missing something or do i need to approach this differently? maybe somebody has done something like this alreadty, or has some ideas what i could try.
>>
>>any suggestion is welcome! thank you for all your help in advance!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform