« Back

Show image with warn01 symbol

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Show image with warn01 symbol
community graphrep documentation
Answer
27/03/14 12:08
I've define a GRAPHREP which uses a Bitmap image. The next lines show the code I've written:
 1GRAPHREP sizing:keep-aspect-ratio[color=#000000][/color]
 2SHADOW off
 3PEN color:black
 4SET filename: ("db:\\espacioIndoor.jpg")
 5BITMAPINFO (filename)
 6BITMAP (filename) w: (bmpwidth / 200 * 2.54cm) h: (bmpheight / 200 * 2.54cm)
 7FONT "Calibri" h:10pt bold
 8ATTR "Nombre" y:3.3cm w:c h:c x:1.5cm
 9
10IF (_mandatoryerr) {
11     EXECUTE internal:warn01 x:0cm y:1cm w:1cm h:1cm
12}



The problem is on the way the image shows itself. If the class has any attribute that is set as mandatory and it hasn't a value, it shows only the warn01 symbol but not the image. 
The image appears when I complete all mandatory attributes because the warn01 symbol disappears 

 I want the image to appear unless its mandatory attributes have not a value setted (I mean I want show the image with the warn01 symbol).

RE: Show image with warn01 symbol
graphrep mandatory mandatoryerr
Answer
10/01/14 07:30 as a reply to Anonymous.
The internal warn symbol prodiuces a problem when used in conjunction with the BITMAP statement. We are working on an update of the platform to fix this issue. In the meantime, I recommend you design your own warning sign in the "IF (_mandatoryerr)" statement.

Please find attached a sample implementation as an ABL library.

1IF (_mandatoryerr) {
2    FILL color: yellow
3    PEN w:3pt join:round
4    POLYGON 3 x1:-1.25cm y1:0.5cm x2:-0.25cm y2:0.5cm x3:-0.75cm y3:-0.4cm
5    FONT h:20pt bold
6    TEXT "!" x:-0.85cm y:-0.2cm
7}