Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 6th February 2003, 11:30
Leenaa Leenaa is offline
Member
 
Join Date: Jan 2003
Location: Chandigarh(India)
Posts: 38
Leenaa is on a distinguished road
Baan: baan IV - DB: SQL - OS: Windows NT
totalling problem

hi all !

I m facing a problem ,
in my program i don't want to show those supplier whom balance is less than 25 ,
i hv done this by:

after.suplier field
if balance <25 then
lattr.print = 0
endif

but by doing this it's not showing the correct grand total

What should i do?
__________________
Regds,
leena
Reply With Quote
  #2  
Old 6th February 2003, 12:06
zardoz's Avatar
zardoz zardoz is offline
Guru
 
Join Date: Jan 2003
Location: Torino, Italy
Posts: 445
zardoz is on a distinguished road
Baan: Triton 2, Triton 3, Baan IV, Baan ERP, Baan LN - DB: Oracle, Tbase, MS Sql - OS: Unix, Windows
Just use two differents layouts for after.field, using the output expression for the first one "balance >=25" and for the other one "balance < 25".
Keep the number of lines of the second one equal to 0 (DON'T EDIT IT).
Remove the condition from the report script.
The total sum must be correct now.
Reply With Quote
  #3  
Old 6th February 2003, 12:43
morpheus's Avatar
morpheus morpheus is offline
Guru
 
Join Date: Jun 2002
Location: Planet of the apes
Posts: 369
morpheus is on a distinguished road
Baan: BaaN IV c4 - DB: BaaN Base - OS: HP-UX 11
Post

Leena,
You must be using aggregate function on the field, and the grand total must be adding up all the amounts. lattr.print suppresses the print, but the aggregate function considers all the records. So, instead of putting a control in the report format, try adding the amounts in the script (as per the logic), and print that variable in "after.suno".
Reply With Quote
  #4  
Old 6th February 2003, 12:59
Youp2001's Avatar
Youp2001 Youp2001 is offline
Senior Member
 
Join Date: Oct 2001
Location: Netherlands
Posts: 121
Youp2001 is on a distinguished road
Baan: Baan IVc4, BaanERP 5.0c - DB: Oracle - OS: Unix
Why make things so difficult

Why make things so difficult.

You were on the right way. You can suppress the lines to be printed by adding a condition (balance > 25) on layout level or by adding the condition in your script.

Then you define a layout for your total. Use the same variable as the balance variable in your detail, but make it a total field (aggregate function). Then define the condition in the where. This condition must be similar to your print condition. So if you want to totalize all amounts > 25 then enter in the where expression: balance > 25

That should do it
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TSS problem on NT/Informix Mads Lund Tools Administration & Installation 0 24th March 2004 11:45
Problem with deleting a record. drifter Tools Development 5 2nd September 2003 11:53


All times are GMT +2. The time now is 04:55.


©2001-2017 - Baanboard.com - Baanforums.com