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

Usind Data from a Sub Report in the Main Report 1

Status
Not open for further replies.
Feb 4, 2004
60
EU
A simple question for the Guru's!

Is it possible to set a Global Variable in the Sub Report which then can be used as in a formula in the Main report?

And I am specifically trying not to use a SQL Command to fetch data from the DB.

eg.....

I have a report running over JDE tables (F4211) which maintains sales order transaction lines at a detail line level.

My Groupings are then:

GH1: Company
GH2: Division (BU)
GH3: Sales Rep
GH4: Customer
GH5: Document No

I then need to "Get" the sales target totals for each of these grouping (GH1,GH2 and GH3 only) which are stored in a separate table against Saleman Level. ie: By Salesman by Division by Company. (This means that if I create the link between the tables then the detail level carries the target, which means the totals do not tally.)

I have tried using formula to create WhilePrintingRecords (for running totals) which works but the results cannot be charted.

I am left with Subreports!

So the original Question again is can I use a global variable in the sub report for purposes in the main report?

If not, any suggestions?

Regards and Thanks

BurnsORegan.
 
A shared variable is a global variable which you can pass between main and subreports.

Naith
 
Naith

Please help me here, I can get the Shared Variable from the main to the sub, but not the other way.....

Is there a specific syntax?

Regards

Burnsoregan
 
The syntax is exactly the same each way.

What you're probably doing is trying to call the shared variable in the main report in the same section as where the subreport is placed.

This isn't supported because the subreport is the last thing to get processed in the section. So, the formula calling the shared variable in the main report is processed before the subreport has actually assigned it a value; making it redundant.

The earliest you can call the shared variable in the main report is in the section immediately after the one in which the subreport is placed.

All the best,

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top