Sunday, 10 May 2015

eText Template designing for beginers



                          eText Template

1. Generate XML from the application or concurrent program output

let us take the example of employee details
First generate the XML of the data using concurrent program output



   
now design rtf using this XML





<DEFINESEQUENCE>                                   Seq
<RESET AT LEVEL> EMPLOYEE_DETAIL
<INCREMENT BASIS> LEVEL
<START AT> 1
<END DEFINE SEQUENCE > Seq
This is to define a sequence in RTF here 'Seq'  is the name of sequence
 and the squence is resat every EMPLOYEE_DETAIL level

<BEGIN FILLER BLOCK> AllRecordsBlock
<FILLER CHARACTER> 9
<BLOCK SIZE> 3

This block is used to fill the block characters here the block character is 9 and block size will be in the multiples of 3.

<LEVEL>
EMPLOYEE_DETAILS
<POSITION> <LENGTH> <FORMAT> <PAD> <DATA>
<COMMENTS>


In this position coloumn we keep the position where to display the data
In this length coloumn we keep the maximum length of the data
In this formate  coloumn we keep the formate  to the data
In this pad  coloumn we keep the lpading  or rpad to the data
In this data coloumn we keep the data from xml
In this Comments coloumn we keep the Commentsto the data which we are displaying
 we can sort the data as in ascending or descending order using
<SORT ASCENDING> Deptno

here in this example we are sorting as using dept
  Now fill the data as per required.
now using templete Viewer we can view the out

bowse the folder containing the XMLfile and  RTF  file

select output format eText and click on starting processing

now the output is
-------------------------------



Command and Column Header Key Words


The following key words must be used as shown: enclosed in <>s and in all capital letters with a bold font.

  •     <LEVEL> - the first entry of a data table. Associates the table with an XML element and specifies the hierarchy of the table.
  •     <END LEVEL> - declares the end of the current level. Can be used at the end of a table or in a standalone table.
  •     <POSITION> - column header for the first column of data field rows, which specifies the starting position of the data field in a record.
  •     <LENGTH> - column header for the second column of data field rows, which specifies the length of the data field.
  •     <FORMAT> - column header for the third column of data field rows, which specifies the data type and format setting.
  •     <PAD> - column header for the fourth column of data field rows, which specifies the padding style and padding character.
  •     <DATA> - column header for the fifth column of data field rows, which specifies the data source.
  •     <COMMENT> - column header for the sixth column of data field rows, which allows for free form comments.
  •     <NEW RECORD> - specifies a new record.
  •     <DISPLAY CONDITION> - specifies the condition when a record should be printed.
  •     <TEMPLATE TYPE> - specifies the type of the template, either FIXED_POSITION_BASED or DELIMITER_BASED.
  •     <OUTPUT CHARACTER SET> - specifies the character set to be used when generating the output.
  •     <NEW RECORD CHARACTER> - specifies the character(s) to use to signify the explicit and implicit new records at runtime.
  •     <DEFINE LEVEL> - defines a format-specific level in the template.
  •     <BASE LEVEL> - subcommand for the define level and define concatenation commands.
  •     <GROUPING CRITERIA> - subcommand for the define level command.
  •     <END DEFINE LEVEL> - signifies the end of a level.
  •     <DEFINE SEQUENCE> - defines a record or extract element based sequence for use in the template fields.
  •     <RESET AT LEVEL> - subcommand for the define sequence command.
  •     <INCREMENT BASIS> - subcommand for the define sequence command.
  •     <START AT> - subcommand for the define sequence command.
  •     <MAXIMUM> - subcommand for the define sequence command.
  •     <MAXIMUM LENGTH> - column header for the first column of data field rows, which specifies the maximum length of the data field. For DELIMITER_BASED templates only.
  •     <END DEFINE SEQUENCE> - signifies the end of the sequence command.
  •     <DEFINE CONCATENATION> - defines a concatenation of child level item that can be referenced as a string the parent level fields.
  •     <ELEMENT> - subcommand for the define concatenation command.
  •     <DELIMITER> - subcommand for the define concatenation command.
  •     <END DEFINE CONCATENATION> - signifies the end of the define concatenation command.
  •     <SORT ASCENDING> - format-specific sorting for the instances of a level.
  •     <SORT DESCENDING> - format-specific sorting for the instances of a level.


5 comments:

  1. Hi Priyanka, This is nice post.

    I have following questions. Please help me.

    1. Can you please let me know how can I display PAGE NUMBER in the eText template?

    2. How can I add page break after certain number of records per each page?
    Ex: after every 40 records in eText file, I need break there, the repeat header information and start new page.


    Thanks,
    Chandra

    ReplyDelete
    Replies
    1. Hi Chandry - did you ever manage to put page break after certain number of records as I would like to do the same?

      Thanks

      Delete
    2. No, we didn't find any solution in eText template.
      But we moved our reports to RTF/PDF area.

      May be you can try pl/sql or Java or Python to generate text files.

      Delete
  2. Hi Priyanka,
    Can i condition the headings of the template? for example when selecting parameter 'a' the heading shows aaaa, when selecting parameter 'b' the heading is bbbb.

    Thanks,

    Gaby

    ReplyDelete
  3. Hi Priyanka,
    Can i condition the headings of the template? for example when selecting parameter 'a' the heading shows aaaa, when selecting parameter 'b' the heading is bbbb

    ReplyDelete