There are 2 VI class methods which should help you, Get Panel Image and Print VI to HTML. You can use them by placing an Invoke Node on the BD and changing the class to VI. You may find it easier to take the code which exists in the report VIs, it already does the stuff for you.
___________________
Try to take over the world!