Controls printing via Crystal Viewer
Property |
CR 11 |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
crreport |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
makrostart |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
silent=true |
set to silent-mode. beas disable the report-list and print always the first report. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
makroprinterdriver |
if you wan't an spezial printer for this makro-printjob, you can set this with makroprintdriver printobject=makroprinterdriver=[printername][char 9][drivername][char 9][portname] printobject=makrostart=... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
makroexport=xx |
export one makrosetting to string (beas-string-format) return in Variable "value" printobject=makroexport=<makroid-nr> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
makroimport=xx |
import one makrosetting from string in a new makro-entry xx = "clipboard" (string from clipboard) xx = variable-name (string is in variable xx) xx = makro-definition-string (xx longer then 100 signs .. printobject=makroimport=xx |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
connect |
x |
connects to the crystal engine. Permitted objects: Crystal 11 and 12 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disconnect |
x |
disconnects from the crystal engine Crystal 11 and 12 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
openreport |
opens rpt-file |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
connectioninfo |
x |
connects the report to the current database. if the prefix of a text-object is "@": the content gets interpreted. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
selectprinter |
selects the printer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parameter |
x |
starts argument checking (automatically within "print") and passes the BEAS variables on to the report. Gets suppressed if the variable "parameterrequest" is "N". Note: This is only working, if the system use the old viewer "crystal 11" Default is the new SAP Crystal viewer |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paremater_set |
x |
Only for Crystal 11: set the parameter (setting with parameter or setvar) to the current report. call after parameter and before crreport.export.
printobject=openreport=<myfile.prt> printobject=connectioninfo printobject=setvar=[argument]=<value> printobject=parameter_set printobject=crreport=printout |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
setvar |
sets a report-variable |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getvar |
gets a variable and writes it to <wert1> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
setreset |
deletes all variables |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
setlanguage |
set the language to printout the report printobject=setlanguage=E |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
settext |
x |
set a textobject in the report |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
gettext |
x |
get a textobject from the current report in value <value> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wait_for_crystal |
x |
beas stop the script while crystal is printing the last report for ll_mytest=1 to 5 printobject=crreport=printout printobject=wait_for_crystal end if Note: You need this only, if you use old Crystal 11 viewer. |
Example Video
Create Label for each line from a sap b1 receipt document
printobject=openreport=myreport.rpt printobject=connectioninfo // Define parameter printobject=setvar=myparam1=<paramvalue1> printobject=setvar=myparam2=<paramvalue2> printobject=parameter_set // set printer (exact that name, which is defined in the Windows printer definitions) tools=printer=getdriversport=name printobject=crreport=selectprinter=<value_printerdriver>=<value_printername>=<value_printerport> // and print out printobject=crreport=printout
|
// open the report printobject=openreport=<myfile.prt> // define all parameters printobject=setvar=myparam1=<paramvalue1> printobject=setvar=myparam2=<paramvalue2> printobject=parameter // Define count of copies (need beas 9.3 PL 3 HF 1 or newer) printobject=copies=2 // Write parameters printobject=parameter_set // Print out printobject=crreport=printout
|
// load report from variable "filename" printobject=openreport=<filename> // set connection to the current database printobject=connectioninfo // call parameter-window printobject=parameter // set the parameter to the formular printobject=parameter_set // and save (export with question about format) printobject=crreport=exportoption=destinationtype=disk printobject=crreport=exportoption=diskfilename=c:\temp\myreport.pdf printobject=crreport=exportoption=formattype=pdf printobject=crreport=export=true // and select printer tools=printer=getdriversport=hpoffice printobject=crreport=selectprinter=<value_printerdriver>=<value_printername>=<value_printerport> // and print out printobject=crreport=printout |