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!

How do i pass parameter from main report to subreport?

Status
Not open for further replies.

Lnxvas

Programmer
Oct 15, 2008
15
0
0
US
below both questions are for one report.

1)how do i pass same parameter for both the main report and the sub-report?

2)how do i pull value from main report to sub-report?

in the 2nd question, i have to pull a value from the main report and use as parameter in the sub-report.

for example : in the main report if i display the reference numbers and some of these reference numbers have adjustment values which i show in subreport.

now from the main report i have to pull the reference number which has adjustment values and use that reference number in subreport to get the values.

how can i do this?

Thanks a bunch in advance.


 
Choose Edit > Subreport Links. Note that the function will want to link to something in the subreport and that it will create a selection criteria. If you don't want the criteria you can remove it from Record Selection.

To pass data back from the subreport, use Shared Variables. The SEARCH function on this site would give you details.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
For what you describe, you should be able to use a subreport link for both. To use the same parameter, create the same parameter in the subreport, and then use the dropdown in the lower left of the subreport linking screen to select {?parm}, not the default {?pm-?parm}. For the reference number, choose the field in the main report and link it to the field in the sub--the link will behave like a left join.

-LB
 
thanks to both

i was able to pass same parameter to both and also link thr number from main report to sub report.


Thanks a lot.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top