You are here: LANSA for i User Guide > 4. Processes and Functions > 4.15 Edit a Function's RDML Commands > 4.15.15 Use Cycle and Repeat Values to Enhance Report Image

4.15.15 Use Cycle and Repeat Values to Enhance Report Image

When using the report design facility 2 special values appear on the command selection screen. These are called the "cycle" value and the "repeat" value.

The "cycle" value appears once in the upper right of the screen and is usually pre-filled to 1. The value specified here indicates the total number of report "cycles" that are to be emulated by the screen design facility when building an image of the report commands.

The "repeat" value appears in the column headed "Rpt" in the lower half of the screen (for DEF_LINE commands only) and is usually pre-filled to 1. The value specified here indicates the number of times the image should be repeated by the screen design facility when building an image of the DEF_LINE command.

Both values are used to enhance the report image that is built by the screen design facility. The way these values are used is best demonstrated by example.

Consider a report that is defined by the following 3 commands:

DEF_HEAD  NAME(#HEADING)  FIELDS(#COMPANY)

 

DEF_LINE  NAME(#DIVSALES) FIELDS(#DIVNAM #PRODNO 

          #PRODES #QUANTITY)

 

DEF_BREAK NAME(#DIVTOTAL) FIELDS(#DIVQTY) TRIGGER_BY(#DIVNAM)

 

If all lines were selected for display by the report design facility and the default of 1 used for the "cycle" and "repeat" values the image might look something like this:

 

 ______________________________________________________________

/                                                              \

|  Company XXXXXXXXXX                                          |

|                                                              |

|  Divn                                                        |

|  Name   Product  Description                 Quantity        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|                                                              |

|                               Division total 99999.99        |

|                                                              |

\______________________________________________________________/

 

If the "repeat" value associated with the DEF_LINE command was set to 3. The report image would be enhanced to look like this,  which is closer to what the report will look like when it is actually printed:

 ______________________________________________________________

/                                                              \

|  Company XXXXXXXXXX                                          |

|                                                              |

|  Divn                                                        |

|  Name   Product  Description                 Quantity        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|                                                              |

|                               Division total 99999.99        |

|                                                              |

\______________________________________________________________/

 

Note how the DEF_LINE command image is repeated 3 times.

If the "cycle" value was set to 2 and the "repeat" value associated with the DEF_LINE command was set to 3. The report image would be enhanced to look like this, which is even closer to what the report will look like when it is actually printed:

 ______________________________________________________________

/                                                              \

|  Company XXXXXXXXXX                                          |

|                                                              |

|  Divn                                                        |

|  Name   Product  Description                 Quantity        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|                                                              |

|                               Division total 99999.99        |

|                                                              |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|  XXXXX  XXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXX   99999.99        |

|                                                              |

|                               Division total 99999.99        |

|                                                              |

\______________________________________________________________/

 

Note how the DEF_LINE and DEF_BREAK command are subjected to 2 emulated report cycles, and the DEF_LINE command is repeated 3 times every time it occurs.