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

Need a jump start with this crystal report

Status
Not open for further replies.

spining123

Technical User
Jun 5, 2003
33
US
I am trying to create a Statistic Report using Crystal Report. I successfully created two basic reports with no problem. This one I will need a jump start with writing formulas.

Each record have a collection_number, title, type, and number_of_items. The three types are C, I, and R.
I would like to group the report by collection_number with a subgroup by title.
For each collection_number group I will have 3 field columns. C for Copy, I for Inter, and R for Reader.
Under each column for each collection_number group are the statistic fields, sum the number_of_items for that collection_number (this is the Item field) and sum the number of records with the same collection_number (this is the Use field).

Example:
Collection Number/Title Copy Inter Reader
Use Item Use Item Use Item
00018
TitleABC 3 6 2 2 10 20

000020
TitleEFG 1 2 5 5

The first Collection group have 3 C-type Users with a total of 6 Items, 2 I-type Users with a total of 2 Items and 10 R- type Users with a total of 20 items. Therefore, there are 15 records with the same Collection Number and Title.

Your help is truly appreciated with getting this report started.
 
You'll have to do a manual crosstab to achieve this layout. First group on {table.CollectionNo}. It looks like there is one title per collection number, but if there is more than one, you might want to concatenate that with the collection number and group on that.

To create your column fields, create six formulas:

{@CUse}:
if {table.type} = C then 1 else 0

{@CItem}:
if {table.type} = C then {table.item} else 0

Repeat for types "I" and "R". Then insert sums on each formula and display them in the header or footer and suppress the details.

Let me know if you need further assistance.

-LB
 
Thank you very much LB (lbass) for your quick response. The formulas worked. This was very helpful, now I'm able to continue to work on the report with a better understanding of using formulas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top