-1

I have a question about datawindow type LABEL. Customer want print label from position. And PowerBuilder 11.5 have problem with rectangle object and worse with bitmap object.

More on images in link. Any way to correct it? a link[1]

1 Answers1

0

You may conditionally display your bitmap by creating a computed field similar to this:

bitmap( if( typ_čárového_kódu = "EAN 128", "mamut.bmp", "" ) )

Don't forget to size the computed field with the same dimensions as mamut.bmp.

Eric Glenn
  • 389
  • 2
  • 12
  • Works great, thanks! Is any solution for rectangle and line ? – J. Oukropec Sep 29 '17 at 07:31
  • Select the line or box. Click formula box near the VISIBLE property in the datawindow painter. In the formula box: if( typ_čárového_kódu = "EAN 128", 1, 0 ) This will make the line or rectangle visible if the code = "EAN 128" Please click the up arrow if my answer was useful. – Eric Glenn Oct 18 '17 at 18:35
  • Hi Eric, thanks for your tip. Is correct, but not in case when datawindow is label ( processing=2 ). In this case VISIBLE property is not visible and PB 11.5 IMHO evaluate line and rectangle each "label row", not each "getrow()" . Instead of 'compute' - 'compute' is evaluating each 'getrow()'. – J. Oukropec Oct 20 '17 at 06:39
  • And sorry - I have not enough reputation for 'up arrow' your answer. But tip with bitmap in computed was very useful for me. – J. Oukropec Oct 20 '17 at 06:46
  • I found that the first label on the sheet defines the attributes for the rest of the labels on the sheet. For example, I made the rectangle brush color = if(typ_čárového_kódu = "EAN 128", 0, rgb( 255, 255, 255 ) ) If the first label on the page is "EAN 128" then all the rest of the labels on the page have black rectangles. For my excercise, I setfilter ('typ_čárového_kódu = "EAN 128"'); filter(); then printed then setfilter( 'typ_čárového_kódu <> "EAN 128"' ); filter(); then printed. There are a lot of wasted labels but I got it to work. – Eric Glenn Oct 20 '17 at 17:30