On May 22, 2008, at 2:33 AM, Emma Glaisher wrote:
Now, I want the Balloons calculation to say ‘Aha, the first letter
of Balloons is not the same as the first letter of Apples (the
previous record). I will need a heading to announce that there is a
new letter, so I shall also add into my calculation field:
<Heading>B<end Heading>return
<B>Balloons<B> 27
And I can’t see how to do it!
One way is to establish a calculation that will append the HEADER to
the first record of the Letter_Group:
Let say your TABLE is called "Products" and your fields are:
Product - (Text Result)
Qty - (Number Result)
Define a new field called:
Product_First_Letter - (Calculation, Text Result) = Left(Products, 1)
Define a new SELF-JOIN relationship (Product Table to Product Table)
called "First_Letter_Group":
Products::Product_First_Letter = Products::Product_First_Letter
Options - No creation/deletion of related records
Sort - Product (Ascending)
Define a new field:
Product_TAG - (Calculation, Text Result) =
If(Product = GetNthRecord ( First_Letter_Group::Product ; 1 );
"<Heading>" & Upper ( Left ( Product ; 1 ) ) & "<end Heading>¶<B>" &
Product & "<B> " & Qty; "<B>" & Product & "<B> " & Qty)
Make sure this field is UNSTORED (Storage Options....)
Use the Product_TAG field to generate the results you need.
Hope this helps!
Don Wieland
D W D a t a C o n c e p t s
~~~~~~~~~~~~~~~~~~~~~~~~~
[EMAIL PROTECTED]
Direct Line - (714) 389-4026
Integrated data solutions to fit your business needs.