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!

passing variables to a subreport

Status
Not open for further replies.

eoggb

Programmer
Feb 2, 2006
20
CA
I have a main report that is filtering out revenue accounts and using this one table only.

{ACCOUNT_GROUP_ACCOUNTS.MAJOR_ACCT} ='700'
and {ACCOUNT_GROUP_ACCOUNTS.MINOR_ACCT} <> 'CLR'

I have a subreport that is called revenue which is linked by these 2 feilds.
{LINE_ITEMS.MAJOR_ACCT} = {?Pm-ACCOUNT_GROUP_ACCOUNTS.MAJOR_ACCT} and
{LINE_ITEMS.MINOR_ACCT} = {?Pm-ACCOUNT_GROUP_ACCOUNTS.MINOR_ACCT}

In my subreport I have a feild called {VOUCHERS.ACCT_PER_DATE} this table vouchers is linked to 6 huge tables. I would like to know how to pass this feild into the main report which is calling to a Parameter :{?Date Range}. Only thing is the tables in my main report does not have this feild. And if I try to link the tables to get to this feild it will slow down my processing time therfore defecting the purpose of my subreport.

Q: How can I link my Date Parameter in the main report to the subreport when the main report table does not have this field? {VOUCHERS.ACCT_PER_DATE}
 
The field doesn't have to be available in the main report for you to use the main report parameter. Go to the subreport linking expert and move the parameter field to the right for the main report link, and then in the bottom right, make sure the date field in your subreport is selected. Then go into the record selection formula in the subreport and adjust the formula as necessary.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top