How to manage document macros
From Opera Wiki
(Difference between revisions)
Monica.Sanna (Talk | contribs) (Created page with '{{WIP}} {{BR}} <!-- Le macro sono un potente strumento messo a disposizione da Opera per la creazione dei documenti. Si tratta di stringhe di testo che iniziano e terminano con i…') |
Monica.Sanna (Talk | contribs) |
||
(6 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
{{BR}} | {{BR}} | ||
<!-- | <!-- | ||
- | + | Macros are a tool made available by Opera for creating documents. | |
- | + | These are text strings that begin and end with the characters "//" and allow you to create document templates whose fields will be generated and loaded with the real values at the time of printing. For this reason, the same document that represents a quote template can be used for all your quotes without further modifications. | |
- | + | Macros can be "simple" or "parameterized". (For example, a macro that inserts an image into the sheet might have the width and height of the image as parameters). These parameters, as we will see later, can be mandatory or optional and must be specified after the title of the macro itself, separated by ";". The order of the parameters is important, for this reason, in the following explanations they are shown in the exact order in which Opera expects to find them within the macro. When you want to omit an optional parameter, you still need to insert the ";" after the previous parameter. | |
- | + | Below are the main macros of Opera Job Management: | |
- | == | + | ==Data entry macros (text only)== |
- | + | ||
+ | * '''//Year// ''':Print the current year. | ||
- | * '''// | + | * '''//YearXX// ''': Print the last two numbers of the year in the '' Date '' field of the ''Job''. |
- | * '''// | + | * '''//JobPreview: // ''': Print the preview of the typologies within the job. |
- | :{{NOTE| | + | |
+ | :{{NOTE|Parameters: <br/> '''yes/no''': enable or not the display of the frozen typologies as well. <br/> '''base X''' ''(optional)'': the offset from the left edge of the document<br/> '''base Y''' ''(optional)'': the offset from the top edge of the document<br/> '''width ''' ''(optional)'': the width of the print area starting from the reference base X<br/> '''height''' ''(optional)'': the height of the print area starting from the reference base Y}} | ||
- | :{{NB| | + | :{{NB|Example : '''//JobPreview:no;4;;12;//'''}} |
- | * '''// | + | * '''//BuildingYard_Postcode//''': Print the postcode of the construction site city in the job data. |
- | * '''// | + | * '''//BuildingYard_City//''': Print the city of the construction site. |
- | * '''// | + | * '''//BuildingYard_Address//''': Print the address of the construction site |
- | * '''// | + | * '''//BuildingYard_Name//''': Print the name of the construction site. |
- | * '''// | + | * '''//BuildingYard_Country//''': Print the country of the construction site. |
- | * '''// | + | * '''//Client_Postcode// ''': Print the customer's city postcode. |
- | * '''// | + | * '''//Client_City// ''': Print the customer's city. |
- | * '''// | + | * '''//Client_Address// ''': Print the customer's address. |
- | * '''// | + | * '''//Client_note// ''': Prints the notes in the Job Customer Data panel if the customer is saved in the archive. |
- | * '''// | + | * '''//Client_CorporateName// ''': Print the customer's corporate name. |
- | * '''// | + | * '''//JobNo// ''': Print the sequence nu. and the year of the job in 01/2009 format. |
- | * '''// | + | * '''//Date// ''': Prints the current date in dd / mm / yyyy format. |
- | * '''// | + | * '''//FullDate// ''': Prints the current date in the format ddd nn mmmm yyyy |
- | * '''// | + | * '''//Description Typologie: // ''': Prints the description of the typologie. |
- | + | :{{NOTE| Parameters: <br/> '''Quantità caratteri''': limite massimo di caratteri della descrizione da mostrare.}} | |
- | + | ||
- | :{{NOTE| | + | |
:{{NB|Esempio : Una descrizione di 57 battute, con //DescrizioneTipologia:10// diventa da ''Finestra a due ante con ribalta ed accessori color ottone'' a ''Finestra a ...''}} | :{{NB|Esempio : Una descrizione di 57 battute, con //DescrizioneTipologia:10// diventa da ''Finestra a due ante con ribalta ed accessori color ottone'' a ''Finestra a ...''}} | ||
Latest revision as of 09:37, 18 July 2023