Home » Developer & Programmer » Forms » Calculation Total in Application (Oracle 9i, Dev6i)
Calculation Total in Application [message #499738] Wed, 16 March 2011 00:40 Go to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
I'm getting trouble in getting the sum of all the product's prize present in the form fields of invoice form. For example, I user bought 2 products so I want to get there prize sum in the total box. I first want that I've QUANTITY, DISCOUNT and SELLING PRIZE.

If I multiply Quantity with Selling Prize then I gets the result in Product and Quantity Total Box. However, Now I want to add discount option in it. Means if user is providing 10% discount to his/her customer then Quantity * Selling Prize - Discount% becomes a result in product's solution final prize box.
Here is the pic..
http://picturespk.pk/images/bwy1300253935p.jpg

Look...Now here..I've added 22 in quantity.. now if I'll insert 10% in discount then the total will comes in Amount Display Box.

I'm currently using this coding on on Prize Box..
:SP_PRODUCT_PTOTAL := NVL(:SP_PRODUCT_QUANTITY,0) * NVL(:SP_PRODUCT_PRIZE,0) * NVL(:SP_PRODUCT_DST,0) / 100;


Please help me..I'm curiously waiting..
Re: Calculation Total in Application [message #499746 is a reply to message #499738] Wed, 16 March 2011 01:39 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
Quote:

I'm getting trouble in getting the sum of all the product's prize present in the form fields of invoice form.


Please read this post it'll help for getting the sum.


http://www.orafaq.com/forum/m/492528/81953/#msg_492528

Use Summary Function - Sum
Summarized Block - Block Name
Summrized Item - Amount


Regards,

Irfan
Re: Calculation Total in Application [message #499775 is a reply to message #499746] Wed, 16 March 2011 03:35 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
FRM-30426: Summarized control item must reside in a control block, or in a block with Query All Records set to Yes.
Item: TOTAL
Block: SBM_SALES_PRODUCTS
FRM-30085: Unable to adjust form for output.


Getting this now..

Regards,
Hamza Waqas
Re: Calculation Total in Application [message #499777 is a reply to message #499775] Wed, 16 March 2011 03:37 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
And this
FRM-30397: Warning: Summary Function ignored for non-summary item SBM_SALES_PRODUCTS.TOTAL.
FRM-30399: Warning: Summarized Item Name ignored for non-summary item SBM_SALES_PRODUCTS.TOTAL.

Created form file D:\Projects\Other Projects\SMS\inv.fmx
Re: Calculation Total in Application [message #499779 is a reply to message #499777] Wed, 16 March 2011 03:40 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
Irfan Bhai.. Mujhay Sb sy pehly Row ka total Ka Total Amount Box main chahye.. And phr saari Rows ka total "Total" box main chahye..please help me yar...wrna ye bosses..
Re: Calculation Total in Application [message #499780 is a reply to message #499777] Wed, 16 March 2011 03:48 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Quote:

FRM-30426: Summarized control item must reside in a control block, or in a block with Query All Records set to Yes.
Item: TOTAL
Block: SBM_SALES_PRODUCTS
FRM-30085: Unable to adjust form for output.


1 - Go to Block SBM_SALES_PRODUCTS Set Block property Query All Records YES.
2 - Go to TOTAL Item's Property Set No of Items Displayed 1
3 - Also Database Item Property NO.

Quote:

FRM-30397: Warning: Summary Function ignored for non-summary item SBM_SALES_PRODUCTS.TOTAL.
FRM-30399: Warning: Summarized Item Name ignored for non-summary item SBM_SALES_PRODUCTS.TOTAL.
Created form file D:\Projects\Other Projects\SMS\inv.fmx



Remove this space D:\Projects\OtherProjects\SMS\inv.fmx

Regards,
Irfan
Re: Calculation Total in Application [message #499783 is a reply to message #499780] Wed, 16 March 2011 03:57 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
first issue
SBM_SALES_PRODUCTS.TOTAL.
FRM-30399: Warning: Summarized Item Name ignored for non-summary item SBM_SALES_PRODUCTS.TOTAL.


now here is the result pic..not getting the right thing..
http://picturespk.pk/images/viu1300265675k.jpg

See Irfan Bhai.. First of all, I want to get the total of Qauntity * prize - Discount% in Amount Text Box..
Then you've seen there is a tabular structure.. It means that invoice can get multiply products at a time. I first want the total of first row in Amount Box. This is the database column..Then like user added 5 products in invoice so every row will show it's total amount in AMOUNT BOX.. Clear Bhai?

2nd thing I want to get is the total of all the AMOUNTS generated in tabular form in TOTAL BOX.. This is my total scenario. So then, my this face of application would be ended. Can you help me please? I'm working in software house and new here.. Please?
Re: Calculation Total in Application [message #499787 is a reply to message #499783] Wed, 16 March 2011 04:05 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Could you post your detail block property Calculation Screenshot.
Re: Calculation Total in Application [message #499788 is a reply to message #499787] Wed, 16 March 2011 04:09 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,

Put this below code in POST-CHANGE trigger at Detail Block level
:Amount:= NVL(:SP_PRODUCT_QUANTITY,0) * NVL(:SP_PRODUCT_PRIZE,0) * NVL(:SP_PRODUCT_DST,0) / 100;



Regards,

Irfan


[Updated on: Wed, 16 March 2011 04:10]

Report message to a moderator

Re: Calculation Total in Application [message #499792 is a reply to message #499787] Wed, 16 March 2011 04:21 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
ok..here are the screen shots of both blocks. This form is consisting on Master Details..
--SBM_SALES_RECORD--
http://picturespk.pk/images/cqs1300266715k.jpg
2nd part of block properties.
http://picturespk.pk/images/rgh1300266809a.jpg
3rd part of block properties.
http://picturespk.pk/images/jdv1300266789j.jpg
-- SBM_SALES_PRODUCTS--
http://picturespk.pk/images/bwy1300266976o.jpg
2nd part..
http://picturespk.pk/images/rgh1300267227y.jpg
3rd part..
http://picturespk.pk/images/bwy1300267109y.jpg

See, here are the properties of blocks..
Re: Calculation Total in Application [message #499793 is a reply to message #499788] Wed, 16 March 2011 04:24 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member

:Amount:= NVL(:SP_PRODUCT_QUANTITY,0) * NVL(:SP_PRODUCT_PRIZE,0) * NVL(:SP_PRODUCT_DST,0) / 100;


Irfan Bhai now this script is making the calculation of Quantity * Prize..but not deducting the Discount %..
Re: Calculation Total in Application [message #499794 is a reply to message #499793] Wed, 16 March 2011 04:25 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
FRM-30397: Warning: Summary Function ignored for non-summary item SBM_SALES_PRODUCTS.TOTAL.
FRM-30399: Warning: Summarized Item Name ignored for non-summary item SBM_SALES_PRODUCTS.TOTAL.


Got Error on compiling but it is running the form..
Re: Calculation Total in Application [message #499797 is a reply to message #499794] Wed, 16 March 2011 04:37 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
I needed this Property Part of your's detail block.
/forum/fa/8792/0/


  • Attachment: Snap.PNG
    (Size: 15.57KB, Downloaded 9743 times)
Re: Calculation Total in Application [message #499802 is a reply to message #499797] Wed, 16 March 2011 04:44 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
I'm not getting where it is? PO_NO is not my any column.. Not getting the solution..huh.. Sir, I just have this.. I changed the property of TOTAL to the same..wait let me see again..
Re: Calculation Total in Application [message #499812 is a reply to message #499802] Wed, 16 March 2011 05:20 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
The issue of AMOUNT is not solved.. not getting the result of Quantity * Prize - Discount%
And here is the property of TOTAL BOX..
http://picturespk.pk/images/jdv1300270789y.jpg

Amount = SP_PRODUCT_PTOTAL

[Updated on: Wed, 16 March 2011 05:21]

Report message to a moderator

Re: Calculation Total in Application [message #499815 is a reply to message #499812] Wed, 16 March 2011 05:26 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,

/forum/fa/8793/0/

Put Calculation Mode Summary instead of None.


Regards,

Irfan
  • Attachment: Calc.PNG
    (Size: 22.80KB, Downloaded 9861 times)
Re: Calculation Total in Application [message #499816 is a reply to message #499815] Wed, 16 March 2011 05:33 Go to previous messageGo to next message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
FRM-30396: Summary Function required for summary item.
Item: SP_PRODUCT_PTOTAL
Block: SBM_SALES_PRODUCTS
Form: INV
FRM-30085: Unable to adjust form for output.


Getting this error. Form is not running..
Re: Calculation Total in Application [message #499902 is a reply to message #499816] Wed, 16 March 2011 11:27 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
So what is the Summary Function property of that item set to?
Re: Calculation Total in Application [message #499933 is a reply to message #499902] Wed, 16 March 2011 14:16 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You are doing it in a completely wrong manner, trying and failing all day long. Creating a summary item is quite easy, only if you read some help and follow what you've learnt (and being told).

The last message you got says that you created a summary item, but didn't specify summary function.
Re: Calculation Total in Application [message #500415 is a reply to message #499933] Mon, 21 March 2011 01:34 Go to previous message
ArkeologeN
Messages: 37
Registered: March 2011
Location: Karachi, Pakistan
Member
well, i've done all in invoice.. my total invoice is completed now ^_^ .. however, now getting error in calender..Sad
Previous Topic: How to send a message from Oracle to all application users logged in the Forms application?
Next Topic: Hide username and password
Goto Forum:
  


Current Time: Tue Sep 17 05:07:44 CDT 2024