Apply GDI to static Report Forms

Topics: General
Apr 27, 2007 at 5:57 PM
Hello everybody,

My question is that all the samples regarding reports were using dynamically created reports.
How can I apply, per say, a Shadowed effect to an existing report text box?

Thanks in advance.
Coordinator
Jun 18, 2007 at 12:19 PM
Edited Aug 18, 2007 at 2:01 PM
lman0908,

My apologies for this post sitting here for so long without a reply. This could be accomplished using the GDIPlusX library here (or the _gdiplus.vcx included with VFP9) and the new reporting features in Visual FoxPro. Adding a drop shadow is a relatively easy thing to do in GDIPlus. I encourage you to take a look at how the Solution Sample 'Create column chart reports using GDIPlus' (specifically how the report listener's GDIPlusGraphics property is used - also look that property up in the VFP 9 help file for more information). Then go through the examples provided with the GDIPlusX library here. Once you have a handle on how to draw using GDI+ (and GDIPlusX makes this as simple as possible) you'll be able to draw just about anything you want on Visual FoxPro reports and forms.
Jun 27, 2007 at 10:19 PM
Edited Jun 27, 2007 at 10:22 PM
Hi Iman,
I repeat my apologies... I don't know how this item escaped from me...


lman0908 wrote:
My question is that all the samples regarding reports were using dynamically created reports.

Yes, I preferred to do it this way to avoid to send a separate FRX together with all other samples.
But the principles are exactly the same, instead of calling the report created on the fly, just try calling your own report, and you'll see the effects aplied to it.



lman0908 wrote:
How can I apply, per say, a Shadowed effect to an existing report text box?


Do you want to aply this effect in just one Textbox, or in many textboxes ? I'm asking this baceuse it much easier to put 2 textboxes one over the other, leaving a small distance between them to create this effect. Otherwise, you'll have to create your own report listener. GdiPlusX is the right tool for that, but you'll have to do some efforts !

In the article below, I created a Report Listener that draws Justified texts in reports. The principles are the same, instead of drawing the string just once, you'll draw each twice !

Full Justified Texts in your reports with GdiPlus X
http://weblogs.foxite.com/cesarchalom/archive/2007/04/05/3641.aspx

If you have any other questions, feel free to use this space !

Hope this helps

Regards

Cesar