How to print beans/images?

Hi all!
Need your help again.

My solution needs to be able to print a graph rendered on the HTML bean. I did a search on the forum and was given a suggestion to first push it out to a .jpg first then print the jpg using label techique.

http://forum.servoy.com/viewtopic.php?t … ight=print

However, i still can’t get it to work.

  1. I prefer to just print the bean without any workarounds.

  2. Just so i can get it working in time, i wouldn’t mind the jpg technique except i can’t even get it to work. I’m able to export the picture to a jpg on the c drive using this command: “elements.labeltest.setImageURL(“file:///C:/fwspc.png”);”

When i trigger the above code, the picture shows up on my solution.

however, When i go to print preview mode, the first problem is that it says i’m trying to print too many records( i made a layout using the same dataprovider on the same table as my data). Then i tried just creating a temp table with no records or 1 record, still won’t work. The print preview just comes up blank EVEN tho the picture shows up in browse mode.

Please help. this seems so simple yet i’ve spent much time on it already. there’s gotta be a way

thanks

look at the function:application.createJPGimage (out of myhead)
look at the sample-code.
that will do the trick.

HJK:
look at the function:application.createJPGimage (out of myhead)
look at the sample-code.
that will do the trick.

I could get the bean to create an image (jpg) file. I could even get the image to be placed into a label using the "“elements.labeltest.setImageURL(“file:///C:/fwspc.png”);” "

command. But i can’t seem to print the label? i’m sure there are others out there who’s run into this problem before?

Put it in a global, or in column (blob)
Than printing is no issue!

awesome! works now. thanks for your help guys!