Home » Developer & Programmer » Forms » exceptions_in_summary_item (Forms 10g / Windows XP SP 3)
exceptions_in_summary_item [message #596301] Fri, 20 September 2013 01:57 Go to next message
m_shehpar
Messages: 73
Registered: October 2010
Location: Pakistan
Member
Hi everybody,

Can someone guide me on how to put exceptions while defining the summary item ? In one of my datablock there are certain lines whose "inactive_flag" gets a "Y" value on certain events. I want my summary item to exclude such amounts from summing up.

Please help.

Regards
Re: exceptions_in_summary_item [message #596320 is a reply to message #596301] Fri, 20 September 2013 05:39 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I can't check it now, but I *think* that you can't do that. Summary item sums them all or none. Therefore, you'd have to write some code in order to achieve desired functionality.
Re: exceptions_in_summary_item [message #596321 is a reply to message #596320] Fri, 20 September 2013 06:08 Go to previous messageGo to next message
m_shehpar
Messages: 73
Registered: October 2010
Location: Pakistan
Member
may be you are right, I've done too much RnD. but i couldn't come up with a coding solution. should i use a loop thing on each row validation or what do you suggest ???
Re: exceptions_in_summary_item [message #596334 is a reply to message #596321] Fri, 20 September 2013 15:00 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
A loop is one option (which would almost certainly work).

Another one (which is simpler to code) is to first POST changes you've made in that (data) block and then simply
SELECT SUM(column) INTO :summary_item FROM your_table WHERE inactive_flag = 'Y' AND <another condition(s) here>
Obviously, if you can't create a WHERE condition which would select data only from records that match the ones displayed in a form, that won't work.
Previous Topic: auto_line_numbering_mechanism
Next Topic: WebUtil.cfg dll's fail to download
Goto Forum:
  


Current Time: Thu Apr 25 14:23:45 CDT 2024