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

How to pass parameter from main report to subreport

Status
Not open for further replies.

maas

Programmer
Sep 3, 2009
148
BH
Hello all,

I am having a problem is that I want to pass two date parameters from main report to sub-report.

In my main report: I am showing deal_no, party, amount, deal_date

In the subreport:
I am having deal_no, deal_effect_dt,deal_mature_dt

In the main report I am getting the from_mature_dt to mature_dt.

So, now how can I pass these two parameters to the sub-report and determine the values.

E.x: I want to show the deal_no, with mature_dt between 12/7/2009 & 12/5/2010 without prompting the user to enter again the parameters.

Currently I am letting the user to enter them again, as I defined in the sub-report(one parameter and has range values). How can I get rid of this parameter and let it use the parameters from main report automatically.

Thanks
 
In subreport linking, select parameter from main report.

In drop down window in bottom left scroll down and you will see the subreport parameters. YOu can then link as required.

Ian
 
In crxi right click the subreport, choose "change subreport links". List on left is available main report fields and formulas and params. Move one to the right, then while it is selected choose an item in the subreport to tie it to. Repeat for each you need to use.

One caveat is that if you need a field from the main but don't want to tie it to a field in the sub, at first let it tie to the subreport willy nilly and edit the subreport to make use of the parent field as a parameter somewhere, then go back to the above steps and find it and uncheck the box to connect to something in the subreport. If you uncheck the box without actually using the field somewhere crystal has the habit of yanking that subreport parameter out of existence before you get to make use of it.

Scotto the Unwise
 
Thanks for your help.

I will try this out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top