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

Problem with string displaying 1

Status
Not open for further replies.

WaelYassin

Technical User
Jul 9, 2006
65
EG
Hi All ,
i am using CR 9, connecting to SQL Server database.
i have 2 groups, in the second group i have 5 summeries.
till now everything is alright, the problem arise when i am asked to add 3 string fields beside the summery fields which located in the group 2 footer. the 3 fields bound to 3 fields in the database which is not necessary to fill. but if you fill one record it means that the other nulls are the same with the data in that field.

what i need is a formula to retrieve the first not null value and display it aside the summeries.

G1 header
G2 header
detail
G2 footer f1 f2 f3 sum1 sum2 sum3 ......
G1 header

thanks for your time.
 
Sorry, this "you fill one record it means that the other nulls are the same with the data in that field." doesn't make sense, try rephrasing, or better yet, take a professional approach and supply example data and the expected output, it's simpler and clear.

A formula to display the first not null value of 3 fields would be:

if not(isnull({tale.f1})) then
F1
else
if not(isnull({tale.f2})) then
F2
else
if not(isnull({tale.f3})) then
F3
else
""

-k
 
Thank you synapse for your response.
again with more clear example:
the sample data in the table for the first 3 fields may look like this:
f1 f2 f3
wael NULL NULL
NULL SSSS NULL
NULL NULL TTTT
Wael SSSS TTTT

**the desired output
f1 f2 f3
Wael SSSS TTTT

in other meaning, i want for every field , to check for the first non value and take it as it will contain the same data or null value.
 
Try inserting a maximum on each field f1,f2,f3 at the group 2 level. This will pick up any non-null value in the group.

-LB
 
Thanks LB, it works. you can also reach the same result with descending sort in the sort expert for the 3 fields.
thanks for all of you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top