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

group using shared var

Status
Not open for further replies.

atarrqis

IS-IT--Management
Nov 26, 2004
155
US
CR 8.5 and Oracle
I need to group in the main report based on either a
main group field {table.project] or a shared var from a subreport {@NewProj}
which may or may not exist in the main report.

How can I build a formula to group on either?
 
You cannot group on a shared variable. Maybe you should explain the goal of your report, and describe the group structure, etc.

-LB
 
The report gets labor hrs & labor dollars per project from one table and material dollars per project from another table for a given date range. There is no link between the tables as a project may have material dollars and no labor or labor and no material. I have the main report get the labor hrs & labor dollars and subreport gets the material dollars. I want to group on project - either the project in the main report or the project found in the subreport and shared, showing labor hrs, labor dollars and material dollars.
 
There has to be a link between them if they're by project, perhaps what you mean is that there may not always be both.

I would guess that there's yet another table in your schema which has ALL projects, which could be used as the parent table.

This would be simpler within a View or SP on the database, however you also might consider the main report using a Union query (you can manually append the UNION and the second tables select statement in the Database->Show SQL Query) to get all Projects, then linking by project in the subreport for those $.

-k
 
Your best bet is to use a table that contains all project numbers in your main report. Group on this, and then add a subreport for the labor costs and a subreport for the materials costs, linking each to the main report on the project number. Place the subreports in separate group header or footer sections.

-LB
 
ok, you're right, I can use the project table to link all.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top