Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change picture in report at runtime

Status
Not open for further replies.

nirajj

Programmer
Mar 12, 2003
103
0
0
US
I have a picture in the report but I would like to change the picture file at runtime. Any ideas how I can do that ???

Thanks
 
I found the solution !!!

Created a cursor with General field type to hold my picture.

CREATE CURSOR MyGenTbl (mygenfield G)
APPEND BLANK
APPEND GENERAL mygenfield FROM "picture.bmp"

In the report change the picture property "Picture from" to field "MyGenTbl.mygenfield"

Works great. :)

Thanks !!!!
 
Bestiutza ...Thanks to the ppl who might hv spend time to find the solution to my query or give me useful feedback..!!!
 
You can also use a public variable to store the path to the picture you want to display.

set the picture property in report designer to 'file', and use the variable name, say pix for example.
Then in your code:
public pix

pix = 'c:\yourapp\graphics\stdpic.jpg'
repo form yourform

Just change pix value to whatever the path is to the picture you want to display, before running the report.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top