Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Problem with WMF files

edited May 2002 in General
I have a report that has a ppDBImage, and I use the following code to set
things up for the image, and it works fine for everything apart from a WMF
file, when I simply get an "Invalid Image" error.

Q1) Am I doing something wrong, or should RB be able to display WMF files?

Q2) Is there a way I can intercept the error message so I can give the user
some indication as to which record in the database the error occured?

Regards
Jeremy Knowles

Procedure DetailBeforePrint;

var PicType:integer;

begin

Region3.visible:=not (Assets.FieldObjects['PICTURE'].IsNull);

PicType := Assets.FieldObjects['PICTURETYPE'];

case PicType of

1: DBImage1.GraphicType:='Bitmap';

2: DBImage1.GraphicType:='Icon';

3: DBImage1.GraphicType:='Meta;

4: DBImage1.GraphicType:='JPEG';

end;

end;

Comments

  • edited May 2002
    1. The problem might be with the WMFs itself. How are they being generated?
    I've encountered a user who was having problems with WMFs generated by
    Illustrator and had to switch to another utility whose output produced valid
    results.

    2. That depends on which exception is being thrown and what the RB code does
    with it. Most exceptions are simply handled and stopped from propagating in
    which case you can't do anything when they occur. Some might be reraised in
    which case you can use a try-catch statement to catch and handle them
    yourself.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.