This is a sub object to print from htmlserver. All commands are buffering in the current session.
Attention!
It is not possible to use the shtml=print object in a asynchronous script. To print from asynchronous and synchronous script it is recommended to use the ue_htmlprint object. The object does not support all properties of ue_htmlserver, yet. Notice the hint in the method documentation on the bottom.
#define ls_script
// ... some other logic ....
destroy=shtmlprint
declare=shtmlprint=ue_htmlprint
shtmlprint=init=<is_requestid>=<ls_programid>=<ls_window>=<ls_location>
shtmlprint=title=<t=Wareneingang>
shtmlprint=set=docentry=<e_docentry>
shtmlprint=send2printer
destroy=shtmlprint
#end
setvar=ls_programid=<shtml.program.id>
setvar=ls_window=<shtml.currentpage>
setvar=ls_location=<shtml.location_id>
// send to common-interface or execute direclty... 30.1.14 M.Heigl
shtml=send2common=<ls_script>
if <shtml.asynchron> = 1 then
setvar=e_docnum=will be created
else
if <e_docentry> n<= 0 then
return failure
end if
end if
This is a simple way for simple Prints, example Labels. For Prints with only 1 Line.
beas can create this Reports very fast
1. Generate in WEBAPPS-Window-Definition a new Objet "RichText", Example with name "itempreport"
2. Insert RTF-Text, Placeholder with "<itemcode>"
3. Create Request-Object "print"
print=set=itemcode=<col_itemcode>
print=send2printer=itemreport
4. Create a call for this request
in a SQL-Table with Parameter requesttype=print&col_itemcode=&@sqltable.itemcode@
For Lists and complex Formulars
1. Generate a Crystal-Formular, example "itemreport"
2. Create Request-Object "print"
print=set=itemcode=<col_itemcode>
print=send2printer=itemreport.rpt
with "rpt" in the filename beas will search for Crystal-Report
You can replay all Prints with getprintsession(id)
set=variablename=value |
set a variable. This variable will be send to the report (send command printobject=setvar=variablename=value) Example: shmtl=print=set=itemcode=<col_itemcode>
available on ue_htmlprint |
setlist=var1,var2=..,var3.. |
set more then one Variable to the printobjectsystem If you only transfer the Variable, then set only the Variablename Example: Transfer Variable shtml=print=setlist=col_itemcode,col_batchnum Transfer with other Name shtml=print=setlist=itemcode=col_itemcode,batchnum=col_batchnum Or with Placeolder shtml=print=setlist=docdate=<today> or Mix-Modem shtml=print=set=itemcode=col_itemcode,docentry=e_docentry,col_batchnum,col_whscode,col_date=<today> |
setcommand=command |
send a command to the printer-object example: set the language shtml=print=setcommand=setlanguage=D see Object printobject |
reportname=<rpt-file> |
set the report-file-name example: shmtl=print=reportname=myfile.rpt Info: you can set the file-name directy with send2printer() |
title=<title> |
set the title for the report you need this for repeat the Print
available on ue_htmlprint |
send2printer=[<reportname>] |
send the report to printer you need for the session a station-id and location-id and a printer-driver-definition in the location you must set the parameter and title and optional the report-name example: shtml=print=set=itemode=A1004 shtml=print=title=Item Info A1004 shtml=print=send2printer=iteminfo.prt
xxxx.rpt => Crystal-Report xxxx => the RichText-Object (right Object-List) as RTF standard => the Report from "RTF Default"
if reportname is empty, then beas don't print in the Standard. But the User can define a Report in the APP-Setup. The Setup have allways a higher Prior. Please create allways in the "RTF Default" - Page from the APP-Window and insert all aviable Parameters.
available on ue_htmlprint |
nextprint |
command to initiale a secont report // .. genereate first report shtml=print=nextprint // .. generate second report
|
getprintsession=<id> |
set the printsession to the current session the command need the printsession-id then you can print Example: repeate the last Print shtml=print=getprintsession=1 shtml=print=send2printer
|
deletesession=[<session_id>] |
Delete all Printsession for this Web-Session Example: delete all print-Sessions for current session shtml=print=deletesession
|
getprintlist [=command] |
Get the last Print-Id as Name + Link as table Only the last 10 from current Session Example ? <table> shtml=print=getprintlist ? </table>
You can set the command, if user click on the Print-Session-Name If the command is empty, beas use page=[the current page]&requesttype=replayprint&col_printid=
You need a request with the name "replayprint" in this request you can replay the print with shtml=print=getprintsession=<col_printid> shtml=print=sendtoprinter |