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!

how to make a group ?

Status
Not open for further replies.

ron9999

Programmer
Feb 14, 2003
89
AT
I'm new with CR8.5 and want to know how to make a group.
fields
n(5) c(10) c(10) l(.f.)

now as long as field logic is .t. I need a group

GH l(.t.)
D as long l(.t.)
D as long l(.t.)
D as long l(.t.)
GF l(.t.)
in my case, every reord is a
GH
D and
GF

GH
D and
GF

GH
D and
GF

thanks
Ron


 
Ron

Try building an IF Then else formula based on your conditions, then group on that formula.

Ian Waterman
UK Crystal Consultant
 
thank you Ian,
this question was quite the same as my first about grouping
"need help with group please!"
I guess I have troubles with the explanation of my requirement ;)
thanks
Ron
 
thank you Ian,
this question was quite the same as my first about grouping
"need help with group please!"
I guess I have troubles with the explanation of my requirement ;)
thanks
Ron
 
Ron

Canyou build a formula which cn uniquely define the groups your require?

If yse then create that formula callit GHFormula.

Go to Insert on the main menu and select Group, this will open a window click on the drop down list and scroll down until you find the formula
@GHFormula

then click OK, you have now created a group on that formula.

If you can not create a formula as above, tell us what you want to do and we may be able to help.

Ian
 
Hi Ian,
yes I guess I can create a formula. In this case I only use
{table.ALTERNATIV} in CR-syntax, is a boolean field.
But I think I try to explain my problem with a address.
Supposed I have a address table with name, zip, city and any amount-field
now I like to make a report that shows "all addresses"
sorted by zip!
and all ways when the amount is < 1000 make a group.
I thought, I have to make first a group of zip
And than a group of amount with the formula
If (amount <1000) is that correct?

I use the report-writer of VFP for about 10 years and it is very difficult
because there I have to handle each record with if else .. and as I could
see in this coupler days I play around with CR I have much more possibilities with CR
Ron
 
You state that as long as the field logic = .t., then you need a group.

Groups, as with Fox or real SQL, are not used for just part of the data, either the data is grouped, or it is not.

If you're trying to omit rows which are not .t., then use Report-> edit Selection Formula->Record and place something
like:

{table.field} = .t.

Rather than text descriptions of what you're attempting, perhaps you can show example data and expected output, which your first post sort of did...

And demonstrate how you want your data output with an example rather than a text description, especially when you have language hurdles.

-k
 
hi synapsevampire,
I'm not sure if I understand your mess (my fault due to my English) but here is a example data of my record

Fields among other in a free fox2x table:
tp-field n(5) // is to sort
title# c(10) // is a title# as string like &quot;0001&quot;
pos# c(10) // is a position# as string like &quot;0001&quot;
txtfield c(50) // is item-descriptions
price long(20,2) // currency
alter bool(.f.) flag // if true don't sum and print it //in a different color
eventual bool(.F.) flag // as alter field

tp-field title pos txtfield price alter
1 0001 0001 item-description 120,00 .f.
2 0001 0002 item-description 120,00 .f.
3 0001 0003 item-description 120,00 .f.
//alter
4 0001 0004 item-description 120,00 .t.
5 0001 0005 item-description 120,00 .t.
6 0001 0006 item-description 120,00 .t.
//normal
7 0002 0001 item-description 120,00 .f.
8 0002 0002 item-description 120,00 .f.
9 0002 0003 item-description 120,00 .f.




the report should look like

offer:
Title# pos# txtfield price //normal-item1
Title# pos# txtfield price //normal-item2
Title# pos# txtfield price //normal-item3
//(alternative group)
alter describ header
Title# pos# txtfield price //alternative1-item1
Title# pos# txtfield price //alternative1-item2
Title# pos# txtfield price //alternative1-item3
alter sum
//(alternative end)

Title# pos# txtfield price //normal-item4
Title# pos# txtfield price //normal-item5
//an other (alternative group)
Title# pos# txtfield price //alternative2-item1
Title# pos# txtfield price //alternative2-item2
Title# pos# txtfield price //alternative2-item3
//(alternative end)
Title# pos# txtfield price //normal-item6
Title# pos# txtfield price //normal-item7
.....
sum of all price except of alter

of course I can make it with out group but I thought it will be more easy with group.

Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top