Print
by template, as the name suggests, is to set up a template in which we write
labels that the software recognizes, so as to enable the software to replace
these labels with values we need. Here we give an example to see how to set
labels in a part print template.
How to print simple field?
This
is a very simple excel template to print part information: (please note that only
xls format is acceptable in excel template, not xlsx format)
Printing
preview as follow (red frame):
In the above template, {#PartVO.pk.partNumber} stands for
part number, {#PartVO.pk.partType} stands for part type, so as to other fields.
It is easy to find out that the label format is written as {#ValueObject.field},
therefore, 2BizBox will automatically recognize context in this format as a label to-be-analyzed. Here ValueObject (hereinafter
referred to as VO) stands for some object, e.g. PartVO stands for Part Object
and field stands for a value of this object.
Please note: 1. you must put
English characters in the label {#} only; 2. {#ValueObject.field} is case sensitive,
e.g. the system will report error if you write PartVO.pk.partType as partVO.pk.partType
or PartVO.PK.partType.
By now we finish a simple print
template. Following we provide you a list of commonly used field for part.
VO
Field
|
Corresponding
Property
|
PartVO.pk.partNumber
|
Part
Number
|
PartVO.pk.partType
|
Part
Type
|
PartVO.modelNumber
|
Model
Number
|
PartVO.description
|
Part
Description
|
PartVO.buyerCode
|
Buyer
Code
|
PartVO.commodityCode
|
Commodity
Code
|
PartVO.productCode
|
Product
Code
|
PartVO.makeBuy
|
Part
Nature: make or buy
|
PartVO.saleable
|
Saleable
|
PartVO.traceable
|
Traceable
|
PartVO.revision
|
Revision
|
PartVO.revisionDate
|
Revision
Date
|
PartVO.shippingWeight
|
Shipping
Weight
|
PartVO.shippingWeightUnit
|
Unit
of Shipping Weight
|
PartVO.partUnit
|
Part
Unit
|
PartVO.comment
|
Comment
|
PartVO.partInventory.onhand
|
Part
Inventory on hand
|
PartVO.partInventory.onOrderQty
|
Quantity
of Part Inventory on order
|
PartVO.partInventory.onDemandQty
|
Quantity
of Part Inventory on demand
|
Comment:
the above listed properties are not complete.
Sometimes a VO contains set, e.g. a
part is described in multiple languages, has multiple vendors and manufacturers;
a sales order contains several items. Here we provide an example of printing
the part vendor. The interface shows a table of the vendor’s information.
So
we will also print out a table. The print template is set as follow:
First
we define a table, use {#table_start} to define the
table start and {#table_end} to define table end. In the start label, “data:”
defines the corresponding set, “headrows” stands for lines
occupied by the table head.
In
the above example, Line 1 and 2 defines a table head, Line 3 defines the data
line and Line 4 defines another data line. We do not need to add prefix VO in
labels of Line 3 and 4 because the software itself recognizes the corresponding
VO. In this case, it stands for PartVendorVO.
We
get the printing as follow:
In
the table we see the printing effect: Line 1 and 2 shows the defined table head,
Line 3 and 4 shows data of the part vendor, and Line 5 and 6 shows another item
of part vendor.
Collection
SET
|
Corresponding
Property
|
Corresponding
VO for Collection SET
|
PartVO.vendors
|
Part
Vendors
|
PartVendorVO
|
PartVO.manufacturers
|
Part
Manufacturers
|
PartManufacturerVO
|
PartVO.multiLanguage
|
Part
Multi-language Decscriptions
|
PartDescriptionVO
|
I used print templates during my son's birthday celebration as an invitation.
ReplyDelete