Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic shapes in a report
Message
De
19/02/2014 19:09:49
 
 
À
19/02/2014 08:31:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01594564
Message ID:
01594738
Vues:
95
>Hi Peter.
>
>>In vfp9 sp2 it is possible to dynamically set the Height and Width of a shape in a report. However, I also want to dynamically set the Left. Any suggestions?
>
>Check out the Dynamics tab in the Properties dialog for shapes in the Report Designer. You can dynamically set Height and Width but not Left.

Yes, that's what I wrote.

But... I've done some trial-and-error research and know what: There IS a way to set the left! I'm not sure whether it is an 'official' route, but it works. So, here comes the route.

Make a shape in the report, rightclick and go to Properties. (It must be reportbehavior 90.) Go to Other and edit 'Run-time extensions'. In the 'Execute when' field you fill in: 'RENDER' or '.T.'. In the editbox you put code like this:
LPARAMETERS toFX, toListener, tcMethodToken,;
   tP1, tP2, tP3, tP4, tP5, tP6,;
   tP7, tP8, tP9, tP10, tP11, tP12

do case
case m.tcMethodToken = 'RENDER'
	*
	tp2 = <some numerical value>

endcase

return
The 'Execute when' field is used by the reportbuilder to decide whether or not the code must be visited. In this case that will happen if the reportbuilder is about to RENDER the shape object. In case of RENDER, amongst the sent parameters are the top, left, height and width of the object. These properties can be influenced. Apparently they are sent by reference. In this case tp2 is left.

By the way, it also works for all other types of object.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform