Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula does not appear in available field list in chart expert

Status
Not open for further replies.

c8ltgkue

MIS
May 1, 2007
57
GB
I have the following formulas in different sections of my report

{@InterpreterPresent?}

if not isnull({tlkpSpeciality.Caption}) and {tlkpSpeciality.Caption} = "Interpreter" then 1 else 0

{@InterpreterRequired?}

if not isnull({tblPerson.InterpreterReq}) and {tblPerson.InterpreterReq} = True then 1 else 0

{@IntReqCase}

whileprintingrecords;
if Sum ({@InterpreterRequired?}, {tblCase.CaseID}) > 0 then 1 else 0

{@IntPresCase}

whileprintingrecords;
if Sum ({@InterpreterPresent?}, {tblCase.CaseID}) > 0 and
Sum ({@InterpreterRequired?}, {tblCase.CaseID}) > 0 then 1 else 0

{@CountIntPres}

whileprintingrecords;
Shared NumberVar IntPrest;

If {@IntPresCase} = 1 then
IntPrest:= IntPrest + {@IntPresCase}
Else
IntPrest;

{@CountIntReq}

whileprintingrecords;
Shared NumberVar IntReq;

If {@IntReqCase} = 1 then
IntReq:= IntReq + 1
else
IntReq;

{@ResetVar}

Shared NumberVar IntReq:=0;
Shared NumberVar IntPrest:=0;

{@ShowIntPres}
Shared NumberVar IntPrest;

{@ShowIntReq}
Shared NumberVar IntReq;

{@%Perc}

whileprintingrecords;
Shared NumberVar IntPrest;
Shared NumberVar IntReq;

If IntPrest > 0 and IntReq > 0 then
IntPrest/IntReq *100

Else
0.00

There are 2 groups in my report

Group 1 - tblTeam.Team
Group 2 – tblCase.CaseID

This is how the formulas are placed on the report:

GH1 {@ResetVar}
GH2
D {@InterpreterRequired?} {@InterpreterPresent?}
GF2 {@IntReqCase}, {@CountIntReq} {@IntPresCase},{@CountIntPres}
GF1 {@ShowIntPres}, {@ShowIntReq},{@%Perc}


All sections are suppressed except GF1

I want to create a graph to show value of {@%Perc} but it doesn’t appear in the available field list in the chart expert.

Any ideas ?

Apologies for the long explanation but couldn't think of any other way to put it.

Many thanks in advance.
C8
 
Your problem is probably that you've got summary values, which can't be used for graphs. Get the same value at detailed level and then graph it, if possible.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I think the problem is the shared variables. There is a technical paper on the Business Objects website called "Charting on Print-time Formulas" that might help. Even though it says for V.9, it works in later versions.

-LB
 
Thanks both.

I am affraid I have to group it in order to show the right data. I tried to look for that article you mentioned lbass without success. Do you mind sending the link ?

Thanks

C8
 
LB,

I used the pdf that was in the link you attached. I appreciate it. It is based on RecordID and a sub report. No matter what i do i can't seem to get the same RecordID in the subreport as the main report. I even tried copying the main report and then adding a copy of it as the subreport but as soon as it is added the recordids change. I am using CRXI and SQL datasource. I can provide more details if needed but the formulas were identical in format to the pdf. I made sure to have identical grouping, datasources and record sorts in both reports.
 
I can't really help unless you lay out comprehensive information. I assume you are not the original poster in this thread.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top