Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Can I insert image in Report
Message
 
To
08/12/2004 11:21:46
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP SP1
Network:
Novell 4.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00967774
Message ID:
00967824
Views:
7
>1. How can I insert image in report. I have generated a supplier report, in which near the country field I want to insert country flag. The flag images is saved in d:\vfas\pictures\world\flag. I saved almost all the countries flag in that directory with its country name.

Add a picture to the report and in the "File" field, enter an expression that evaluates to the file name you want to print. For example, if you have a field called COUNTRY which has "USA" in it and the JPG is "USA.JPG", the expression would be:

("D:\vfas\pictures\world\flag\" + ALLTRIM(COUNTRY) + ".JPG")

Of course, I wouldn't recommend hard-coding the path and would use a variable instead, but at least this shows you how to do it.


>2. Before displaying this Supplier Report, I just wanted to put a form in which it should ask the user whether he wants to display all records or a particular record. How can I do so. I have generated a form but I want to attached with report, i.e. if I click on report the form should display first. How can I do so. Please suggest.

Run the Form instead of the report from your menu or some button. Inside of your form, have a button that runs the report. As far as limiting the report to one or all, you could do it a few ways. If you build a cursor to run the report, just build it with one record. If you are printing directly from the table you could SEEK to the record and then use this to run the report:

REPORT FORM MyReport NEXT 1 TO PRINTER PROMPT PREVIEW
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform