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!

CR9 - Pulling data from another formula

Status
Not open for further replies.

spiderusa

Technical User
May 24, 2005
17
US
Hi

I'm using Crystal 9 with SQL server 2000. The report has values from 6 tables. Its layout is

Id Name Title Section1 Section2....Section 18
1 John Pres Member <Null> <Null>
1 John Board Member <Null> <Null>
2 Mary VP NonMember <Null> <Null>
2 Mary VP <Null> <Null> Member
2 Mary Associate NonMember <Null> <Null>
2 Mary Associate <Null> <Null> Member


The ID and Name are present in Member Table
Title is present in Title Table
The Sections are present in Order Table (basically subscriptions). The rest of the values (address) not shown here are got from 3 other tables.

The Section values are present in a field called Section_Code in the Order table. I used a formula to get the value to display.
@section1
Code:
if {Member.ID} = {ORDER.Ship_ID}
and {ORDER.Section_Code} = 'Section1' then {ORDER.Section_Code}

To concatenate the title value I used a formula that lbass, in the forum here, provided. My problem is when I group on the ID to rid of duplicates the section values are not displayed. I tried to create another formula

Code:
WhilePrintingRecords;
    StringVar Item:= {@section1};

that gets the value from the previous formula but that works for only one section. When I create formulas for all 18 section only one of them is displayed.

Any ideas on how to work around this problem? Thanks.

 
It would be much clearer to me were you to post technical information:

Example data
Expected output

Stating what isn't working is helpful, but i need to know what you have and what you want.

-k
 
Try inserting a maximum on each section formula.

-LB
 
If your data contains nulls, you need to test for them first. isnull(Section1) etc.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Thanks guys. The null values were the problem. I used the same concat formula for the sections and it worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top