Help - Search - Members - Calendar
Full Version: how to display the picture
Fast Reports forum > Fast Reports Products > FastReport 3.0
putukaca
hi i have some data in a table, it's name Product. it's contain some data like this:

code picture
A1 C:\A1.jpg
A2 C:\A2.jpg
...etc.

field picture just contain path of picture location not a blob. how can i show in fast report which contain code of product and it's picture? help me

thank's
yudi
gordk
use the obp event of the pictureview and write code using the loadfromfile method
IIRC picture1.picture.loadfromfile('path&filename');
putukaca
thank's for the replay but i still not understand to fill Path&filename in picture1.picture.loadfromfile('Path&file name'). this the situation:
1. table product have 2 field (as i wrote before)
2. i put a memo which contain code and picture(which load from directori) in masterdata1 band.
3. if i use picture1.picture.loadfromfile('C:\A1.jpg') in obp event of pictureview then code A1 and A2 display picture A1.jpg
4. i want like this:

if code A1 then the picture A1.jpg
if code A2 then the picture A2.jpg

or we can say every code display it's own picture. or how to fill 'path&filename' with value of picture field in table product

thank's
yudi
gordk
in th obp event test the value of the field
if <datasetname."fieldname" > = 'A1' then
picture1.picture.loadfromfile('C:\A1.jpg') else
picture1.picture.loadfromfile('C:\A2.jpg');

or if the data field contains the path & filename
picture1.picture.loadfromfile(<datasetname."fieldname" >);
putukaca
thank's it's work
geekzero
buenisimo el ejemplo, lo he implementado, ahora me queda una consulta, cuando registro no tiene foto asignada, se lanza un error, como podria manejar esta excepcion haciendo que si no existe tan solo muestre vacio el objeto picture?
gordk
no comprendo
language of group is english.
geekzero

good example, I have implemented, now I have a query, where registration is not assigned photo, an error is thrown, as it might handle this exception so that if there is not just a picture showing the object empty?
gordk
typical
in obp event of band check the size of the datafield stream if not large enough to be a picture
then modify the pictureview's properties to suit
NatalieSmith01
QUOTE(gordk @ Aug 10 2007, 04:20 AM) *
in th obp event test the value of the field
if <datasetname."fieldname" > = 'A1' then
picture1.picture.loadfromfile('C:\A1.jpg') else
picture1.picture.loadfromfile('C:\A2.jpg');

or if the data field contains the path & filename
picture1.picture.loadfromfile(<datasetname."fieldname" >);


That perfectly works for me.
Thanks a lot for your help.
Nunu
Hi,
Am new to OAF and have one question.. If I want to display the prompts against any field in the OAF page dynamically then is this feasible? What should I be looking to achieve the same.

Thanks and Regards
Jenny456
I think it's quite feasible.
Please PM me.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.