View previous topic :: View next topic 
Author 
Message 
helmerj OOo Advocate
Joined: 12 Aug 2004 Posts: 235 Location: Germany

Posted: Thu Aug 12, 2004 11:00 pm Post subject: how to hide the result of "sum=(..) when result is zero 


Hi!
I created a form in OO 1.1.2 (writer) that I plan to use as an order form. The form includes a small table in which the user of the form will enter the item to order, the amount to order and the price per unit. The resulting final price per item is calculated using the "sum=" function by multiplying the price with the number of items fields.
Only problem I have is, that the empty form since I did use the "sum=" function shows a "0.00" in all final price fields that have no price and amount (are not used so to speak...) since it no matter what calculates 0x0.00 is 0.00 for the empty fields.
So here is my question:
Can I make the showing of a result of "sum=" in a table conditional? I only what the result to show up if it is larger than 0. A bit of a cosmetic rather than a crucial thing but it definitely would be nice...
Any ideas?
Thanks Juergen 

Back to top 


r_vinoya Super User
Joined: 03 Dec 2003 Posts: 619 Location: Somewhere in the Philippines

Posted: Fri Aug 13, 2004 1:21 am Post subject: Re: how to hide the result of "sum=(..) when result is 


helmerj wrote:  Hi!
I created a form in OO 1.1.2 (writer) that I plan to use as an order form. The form includes a small table in which the user of the form will enter the item to order, the amount to order and the price per unit. The resulting final price per item is calculated using the "sum=" function by multiplying the price with the number of items fields.
Only problem I have is, that the empty form since I did use the "sum=" function shows a "0.00" in all final price fields that have no price and amount (are not used so to speak...) since it no matter what calculates 0x0.00 is 0.00 for the empty fields.
So here is my question:
Can I make the showing of a result of "sum=" in a table conditional? I only what the result to show up if it is larger than 0. A bit of a cosmetic rather than a crucial thing but it definitely would be nice...
Any ideas?
Thanks Juergen 
I know 2 ways to do this:
1) Using "If" statement
2) Using conditional formatting
the 2nd part needs more explanation so I would explain only the first part for the meantime.
Using "If" statement:
your formula should look like:
Code:  =if(sum(A1:A5)<=0;"";sum(A1:A5)) 
P.S. (Edited Post)
oops, the method I showed is for Calc...
I don't know yet how to do this in Writer... _________________ # :  ) 

Back to top 


helmerj OOo Advocate
Joined: 12 Aug 2004 Posts: 235 Location: Germany

Posted: Fri Aug 13, 2004 3:15 am Post subject: Re: how to hide the result of "sum=(..) when result is 


r_vinoya wrote: 
I know 2 ways to do this:
1) Using "If" statement
2) Using conditional formatting
the 2nd part needs more explanation so I would explain only the first part for the meantime.
Using "If" statement:
your formula should look like:
Code:  =if(sum(A1:A5)<=0;"";sum(A1:A5)) 
P.S. (Edited Post)
oops, the method I showed is for Calc...
I don't know yet how to do this in Writer... 
Hi!
Thanks for your suggestions. I wasn't aware of the first method and I only knew the one with the conditional formating. Unfortunatly both of them only work in calc. I have tried to adapt the if statement formula for writer but it always results in a faulty expression. I then thought of embedding a calc sheet in the writer document but then the persion using it has to double click first to activate the embedded sheet. That's also no improvement...
Juergen 

Back to top 


JohnV Administrator
Joined: 07 Mar 2003 Posts: 9183 Location: Lexinton, Kentucky, USA

Posted: Fri Aug 13, 2004 3:45 am Post subject: 


Use a number format like #,##0.00;#,##0.00;# in the table cells for the sums. 

Back to top 


helmerj OOo Advocate
Joined: 12 Aug 2004 Posts: 235 Location: Germany

Posted: Fri Aug 13, 2004 4:05 am Post subject: 


JohnV wrote:  Use a number format like #,##0.00;#,##0.00;# in the table cells for the sums. 
Hi!
Thanks a lot, that did it!
Juergen 

Back to top 


David Super User
Joined: 24 Oct 2003 Posts: 5668 Location: Canada

Posted: Fri Aug 13, 2004 9:07 am Post subject: 


JohnV wrote:  Use a number format like #,##0.00;#,##0.00;# in the table cells for the sums. 
It might be noticed that I don't usually knock Open Office suite, but when will they do some catchup, and why such inordinate effort to do something so commonly used? A long time back, when taking a course in programming, I had thought that it might not be too long before the wordprocessor/spreadsheetdatabase was in fact just one program. Certainly, tables have come a long way towards being fully functional spreadsheets. Corel allows the simple insertion of a very familiar form of the IF, and SUM statements [and many others.] I don't understand the need for comparatively awkward 'workarounds' in such common useage, and am reminded that I can drive 200 miles in reverse if I have to, but ..why?
David. 

Back to top 


bobharvey Super User
Joined: 23 Apr 2004 Posts: 1075 Location: Lincolnshire

Posted: Mon Aug 16, 2004 12:45 am Post subject: 


David wrote:  .... it might not be too long before the wordprocessor/spreadsheetdatabase was in fact just one program....  Back in the Dark Ages Ashton Tate had a programme called Framework , based on the prinicples of 'outlining'. In effect both text and spreadsheets were 'embedded' in an indexed structure.
You can do the same sort of thing with object embedding, but I agree with you, some sort of convergence between tables and spreadsheets would be interesting. 

Back to top 


