POST

This send a Print request to the common service.

This command don't print the document directly. Beas Common Service must be active.

 

WEB Service

if StationId, LocationId, ProgramId, AppId or PersnnellId not defined, the system will use the current information (example from current web session

If AppId is defined, the system take the print information defined in app settings and overwrite all own definitions.

 

Note: if you want to print from backend, then don't use this PrintService, because this is only a service to send the command over CommonService

 

// Print document over BeasCommon Service
post PrintService
{
"Title" : "Workorder",
 "PrintType" : "Crystal",
 "ReportName":"workorder.rpt",

 "AppId":"", // overwrite app id
 "Parameter":{"Auftrags-Nr:":6002142,"belpos_id_von":10,"belpos_id_bis":10 } 
}
// Get current Status
get PrintRequest?$select=PrintRequest,Title&$filter=SessionId eq CurrentSessoinId

 

beasscript-logo-small

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 } 

}

 

hmtoggle_plus1Additional Properties of Parameter "Property"

 

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

 

Note: If you want to print over webapp, the system will use the default printer defined in location settings

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