Crystal 11
Ok i have a problem with a cross tab, i have a report which shows business raised by sales advisor, and in the report footer i have cross tab which summarises everything in the report.
I am having a problem showing the number of policies created in the sub report. In the report i suppress anything where the gross premium is zero in the section expert so i can't do a simple distinct count of the the riskref. So i created a formula to count the disintct number of riskref as shown below:
{@reset count}
//in risk ref header
whileprintingrecords;
numbervar cnt;
stringvar x;
if not inrepeatedgroupheader then (
cnt := 0;
x := ""
);
{@risk count}
//in details section
whileprintingrecords;
numbervar cnt;
stringvar x;
if Sum ({@GP exc Fee}, {Analysis.RiskReference}) = 0 and Sum ({@Net Comm ex Fee}, {Analysis.RiskReference}) = 0 and Sum ({@Fee}, {Analysis.RiskReference}) = 0 and
instr(x,{Analysis.RiskReference}) = 0 then (
x := x + {Analysis.RiskReference} + ",";
cnt := cnt + 1
);
{@count}
//in risk ref footer
whileprintingrecords;
numbervar cnt;
I then take the value of {@count} away from the distinct count of Risk Ref and i have my value. However when i summarise this in the crosstab as a maximum of this field, in only shows the total distinct count of risk ref totally ignoring my formula.
Any help, or anyway in which i could do this better? i hope this makes sense.
Cheers
Ok i have a problem with a cross tab, i have a report which shows business raised by sales advisor, and in the report footer i have cross tab which summarises everything in the report.
I am having a problem showing the number of policies created in the sub report. In the report i suppress anything where the gross premium is zero in the section expert so i can't do a simple distinct count of the the riskref. So i created a formula to count the disintct number of riskref as shown below:
{@reset count}
//in risk ref header
whileprintingrecords;
numbervar cnt;
stringvar x;
if not inrepeatedgroupheader then (
cnt := 0;
x := ""
);
{@risk count}
//in details section
whileprintingrecords;
numbervar cnt;
stringvar x;
if Sum ({@GP exc Fee}, {Analysis.RiskReference}) = 0 and Sum ({@Net Comm ex Fee}, {Analysis.RiskReference}) = 0 and Sum ({@Fee}, {Analysis.RiskReference}) = 0 and
instr(x,{Analysis.RiskReference}) = 0 then (
x := x + {Analysis.RiskReference} + ",";
cnt := cnt + 1
);
{@count}
//in risk ref footer
whileprintingrecords;
numbervar cnt;
I then take the value of {@count} away from the distinct count of Risk Ref and i have my value. However when i summarise this in the crosstab as a maximum of this field, in only shows the total distinct count of risk ref totally ignoring my formula.
Any help, or anyway in which i could do this better? i hope this makes sense.
Cheers