INIPAR
Description
This action is called for each parameter just before the entry on the start range.
Template
Report
Use
It is principally used to initialise the parameter as a function of a context. Effectively, when the AEXERPT screen is used for all the reports, it is not possible to insert an avant_zone action for a specific report. The parameter code is available in [M:RPT]PARCOD(nolign-1).
it is possible to initialise the start range by the variable VALEUR.
it is possible to initialise the end range by the variable [M:RPT]VALEUR2(nolign-1). Then, if it is necessary to load the corresponding internal field :
Call CHARGE([M]VALEUR2(n),[M]PARTYP(n),[M]NOLIB(n),[M]LONG(n),[M]VALINT2(n)) From FMTVAR
It is the same for the initialisation of any field other than the current field :
Call CHARGE([M]VALEUR1(n),[M]PARTYP(n),[M]NOLIB(n),[M]LONG(n),[M]VALINT1(n)) From FMTVAR
(where n= nolign-1)
The instruction Affzo will be necessary.
it is possible to grey-out a parameter (except the current parameter) by the instruction Grizo or Diszo.
Here are 2 examples of the posting of this action.
Initialization of the start and then the end range :
$INIPAR
If [M]PARCOD(nolign-1)="countrystart" & zoncou="VALEUR1"
VALEUR="AAA"
Endif
If [M]PARCOD(nolign-1)="countrystart" & zoncou="VALEUR2"
VALEUR="BBB"
Endif
Return
Initialization of the start end ranges at the same time :
$INIPAR
If [M]PARCOD(nolign-1)="countrystart" & zoncou="VALEUR1"
VALEUR="AAA"
[M:RPT]VALEUR2(nolign-1)="BBB"
[M:RPT]VALINT2(nolign-1)="BBB"
Affzo [M:RPT]VALEUR2(nolign-1)
Endif