I'm trying to add a Print menu item to my m_menu object in a project using PowerBuilder 7.0.
I seem to have tried everything I could find on printing in the way of functions in the help and the online books.
I have only a few windows(sheets) in this project, but I wish to have the user be able to click on File | Print and have PB print out the active datawindow control with its associated data object. It seems it should be straightforward enough, but I haven't found this to be the case. To make matters more difficult, one of the sheets has 2 datawindow controls on it, 'dw_master' and 'dw_detail'.
I have tried to code the script behind the Print menu as:
Determine which is the active sheet using the PB function GetActiveSheet().
Choose Case w_activeSheet // datatype window
//dw_master is a datawindow control which was actually
//created on an ancester sheet named w_base
the compiler did not like this at all. One should be able
to determine which data one has based upon the sheet it's in.
I even tried using the PrintOpen with PrintClose. Nothing seems to work here.