Home » Developer & Programmer » Forms » Total field from another Block
Total field from another Block [message #587354] Fri, 14 June 2013 06:19 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi,

I have 2 blocks named emp,emp1 those are DB's Blocks and empno, ename, sal in EMP block and sal, sum(sal) are in EMP1 block, i set the property for sum is summarized block is: EMP1 and item is SAL, i want display sum(sal), but not display when i click execute query..

please please help how to fix this issue..

Thanks,
Siva
  • Attachment: image1.png
    (Size: 80.05KB, Downloaded 698 times)
Re: Total field from another Block [message #587355 is a reply to message #587354] Fri, 14 June 2013 06:29 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't understand the question, this:Quote:
i want display sum(sal), but not display when i click execute query

What does it mean? The way you wrote it, it says that you want to display a summary item, but leave it empty when you execute query. Is that so?

Or did you mean to say that you want to display a summary item, but - when you execute query - it remains empty?

By the way, why do you have 2 blocks? Why not only one? Summary item can reside in the same block as other items.
Re: Total field from another Block [message #587356 is a reply to message #587355] Fri, 14 June 2013 06:37 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thanks for reply,

I take sum field in another block and display sum(sal), is this possible?

Thanks,
  • Attachment: image1.png
    (Size: 62.14KB, Downloaded 665 times)
Re: Total field from another Block [message #587357 is a reply to message #587356] Fri, 14 June 2013 06:41 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, it is possible.
Re: Total field from another Block [message #587358 is a reply to message #587357] Fri, 14 June 2013 06:42 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Ok,

Could you please explain me or suggest me..


Thanks,
Siva
Re: Total field from another Block [message #587361 is a reply to message #587358] Fri, 14 June 2013 07:12 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
  • create the first, database block, containing all items from the EMP table
  • set its "Query all records" property to "Yes"
  • create another, control block
  • set its "Single record block" property to "Yes"
  • create a NUMBER datatype non-database summary item
  • set its Calculation properties to:
    - calculation mode = summary
    - summary function = sum
    - summarized block = <name of the first block>
    - summarized item = sal
  • run the form
  • execute query
  • summarized salaries will be displayed in a summary item
Previous Topic: FRM-30047
Next Topic: Form not Running
Goto Forum:
  


Current Time: Fri Apr 26 09:14:09 CDT 2024