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

Pulling data from subreport and use it in my selection criteria

Status
Not open for further replies.

sto837

Technical User
Aug 11, 2009
20
US
Hi,

Does anyone know if I could use the data from subreport in my selection criteria on my main report? The reason I need to create subreport is because there is no direct linking. I need to create few formulas in my main report in order to link a different table and pull in the appropriate record. I have that accomplished already but the problem is I cannot use the data from my subreport in my main report as the selection criteria sinceI need to eliminate record from my main report based on the comparison of the data between the main and subreport. It said "This formula only can evaluate later". Please advise. Thanks!
 
You can't use shared variables in your selection formula, but you could potentially suppress main report records based on your subreport data using shared variables. If you want help with that, you would have to provide more information about the group setup of the main report, subreport, where the sub is located, etc.

-LB
 
I tried that and it worked. But now I have another problem.
Main Report
Group Header 1a- Subreport with Year, ID, rate
Group Footer 1b- All main report fields along with 2 rate (1 rate from main report, 1 rate from subreport)

I need to suppress 1a and 1b at the same time if the rate from main report is greater than rate from subreport. I am able to do that for group footer 1b but i cannot do that for group header 1a. The reason being that the same field that i placed in 1b to 1a is not pulling the same data from subreport. it's pulling the previous rate so i cannot use the same logic i used in 1b to suppress. Any suggestions? Thanks in advance.
 
Insert another GH section, and place the sub in GH1a, and then use shared variables to display the items that you want to display in GH1b. Leave the main report items in GF1b.

Then suppress the display of the sub in GH1a by suppressing all sections WITHIN the sub. Then in the main report, select the sub->format subreport->subreport tab->check "suppress blank subreport". Then also remove the borders around the subreport. Finally go to the section expert in the main report and format GH1a to "suppress blank section". This will cause GH1a to disappear, but it allows the shared variables to pass to GH1b and to GF1b.

-LB
 
It works. Thank you very much! =)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top