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
  #16  
Old 23rd November 2016, 14:49
lotius81 lotius81 is offline
Junior Member
 
Join Date: Nov 2016
Posts: 25
lotius81 is on a distinguished road
Baan: Infor LN 10.4 - DB: SQL Server - OS: Windows Server 2008
Certainly. For starters I used gunther's advice for replacing the r.write.seq.file() function. This was so I could use my new.concat.date variable as a sorted input. Set them appropriately in the before.program section.

Code:
declaration:
    domain tcmcs.long            old.concat.date
    extern domain tcmcs.long     new.concat.date
    extern domain tcbool         report.sort

    #define ORIGINAL.FUNCTION()     originally.generated.r.write.seq.file()
    #define r.write.seq.file()      ORIGINAL.FUNCTION()
Code:
functions:
#undef  r.write.seq.file()
function extern r.write.seq.file()
{
    new.concat.date = val(sprintf$("%u(%04Y%02m%02d)",tisfc010.prdt))
    ORIGINAL.FUNCTION()
}
I used the after.receive.data section to determine when to trigger my subtotal line. Finding the after.receive.data section in the documentation was a big help. old.concat.date is initially set to 0 in the before.program section, so I used that in the if statement to suppress the first empty subtotal that was printing (since the first record's date and 0 are always different, it triggered a subtotal line immediately. a simple "and old.concat.date <> 0" fixed that). In my detail section, I manually accumulate the number that will be displayed in the subtotal line instead of using the aggregate, so I also zero it out here if the subtotal line boolean is true in order to start over.

Code:
after.receive.data:
    if new.concat.date <> old.concat.date and old.concat.date <> 0 then
        report.sort = 1
    else
        report.sort = 0
    endif

    if report.sort = 1 then
        subtotal = 0
    endif
Code:
detail.4:
before.layout:

    subtotal = subtotal + tisfc010.qpli

    | some additional query code here...
After the detail layout prints I use the after.layout to set the old.concat.date variable equal to the new (current record) date for use on the next iteration.

Code:
after.layout:
    old.concat.date = new.concat.date
In my layouts, my after.field triggers on the new.concat.date input field created earlier. The output expression is "report.sort = 1". And presto. It sorts based on date only and not time!
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
Production Start Date Joy Conner Manufacturing & Supply Chain 2 27th September 2012 15:20
Production Date on a Production Order cherokee Manufacturing & Supply Chain 0 19th November 2004 17:26
Measuring Original MRP Start Date on SFC order Bryan Manufacturing & Supply Chain 3 3rd September 2004 12:48


All times are GMT +2. The time now is 07:29.


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