Create and Manage print request over BeasCommonService
Allow WEB APP related print requests on server side and managing of session related print requests
Or start Print service over beas common service from desktop application
Note:
This command create only an entry in beas common service and don't execute the report self .
The report will be created always on the server, on which the beas common service is running.
Only Network printer supported.
See beas common service concept
PrintService
Property
Description
Table
BEAS_COMMON_INPUT
Primary key
SessionId/c,PrintRequest/i
$transaction
no
$branch
no
$mask
no
Fields
Name
Type
Description
SessionId
Edm.String(50)
Database: "BEAS_COMMON_INPUT"."SESSION_ID"
PrintRequest
Edm.Int32
Return the Id of current Session
Example:
Get only all informations from current Session
PrintService?$select=Title,PrintRequest&$filter=SessionID eq CurrentSessionId
Database: "BEAS_COMMON_INPUT"."COUNTID"
Active
Edm.Boolean
Database: case when coalesce("BEAS_COMMON_INPUT"."Closed",0)=0 then 1 else 0 end
Title
Edm.String(50)
Database: "BEAS_COMMON_INPUT"."PARAMETER2"
PrintType
Edm.String(1)
Database: "BEAS_COMMON_INPUT"."PARAMETER3"
ReportName
Edm.String(255)
Name of Crystal Report.
If Report saved in Beas Project folder, you don't need to define the folder
If saved in another folder, please define the folder name too in windows Format:
Example: "ReportName":"c:\\MyReports\\MyReport.rpt"
Database: "BEAS_COMMON_INPUT"."PARAMETER1"
Text
Edm.String(16000)
Database: "BEAS_COMMON_INPUT"."PARAMETER9"
PreScript
Edm.String(16000)
Database: "BEAS_COMMON_INPUT"."TEXTPARAMETER"
Parameter
Edm.String(1024)
Database: "BEAS_COMMON_INPUT"."PARAMETER8"
NumberOfCopies
Edm.String(4)
Database: coalesce("BEAS_COMMON_INPUT"."PARAMETER4",'1')
StationId
Edm.String(50)
Database: "BEAS_COMMON_INPUT"."STATIONNAME"
LocationId
Edm.String(30)
Print for which location
In Station -> Location You can define the printer, which used for this location
Note: The beas commen service will print the document. On the computer, on which the service is running, must have installed printer service for this printer.
Database: "BEAS_COMMON_INPUT"."LOCATION_ID"
ProgramId
Edm.String(20)
Togehter with AppId you can define, which App settings have to use for the printing
If ProgramId and AppId is defined, you don't need to define the report information, because the system will use the inforamtion from the App setup
Database: "BEAS_COMMON_INPUT"."PROGRAM_ID"
AppId
Edm.String(50)
Printed by App Id - see ProgramId
Database: "BEAS_COMMON_INPUT"."WINDOWNAME"
PersonnelId
Edm.String(20)
Database: "BEAS_COMMON_INPUT"."PERS_ID"
TimeLife
Edm.DateTimeOffset
Database: "BEAS_COMMON_INPUT"."TimeLife"
Functions
Function
Parameter
Description
Reopen
PrintRequest/i
Post:
WEB Service
if StationId, LocationId, ProgramId, AppId or PersnnellId not defined, the system will use the current information (example from current web session)
// Print document over BeasCommon Service
post PrintService
{
"Title" : "Workorder" ,
"PrintType" : "Crystal" ,
"ReportName" : "workorder.rpt" ,
"Parameter" :{ "Auftrags-Nr:" : 6002142 , "belpos_id_von" : 10 , "belpos_id_bis" : 10 }
}
// Get current Status
get PrintRequest ? $ select = PrintRequest , Title & $filter = SessionId eq CurrentSessoinId
Note: The system use BeasCommon system. The Server, on which BeasCommon service is running, will print the document, not the client
instance bsl b
b . post = PrintService ={&
"Title" : "WorkOrder" ,&
"PrintType" : "Crystal" ,&
"ReportName" : "workorder.rpt" ,&
"Parameter" :{ "Auftrags-Nr:" : 6002142 , "belpos_id_von" : 10 , "belpos_id_bis" : 10 }
}
For Crystal report you can define additional Print Defintion with keyword crreport
{ "ReportName" : "MyReport" ,
"Parameter" :
{ "crreport" : "exportoptions=exportformat=pdf" }
}
List of all Properties
Properties
Property
Description
exportoptions
Property
only CR11
Description
applicationfilename
x
set the application-filename for the print job
charfielddelimiter
x
charstringdelimiter
x
destinationtype
x
follow values are aviable:
application
disk
mail
mailvim
lodusdomino
microsoftexchange
nodestination
please do not work with this property.We don't check this with be.as.
diskfilename
if export to file: the filename
formattype
describe the format of the file
charseparatedvalues
crystalreport
textrichtext
excel
html40
noformat
pdf
tabseparatedtext
text
wordforwindows
xml
For Crystal 11
commaseparatedvalues
crystalreport70
datainterchange
textrichttext
excel50
excel50tabular
excel70
excel70tabula
excel80
excel80tabular
excel97
explorer32exted
html32standard
html40
lotus123wk1
lotus123wk3
lotus123wks
odbc
paginatedtext
recordstyle
reportdefinition
tabseparatedvalues
pdfexportallpages
x
true/false
pdffirstpagenumber
x
n
pdflastpagenumber
x
n
frompage
define first page for print (not Crystal 11)
topage
define last page for print (not Crystal 11)
printobject = crreport = exportoption =< parameters >
export
save/export the report
true =popup window for question format and application
false =export direct with the current settings
return: Variable return=1 ok, -1=error
printout
print the document
return: Variable return=1 ok, -1=error
saveas=<filename>
save the document in crystal 8 Format
selectprinter=driver
set the current Printer
printobject = crreport = selectprinter =[ printerdriver ]=[ printername ]=[ port }
You need only the printer name
Short Syntax is
printobject = crreport = selectprinter ==[ printername ]
Example
printobject = crreport = selectprinter == hp office
more info see printer
copies
Define count of copies
printobject = crreport = copies = 3
printobject = crreport = printout
Print-Properties
Property
Description
papersize=x
Example
printobject=crreport=papersize=x
Default Paper Size=0
Paper 10x14=16
Paper 11x17=17
Paper A3=8
Paper A4=9
Paper A4 small=10
Paper A5=11
Paper B4=12
Paper B5=13
Paper C Sheet=24
Paper D Sheet=25
Paper Envelope 10=20
Paper Envelope 11=21
Paper Envelope 12=22
Paper Envelope 14=23
Paper Envelope 9=19
Paper Envelope B4=33
Paper Envelope B5=34
Paper Envelope B6=35
Paper Envelope C3=29
Paper Envelope C4=30
Paper Envelope C5=28
Paper Envelope C6=32
Paper Envelope DL=27
Paper Envelope Italy=36
Paper Envelope Monarch=37
Paper Envelope Personal=38
Paper E Sheet=26
Paper Executive=7
Paper Fanfold Legal German=41
Paper Fanfold Std German=40
Paper Fanfold US=39
Paper Folio=14
Paper Ledger=4
Paper Legal=5
Paper Letter=1
Paper Letter Small=2
Paper Note=18
Paper Quarto=15
Paper Statement=6
Paper Tabloid=3
Paper User=256
papersource=x
Default=0
Bin Cassette=14
Bin Envelope=5
Bin Env Manual=6
Bin Form Source=15
Bin Large Capacity=11
Bin Large Format=10
Bin Lower=2
Bin Manual=4
Bin Middle=3
Bin Small Format=9
Bin Tractor=8
Bin Upper=1
Automatic=7
leftmargin=x
set left margin
topmargin=x
set top margin
bttommargin=x
set bottom margin
rightmargin=x
set right margin
paperorientation=x
set paper orientation
Default=0
Landscape=2
Portrait=1
duplex=x
set duplex
Default=0
Normal (nonduplex) printing=1
Short-edge binding (the longer edge of the page is horizontal)=2
Long-edge binding (the longer edge of the page is vertical)=3
papersizewidth
Define Paper size width
papersizeheight
Define Paper size height