Hi,
I use CR 8.5 on a DB2 database.
It is not possible to write the sql our selves due
to a webconnection on a citrix-server.
The problem is that I have to use arrays which exceeds
1000.
I try to find the data from the subreport by saying
when arrPNR[Counter]={PNR} - But it seems that the
syntax in the Main Report's Variable {@PNRmatch} isn't correct???
I have made the following Variables:
in the subreport I use a variabel {@subreport} with multiple arrays:
whileprintingrecords;
shared stringvar array arrPNR;
shared numberVar array arrField1;
shared numberVar array arrField2;
shared numberVar array arrtax;
shared stringvar array arrPNRII;
shared numberVar array arrField1II;
shared numberVar array arrField2II;
shared numberVar array arrtaxII;
shared numbervar Counter;
Counter := Counter + 1;
if Counter <= 1000 then (
(Redim Preserve arrPNR[Counter];
arrPNR[Counter] := {PNR});
(Redim Preserve arrtax[Counter];
arrtax[Counter] := Sum ({TAX_TYPE}, {PNR}));
(Redim Preserve arrField1[Counter];
arrField1[Counter] := Sum ({Field1}, {PNR}));
(Redim Preserve arrField2[Counter];
arrField2[Counter] :=Sum ({Field2}, {PNR})));
if Counter in 1001 to 2000 then (
(Redim Preserve arrPNRII[Counter-1000];
arrPNRII[Counter-1000] := {PNR});
(Redim Preserve arrtaxII[Counter-1000];
arrtaxII[Counter-1000] := Sum ({tax_TYPE}, {PNR}));
(Redim Preserve arrField1II[Counter-1000];
arrField1II[Counter-1000] := Sum ({Field1}, {PNR}));
(Redim Preserve arrField2II[Counter-1000];
arrField2II[Counter-1000] :=Sum ({Field2}, {PNR})));
in the Mainreport:
I have a variabel {@PNRmatch} :
whileprintingrecords;
shared stringvar array arrPNR;
shared numberVar array arrF1;
shared numberVar array arrF2;
shared numberVar array arrSkat;
shared stringvar array arrPNRII;
shared numberVar array arrF1II;
shared numberVar array arrF2II;
shared numberVar array arrSkatII;
shared numbervar Counter;
//Declare string variables to hold values
shared stringVar strPNR;
shared numberVar numF1;
shared numberVar numF2;
shared numberVar numtax;
shared numberVar numi;
numbervar i;
For i := 1 to 1000
Do( If arrPNR = {PNR} Then
(
strPNR := arrPNR;
numF1 := arrField1;
numF2 := arrField2;
numSkat := arrtax)
);
I want to attach the correct data from the subreport when
ever a PNR has data available from the subreport.
I will appreciate any help
-fb
I use CR 8.5 on a DB2 database.
It is not possible to write the sql our selves due
to a webconnection on a citrix-server.
The problem is that I have to use arrays which exceeds
1000.
I try to find the data from the subreport by saying
when arrPNR[Counter]={PNR} - But it seems that the
syntax in the Main Report's Variable {@PNRmatch} isn't correct???
I have made the following Variables:
in the subreport I use a variabel {@subreport} with multiple arrays:
whileprintingrecords;
shared stringvar array arrPNR;
shared numberVar array arrField1;
shared numberVar array arrField2;
shared numberVar array arrtax;
shared stringvar array arrPNRII;
shared numberVar array arrField1II;
shared numberVar array arrField2II;
shared numberVar array arrtaxII;
shared numbervar Counter;
Counter := Counter + 1;
if Counter <= 1000 then (
(Redim Preserve arrPNR[Counter];
arrPNR[Counter] := {PNR});
(Redim Preserve arrtax[Counter];
arrtax[Counter] := Sum ({TAX_TYPE}, {PNR}));
(Redim Preserve arrField1[Counter];
arrField1[Counter] := Sum ({Field1}, {PNR}));
(Redim Preserve arrField2[Counter];
arrField2[Counter] :=Sum ({Field2}, {PNR})));
if Counter in 1001 to 2000 then (
(Redim Preserve arrPNRII[Counter-1000];
arrPNRII[Counter-1000] := {PNR});
(Redim Preserve arrtaxII[Counter-1000];
arrtaxII[Counter-1000] := Sum ({tax_TYPE}, {PNR}));
(Redim Preserve arrField1II[Counter-1000];
arrField1II[Counter-1000] := Sum ({Field1}, {PNR}));
(Redim Preserve arrField2II[Counter-1000];
arrField2II[Counter-1000] :=Sum ({Field2}, {PNR})));
in the Mainreport:
I have a variabel {@PNRmatch} :
whileprintingrecords;
shared stringvar array arrPNR;
shared numberVar array arrF1;
shared numberVar array arrF2;
shared numberVar array arrSkat;
shared stringvar array arrPNRII;
shared numberVar array arrF1II;
shared numberVar array arrF2II;
shared numberVar array arrSkatII;
shared numbervar Counter;
//Declare string variables to hold values
shared stringVar strPNR;
shared numberVar numF1;
shared numberVar numF2;
shared numberVar numtax;
shared numberVar numi;
numbervar i;
For i := 1 to 1000
Do( If arrPNR = {PNR} Then
(
strPNR := arrPNR;
numF1 := arrField1;
numF2 := arrField2;
numSkat := arrtax)
);
I want to attach the correct data from the subreport when
ever a PNR has data available from the subreport.
I will appreciate any help
-fb