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

Report problem, again !!! 1

Status
Not open for further replies.

HadiRezaee

Technical User
Mar 9, 2001
165
0
0
IR
In the name of GOD

Hi all,
I have a new problem in creating my report :(

I have a table(TOPERATE) with thease fields:

TGETGIVE ---> Boolean
TTOTAL ---> Long integer

I wanna show Total values in my report with below format:

Total Operate

200000 False
1000 True
50000 True
1200 True
50 False
450 True

---------------
B.E.D Total = 200050
B.E.S Total = 52650


Take a look to B.E.D and B.E.S values, carefuly !

All total values should add to B.E.D total when TGETGIVE value is False !
and
All total values should add to B.E.S total when TGETGIVE value is True !

How can i create formula for B.E.D and B.E.S Total ???

Please explain to me step by step !

HELP ME PLEASE :(

 
Hye Hadi,
Im no expert in Crystal but the way I would do this is:

1) Get your field explorer up (where you select fields to drag onto your report).
2) Right Click on Formula Field and select new.
3) Give the first formula a name eg BEDTotal.
4) OK, Now you are in the formula editor, Type something like:

IIF ({TOPRATE.TGETGIVE}="FALSE",{TOPRATE.TTOTAL} ,0 )

This should return the value for TTOTAL where TGETGIVE is equal to FALSE, otherwise return 0 add this new field into your report footer as a summary field.

Repeat the above for BESTotal where TGETGIVE = "TRUE"

It's not rocket science but it should work, it's pretty tricky doing this stuff through your head when you've only been using crystal for 3 weeks and can't test it on the data!!

Adam.
AdamFreestone@Lycos.Co.UK
 
Hadi,

zzAdm is mostly correct, but I would clarify that you should add the formulas to the detail band, and then you insert a grand total or subtotal field for each. The technique is described in faq149-243, and is called a conditional total. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top