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

Show the Net amount into the last line

Status
Not open for further replies.

david1218

Technical User
Apr 28, 2011
2
Hi all expert,

im newbie for the crystal report and currently using version 8.5. I have 1 report need to present like:

Product Description Amount
Detail section 1 {Table.field1}
Detail Section 2 {Table.field2}
Detail Section 3 {Table.field3) {NetAmount}

How to formula the report if i only have the data in the field 1 & 2, the Net amount need to show in the detail section 2. If i only have data in the field 1 then the net amount will show in detail section 1. if i have all the data in every field then the net amount will show at the last detail section.
Thank alot if have expert to help me solve this problem.
 
Are field1, field2, and field3 separate fields placed in detail_a, detail_b, and detail_c? Or are they different instances of the same field Product Description? Is there only one netamount field? And is this already calculated, i.e., you just want to know how you can display it where you want?

If the fields are separate fields, and there is only one netamount field, then you should be able to create three formulas, like this:

//detail_a amt:
if not isnull({table.field1}) and
isnull({table.field2}) and
isnull({table.field3}) then
{table.netamount}

//detail_b amt:
if not isnull({table.field1}) and
not isnull({table.field2}) and
isnull({table.field3}) then
{table.netamount}

//detail_c amt:
if not isnull({table.field1}) and
not isnull({table.field2}) and
not isnull({table.field3}) then
{table.netamount}

-LB
 
thx you for your prompt reply. Actually the field 1,2 & 3 is separate field and this 3 field is sharing 1 net amount.
Detail 1 : field1 = Product short description
Detail 2 : field2 = Product Long Description
Detail 3 : field3 = Product Line Item remark

Sometime user will key in field1 & 2 then they only need the net amount show at the detail 2. i try to use your formula but it cant work on it.
The result shown as:
Product Description Amount
1. Documentation & Clearance Fee - Customs No 0
0
0

2. Forwarding Supervisory Fee 0
Document No 0
200


3. Customs Examination Fee 0
Document No : 233 0
Service charge 1000


Upper is the 3 product after using the formula. But what i need is

Product Description Amount
1. Documentation & Clearance Fee - Customs No 100



2. Forwarding Supervisory Fee
Document No 200



3. Customs Examination Fee
Document No : 233
Service charge 1000


May i know what kind of formula i should use?
 
I gave you three separate formulas, and each should be placed ONLY in the section that I showed in the name of each formula.

Note also that you should reference the report sections by their actual names -- detail_a, detail_b, detail_c--to avoid confusion.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top