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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Footer output problem - URGENT help needed thankx

Status
Not open for further replies.

dinshak

Technical User
Oct 31, 2007
39
US
i have a main report B_EM_BacT-Alert.rpt and two sub reports B_Micro_dvalue.rpt and B_Micro_Bioburden.rpt

Both subreports have the same Group footer that has a formula @Pos2 (as under)

numberVar a ;

stringVar pos2;



a := instr ({RESULT.REPORTED_NAME}, "-Btl ");

if a > 0 then pos2:= Mid ({RESULT.REPORTED_NAME}, a + 5, 1)

else if instr({RESULT.REPORTED_NAME}, "Ster") > 0 then pos2 := '4'

else if instr({RESULT.REPORTED_NAME}, "TSA") > 0 then pos2 := '5'

else if instr({RESULT.REPORTED_NAME}, "PBS") > 0 then pos2 := '6'

else if (instr({RESULT.REPORTED_NAME}, "Received") = 7 or instr({RESULT.REPORTED_NAME}, "Tested") = 7

or instr({RESULT.REPORTED_NAME}, "Read") = 7 or instr({RESULT.REPORTED_NAME}, "Conf") = 7)

then pos2 := '7'

else if instr({RESULT.REPORTED_NAME}, "Gram") > 0 or instr({RESULT.REPORTED_NAME}, "Bact") > 0

then pos2 := '8'

else pos2 := '9';

//if pos2 = 'Btl 1' then pos2:= 'Bottle 1';

pos2



The B_Micro_Bioburden.rpt output displays rows 1, and 3, but B_Micro_dvalue.rpt output does not. I dont understand as both sub-reports have same formula and configuration.



I will be glad to show the reports through webex or something if anyone can help me please.



Happy New Year



 
yes both subreports are linked in the same way
 
Ok - Sorry for delay.

The shared variable you describe above seems fine and I would assume both subreports if they contain this formula would have access to the reports table.

I am a little confused by your reference to rows 1 & 3 showing and others not, could you clarify this a little please?

Also, are the two subreports both referencing seperate tables, or put simpler, what is the reasoning behind the two seperate subs.

Cheers

'J
 
I really dont know as to why they are together. As I just joined this workplace and am picking up from someone elses work. Is there a way that I can webex and show you my problem. I will realy appreciate if you can help me with this.
 
Hi J,

Both subreports are referencing same tables, but pulls different data out of it.

 
dinshak, I'd suggest you do a test version in which you show more of the data and see in more detail what is happening.

Incidentally, what you posted were variables, not shared variables that would be available in the main report. Does this make a difference?

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I have the following under main report (formula-Grouper)

if {TEST.ANALYSIS} in ["STERILITY"] THEN
"1"
ELSE IF {TEST.ANALYSIS} IN ["GROWTH_PERFORM","CULTURE_PURITY"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["M_TUBERCULOSIS","M_LUTEUS","N_MENINGITIDIS","P_AERUGINOSA","E_FAECALIS","S_PNEUMONIAE"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["S_PYOGENES","S_MALTOPHILIA","S_AUREUS_25923","H_INFLUENZAE","B_FRAGILIS"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["B_VULGATUS","C_PERFRINGENS","P_ASACCHAROLYTICUS","B_COAGULANS","L_PLANTARUM","P_PENTOSACEUS"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["A_NIGER","C_SPOROGENES_19404","C_SPOROGENES_11437","B_SUBTILIS","M_TB_25177_R3","M_TB_25177_R5"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["M_INTRA_13950_R3","M_INTRA_13950_R5","M_TB_25177_A3","M_TB_25177_A5","M_INTRA_13950_A3"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["M_INTRA_13950_A5","M_INTRA_PLATE_COUNT","M_TB_PLATE_COUNT","M_INTRA_13950_3","M_INTRA_13950_5"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["M_AVIUM_25291_3","M_AVIUM_25291_5","M_GORD_35756_A4","B_CEREUS","C_ALBICANS_14053"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["C_ALBICANS_10231","C_ALBICANS_11006","E_COLI_8739","E_COLI_25922","E_COLI_3515","L_GRAYI"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["P_AERUGINOSA_27853","P_AERUGINOSA_9027","S_AGALACTIAE","S_AUREUS_6538","S_CEREVISAE"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["S_EPIDERMIDIS_49134","S_EPIDERMIDIS_12228","S_CREMORIS","M_TB_25177_5","M_TB_25177_3"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["E_FAECALIS","S_PNEUMONIAE","S_PYOGENES"] THEN
"3"
ELSE IF {TEST.ANALYSIS} IN ["S_AUREUS_12600"] THEN
"5"
ELSE IF {TEST.ANALYSIS} IN ["BIOBURDEN_BULK"] THEN
"6"
ELSE IF {TEST.ANALYSIS} IN ["D_VALUE_TEST"] THEN
"7"
ELSE
"Z"

 
Are these groups the rows you were referring to?

For example you arent seeing any information under the groups for {TEST.ANALYSIS} IN ["BIOBURDEN_BULK"] etc?..

'J
 
Thats right I am only able to see partial information information for D_Value_Test. Just one particular Group footer that has the following fields as:

Running total field (max) for #PlCount1:
{RESULT.REPLICATE_COUNT} = 1
and
InStr ({RESULT.REPORTED_NAME}, 'Growth Plate 100 min') > 0


Running total field (max) for #PlCount2:
{RESULT.REPLICATE_COUNT} = 2
and
InStr ({RESULT.REPORTED_NAME}, 'Growth Plate 100 min') > 0


Running total field (max) for #BtlAvg:
InStr ({RESULT.REPORTED_NAME}, 'Growth Plate Avg 100 min') > 0

and @POS2 as under:

numberVar a ;
stringVar pos2;

a := instr ({RESULT.REPORTED_NAME}, "-Btl ");
if a > 0 then pos2:= Mid ({RESULT.REPORTED_NAME}, a + 5, 1)
else if instr({RESULT.REPORTED_NAME}, "Ster") > 0 then pos2 := '4'
else if instr({RESULT.REPORTED_NAME}, "TSA") > 0 then pos2 := '5'
else if instr({RESULT.REPORTED_NAME}, "PBS") > 0 then pos2 := '6'
else if (instr({RESULT.REPORTED_NAME}, "Received") = 7 or instr({RESULT.REPORTED_NAME}, "Tested") = 7
or instr({RESULT.REPORTED_NAME}, "Read") = 7 or instr({RESULT.REPORTED_NAME}, "Conf") = 7)
then pos2 := '7'
else if instr({RESULT.REPORTED_NAME}, "Gram") > 0 or instr({RESULT.REPORTED_NAME}, "Bact") > 0
then pos2 := '8'
else pos2 := '9';
//if pos2 = 'Btl 1' then pos2:= 'Bottle 1';
pos2

The above forms the group footer that does not display for D_Value_Test
 
Go to edit->subreport links and check the links for each subreport to the main report. It looks like one of them might be linked on the pos2 formula, and the other one not.

-LB
 
I honestly can't tell what you are trying to do. Please identify the fields (with names) that you are grouping on in the main report and the two subreports and identify the fields you are linking the sub to the main on. Then explain what you mean by:

The B_Micro_Bioburden.rpt output displays rows 1, and 3, but B_Micro_dvalue.rpt output does not.

...as "rows1 and 3" do not mean anything to us.

Can you also confirm that the selection formulas are the same in each subreport?

It appears that you are grouping on a formula {@pos2} in each sub, and can you confirm that the formulas are exactly the same in each? If you are linking this to your main report group field, right now it looks like you don't have matches for the "1" and "3" result found in the main report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top