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

Detail Section formula field needed from subreport

Status
Not open for further replies.

bv0719

MIS
Dec 19, 2002
131
US
I have a report design that I prefer not to change since 90% of the layout and data is correct. I had to remove a field from the details section since the data that was being returned is incorrect. The amount that I need to place in this field comes from a database that I have since added to the report. Is it possible to create a field in the details section of the report that will return a value that needs to be created from another report or from a subreport? The field I need to enter would require some selection expert selection and possibly formulas. Let me know your thoughts.
 
To get data from a subreport, execute it prior to the point where you need the value, and use a shared variable.

In the subreport create a formula like:

whileprintingrecords;
shared numbervar SubNum := {table.field} // or whatever you need

Back in the main you can reference this value using another formula, as in:

whileprintingrecords;
shared numbervar SubNum;
SubNum

-k
 
I came across this while researching. Seems to be the same as what your suggesting although somewhat different.
Shared numberVar intX;
intX:= sum({field}]); instead of just use grand sum

Afterwards, in the main report, you have to tyep the following:

Shared numberVar intX;
intX

I'll try these out to see what worke the best.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top