[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] How to verify existence of an image file prior to executing the print-image statement



The $logo_file variable contains a simple 8.3 filename (abc.bmp) without a
path.  I am trying to check for the existence of the image file in order to
avoid the built-in message box that appears when the viewer attempts to
construct the report and can not locate the image file.
 
LET #image = EXISTS($logo_file)
IF #image = 0
    PRINT-IMAGE (1,1)
        TYPE       = bmp-file
        SOURCE     = $logo_file
        IMAGE-SIZE = (14,6)     !- changed from (10,6) to allow for
character compression
ELSE
    PRINT 'PLACE' ( 2,3,5)
    PRINT 'LOGO'  (+1,3,5)
    PRINT 'HERE'  (+1,3,5)
    GRAPHIC       ( 1,1,10) BOX 6 10
END-IF

I'm running on Win2000 and the image file is located in the Brio \BINW
folder.  The exists method returns a "2" and the logo is not printed.
However, if I remove the exists check and execute the print-image statement,
the image file is printed on the report.  Do the exists and print-image
statements use different path resolution logic?  If so, How can I check for
the existence of the image file prior to executing the print-image
statement.
 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users