Hi
I'm creating af report where some of the
pnr's have info in another table which I cannot directly
link to - .
Therefore I have created a subreport where I find all the
info for all the pnr's.
I want to place the subreport
in the mainreport reportHeader
so the subreport only send the sql to
the database(DB2).
What I want to do is add each pnr who has information into
a array and then move the data to the mainreport.
The problem is that I don't have the right syntax.
the data I want to move is:
pnr startdate enddate
0101301448 25022004 29022004
0201361549 09022004 29022004
----subreport
//@subreport
whileprintingrecords;
shared array pnr;
numbervar Counter;
(Counter := Counter + 1;
//The line below ensures that the size of the array does
//not exceed 1000 values. An array can contain a maximum
//of 1000 values.
if Counter <= 1000
//Redim Preserve is function that changes the size of the
//array according to the new value of Counter. Also, the
//existing values in the array are not removed or changed.
//The array now has space for a new value.
then (Redim Preserve pnr[Counter];
//The new value is added to the newly created space in the
//array.
pnr[Counter] := {MyDatabase.pnr}));
-------
In the mainreport when pnr='array pnr' it shall
find the right startdate and enddate for that pnr
how is the syntax for the
Mainreport ???
-fb
I'm creating af report where some of the
pnr's have info in another table which I cannot directly
link to - .
Therefore I have created a subreport where I find all the
info for all the pnr's.
I want to place the subreport
in the mainreport reportHeader
so the subreport only send the sql to
the database(DB2).
What I want to do is add each pnr who has information into
a array and then move the data to the mainreport.
The problem is that I don't have the right syntax.
the data I want to move is:
pnr startdate enddate
0101301448 25022004 29022004
0201361549 09022004 29022004
----subreport
//@subreport
whileprintingrecords;
shared array pnr;
numbervar Counter;
(Counter := Counter + 1;
//The line below ensures that the size of the array does
//not exceed 1000 values. An array can contain a maximum
//of 1000 values.
if Counter <= 1000
//Redim Preserve is function that changes the size of the
//array according to the new value of Counter. Also, the
//existing values in the array are not removed or changed.
//The array now has space for a new value.
then (Redim Preserve pnr[Counter];
//The new value is added to the newly created space in the
//array.
pnr[Counter] := {MyDatabase.pnr}));
-------
In the mainreport when pnr='array pnr' it shall
find the right startdate and enddate for that pnr
how is the syntax for the
Mainreport ???
-fb