Quick follow up question regarding printing.
Currently I'm able to print by using a Memory form 'Save' button renamed for printing. My implementation is;
1) define the .pdf name in the ValidateUpdate Start embed;
!!! Define PDF name, call report !
p_web.ssv('MyPDFName','$$$' & format(random(1,99999),@n05) & '.pdf')
reportpage = '\web\reports\' & p_web.gsv('MyPDFName') ! $$$test.pdf'
reporturl = LongPath() & reportpage
p_web.ssv('reportlink','Click to Open Report')
p_web.ssv('reporturl',clip(sub(p_web.requestReferer,1,instring('BacklogDisplayForm',p_web.requestReferer,1,1)-1) & 'reports/' & p_web.gsv('MyPDFName')))
if exists(reporturl) then remove(reporturl).
!!! call Source Coded Report Here---pass pdf filename.
bkl_report('Summary',p_web.gsv('MyDealerNumber'),p_web.gsv('MyPDFName'))
2) Set the NetWebForm 'Save' button destination to be 'ViewReport' on a blank target..
So far so good. Next step is to print a 'row related' report directly from a button in a browse. My 5 hour failed saga today in extending the above ability to a button in a row has been a frustrating experience to say the least. I simply need to understand how to call a report (netwebpage on a blank frame with a passed pdf name) from a button (preferable the std 'print' button) and have the ability when the button is pressed to capture the row info, call a source procedure to generate the pdf and finally display the pdf by calling the ViewReport page.
So, In a NetWebBrowse, is their embed point (or points!) for a 'std' print button so that I can;
a) Set my Session Variables with the row info I need. (Following currently in the 'User Clicked on a Row' embed.)
ie.
do OpenFilesB ! Set session variables for filter on next screen..
b_trk:ulinky = p_web.GSV('b_trk:ulinky')
myresult# = p_web._GetFile(b_trk,b_trk:ulinky_key)
p_web.ssv('MyTruckCode',b_trk:trk_cde)
p_web.ssv('MyShipDate',b_trk:trk_dte)
do ClosefilesB
b) Generate the .pdf name with the following... (tried in EIP embed...but it fires AFTER the 'on click' URL calls for std and other buttons in a browse)
p_web.ssv('MyPDFName','$$$' & format(random(1,99999),@n05) & '.pdf')
reportpage = '\web\reports\' & p_web.gsv('MyPDFName') ! $$$test.pdf'
reporturl = LongPath() & reportpage
p_web.ssv('reportlink','Click to Open Report')
p_web.ssv('reporturl',clip(sub(p_web.requestReferer,1,instring('ShippingDisplay',p_web.requestReferer,1,1)-1) & 'reports/' & p_web.gsv('MyPDFName')))
if exists(reporturl) then remove(reporturl).
b) Call the source procedure that generates the pdf for display. This is not a web enabled page.
myreport((p_web.gsv('MyTruckDate')',p_web.gsv('MyTruckCode'),p_web.gsv('MyPDFName'))
c) Finally call the ViewReport procedure on a blank frame?
?? (Not sure where to put this! Tried the 'on clicked' embed, but can't get data filled in before it calls ViewReport.))
I know there is a simple answer and thx in advance for your help!