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

Passing variable between main and Sub-report.

Status
Not open for further replies.

idehen

Technical User
Joined
Oct 26, 2004
Messages
92
Location
GB
Good-day everyone,

Just wondering if anyone could assist me with a problem am having. Crystal version - 10

I understand how to pass a variable or data from a sub-report to a main report. However i am having trouble passing multiple lines of date from the sub-report to the main report.

Example:

Sub report:

ID Date Fees Status
110 01/01/07 £20.00 P
252 01/02/07 £60.00 O


above information is grouped by ID

Problem.

At the moment my main report only show a single row of £20.00 passed from the sub to the main. however, i want to be able to display both £20.00 and £60.00 in my main report.

Any help will be appreciated.

Regards
Solomon

So sorry if this doesn't make sense , please let me know if you want more information.
 
You need to explain in what section the sub is located and also identify the subreport links if any.

-LB
 
Thanks Ibass.

The sub report has been put in top level detail section. What i have done is create detail section A and section B. I have the sub report in Detail section A and other fields from main report in Detail B. This also includes the figure pulled from the sub report.

For some reason the information seem to duplicate all my data in section B which is the main information i want. Like you said might have something to do with the subreport linking, just can't figure where it's going all wrong.

Thanks again for your response..
Solomon
 
Don't you have any groups in the report? And how is the subreport linked to the main? Your first post indicated missing info. Your second post indicates duplicated info. I'm confused. Please answer all questions.

-LB
 
If you want to pass back multiple values, you should pass an array. I've never done this but I recall examples being posted. Try using SEARCH to find them.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks for your responses. I have found an alternative way to resolve the problem. Looks messy with all the linking of different and many tables but got there at the end.

I appreciate the tips and advise. However,have run into another little problem which is unrelated to this so will be making a post and hope someone could guide me again.

Many thanks again.

Solomon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top