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

Exporting Values from Subreport to Main report

Status
Not open for further replies.
Apr 18, 2007
209
0
0
US
Hello friends , I have a small question.
I have three paramters and I have subreport where I pass values to main report, I linked subreport to main report on those three paramters. I have grouping on amin report, I placed the subreport in grp footer 3a and in 3b below section i am showing shared varibales and other details, but when group chnages it valuea are not chaning, fore example I enter three paramters values 33455,4434,5345.
I did grouping on prameter fiels in both main report and subtrreport. Suppose for value 33455 sum of total $ is 50 and for 4434 sum is 65, but my shared variable is alwyas taking the last value i,e 65. I am doing anything wrong?,my subreport shared vaariable formula is like max(amount,po) so on. Please any help on this?.
Thanks a ton.
Toby.
 
Any ideas/help friends?, how to export group totals from subreport to main report?.
Thanks so much for your time,
Toby
 
Just thought o giving more clear data example, Here is sample data in main report everthing is group footer 4b

PO NAME ID NUMBER
3123 RED 4564 343
3423 BLUE 3434 3232
5692 BROWN 45345 5646

SUBREPORT(I did grouping only on PO and took max amount of each PO)
PO NAME ID NUMBER MAX AMOUNT
3123 RED 4564 343 200
3423 BLUE 3434 3232 45
5692 BROWN 45345 5646 52

I placed subreport in main report footer 4a and linked main report to subreport on po1 and po2 and po3 paramters,
shared variable is on max amount and when i place the shared varianle in main report I get only the last value 52 in main report

PO NAME ID NUMBER MAX AMOUNT
3123 RED 4564 343 52
3423 BLUE 3434 3232 52
5692 BROWN 45345 5646 52

 
Please show a copy of your main report selection formula and your subreport selection formula.

-LB
 
Hello LB, both the reports share a store procedure where condition is like this
WHERE (PO = ?po1 or PO = ?po2 or PO = ?po3)

I then joined the subreports on paramters fields to link to and subreport paramter field to use.
 
Again, please show the actual selection formula in both main and sub.

-LB
 
LB there is no slection criteria in both main report and subreport, I am not sure if I am missing something, but there is no slection criteria in both Main and Sub reports.I am linking them on paramters on amin reports to paramters on sub report.Please let me know if I did something wrong.
 
LB, I have 3 paramters p1,p2,p3 on both main and subreport, please let me know how to connect them if I am doing it wrong way, I am passing the paramters I select on main report to subreport and those values hit the store proc and gets me the values.
 
If you are linking them, then there should be a selection formula in each location that demonstrates the linking. Please check.

-LB
 
LB, both main report and subreport have same set of 3 paramters. I liked the reports directly on paramters po1 linked to po1 and po2 to po2 and po3 to po3. DO i need to link it by fieed instead?.
 
Lb this is my selection formula in subreport.

{TEST420;1.PO} = {?Pm-TEST420;1.PO}

Thanka again for being patient with me.

Thanks, T
 
Thank you. A little more information--what are the fields you are grouping on in the main report? In what report section is the subreport located?

-LB
 
LB, I am grouping on all the 4 fields PO,NAME,ID NUMBER and 4a has subreport and 4b has the details and subreport shared variables.
 
So PO is Group #1, right? I think you should be linking on the PO field, but that looks like what you are doing.

Earlier, you said you linked three parameters to each other. If you look in the subreport linking screen, do you see these links occurring there? Can you describe what you see?

-LB
 
LB, Yes PO is my group1. In field to link column upper right hand I took all parameters and as PO field. Then in lower left hand side I linked all those three paramters po1 and po2 and po 3 to subreport paramter field to use. ,right abobe it for all the paramters in a blue message it said ?po1 field link and so on for po2 and po3
Also linked field PO from Main report to subrerport again on lower left hand with this ?pm-test.PO for this correspoding loweer right hand side i selected select data in subreport based on field (test.po)
 
When you connect the Parameters to each other, you should be using the dropdown in the lower left to select {?P01}, not the default {?pm-?P01}, for each of the three parms. Can you confirm that you did that? I think the subreport is reading only one parm value.

-LB
 
LB you are right I did that intially, but if i do that i do not get any slection criteria, since you told me that should I should have one i had to connect po field by {?pm-?P01}.
But here my main problem is how to break up grop totals spearately show it on main report, on main report shared value just takes the last total value from the subreport.
 
I understand the issue--I just can't tell what you did for sure. When you highlight {?PO1} for the main report, what linking field shows in the bottom part of the linking screen? What about {?PO2} and {?PO3}?

-LB
 
LB, when i select p1 as paramter I get select ?PO1 as paramter I get two options below ?PO1 or {?pm-?P01}. Similary for other two. These parameters are coming from Store proc, Id id not create on front end crystal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top