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!

Data from subreport 1

Status
Not open for further replies.

robmason10

Technical User
Apr 9, 2002
68
GB
I have linked subreports which I would like to supress so that they cannot be accessed - how can I pass the info from the subreport to the main report? I have been told this is possible?
 
in the design mode, right click on the subreport - choose "format subreport" and choose "supress"

i think that should work...

good luck...

[americanflag] ShannonLea [americanflag]

"I keep hitting 'escape' but I'm still here..."
 
If you suppress the subreport, the subreport will not execute, so there will be no data to return to the main report.

Open the subreport, and suppress the individual sections.

Go back to the main report, and size the subreport vertically as small as it will allow. Ensure borders are off.

If the subreport is in a section of the main report by itself (it would help if it was), format the main report section that the subreport is placed in, by selecting Underlay Following Sections.

Naith
 
So how then will the main report show the 1 value of the subreport that I need? Basically I need to pass the data from the subreport to the main report so that I can make it impossible to drill down in to the subreport
 
Use a shared variable to return the value, as in:

Main report prior to the subreport firing formula:
whileprintingrecords;
shared numbervar MyValue := 0;

Subreport formula to set the value:
whileprintingrecords;
shared numbervar MyValue := {table.value};

Main report after the subreport fires formula:
whileprintingrecords;
shared numbervar MyValue;
MyValue

-k
 
You can hide a blanked-out subreport under some other field, which means that no one can easily get access to it.

Madawc Williams
East Anglia
Great Britain
 
Sorry I am going to be very ignorant here...

Where in the main does this go?
Main report prior to the subreport firing formula:
whileprintingrecords;
shared numbervar MyValue := 0;

This is the field to disply from the subreport:
Subreport formula to set the value:
whileprintingrecords;
shared numbervar MyValue := {table.value};

I take it this becomes the field that is entered in the detail on the main report?
Main report after the subreport fires formula:
whileprintingrecords;
shared numbervar MyValue;
MyValue

 
i apologize for giving you a wrong answer - i did not know that supressing the subreport would block it from sending the needed information through... (i should have known it was too easy of an answer to be right...)

[americanflag] ShannonLea [americanflag]

"I keep hitting 'escape' but I'm still here..."
 
Its ok - I've creacked it - if I hide all sections of the sub report and then create the variable and pass it on to the main report (which I have just worked out) then it all works fine.....thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top