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
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 15th January 2012, 18:57
Elrodyn Elrodyn is offline
Senior Member
 
Join Date: Sep 2008
Posts: 170
Elrodyn is on a distinguished road
Baan: LN 6.1 - DB: Sql Server - OS: Windows server 2003
[report script customization] tisfc0401m000 details not repeating?
Baan: Infor10 ERP
C/S: Server

Dear way of the baan/LN Gurus,


I have a problem on the report of tisfc0401, i want to create a report of production order that print also the materials.

so for example, the production order is prod0001 and there are 6 lines of material the display will be:

prod order : prod0001
material:
1 item A 5
2 item B 10
3 item C 20
....
..
6 item D 5


the problem is the details lines that contains the material item code and quantity is printed only once, and it only shows the last item. i already created a variable test to check how many of the details that looping and the result is 6, but it still only printed once.

below is part of my code on the details:

Detail.3:
before.layout:
Select
ticst001.sitm:ItemCodeLine,ticst001.pono
From ticst001
where ticst001.pdno = :tisfc001.pdno

Selectdo
test=test+1
layout.again()
selectempty
lattr.print = false
endselect

it seems my problem is similar to this:
http://www.baanboard.com/baanboard/s...t=layout.again

but unfortunately the solution there did not solve my problem, please help me on this.

Thank You,

Roy
Reply With Quote
  #2  
Old 17th January 2012, 19:48
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,924
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
The post by en@frrom should contain the solution. Notice what he is doing - getting 1 row at a time using "> " to always get the next record. Your code should do the same type actions. The code you posted would always find the first record and then do layout.again. Below is something like your code should look like.

Code:
detail.2:
before.layout:
      holdpono = 0

Detail.3:
before.layout:
     Select ticst001.sitm:ItemCodeLine,ticst001.pono
     From ticst001
     where ticst001.pdno = :tisfc001.pdno
     and ticst001.pono > :holdpono
     as set with 1 rows
     Selectdo
             holdpono = ticst001.pono
             layout.again()
      selectempty
             lattr.print = false
      endselect
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #3  
Old 17th January 2012, 22:57
ipineda's Avatar
ipineda ipineda is offline
Member
 
Join Date: Aug 2008
Posts: 38
ipineda is on a distinguished road
Baan: BaaN V, LN - DB: Oracle - OS: Unix, Windows
A different approach to get what you need is to use ticst001 as the main table in the report so you will loop as many times as the number of materials you have. In this case each material will be a detail in the report and you can use a before.field to show the info about the SFC order. Obviously this is applicable only if you can create new report functionality because if you just want to customize this don´t make any sense. In the latest, I suggest to try mark_h commentaries and see what happen.
Reply With Quote
  #4  
Old 18th January 2012, 06:24
Elrodyn Elrodyn is offline
Senior Member
 
Join Date: Sep 2008
Posts: 170
Elrodyn is on a distinguished road
Baan: LN 6.1 - DB: Sql Server - OS: Windows server 2003
Hello All,


i will try the solutions today.

it was pretty funny because i remember doing the exact same thing with layout.again() function and it worked as it should...but it is not happening now.

Thanks,

Roy
Reply With Quote
  #5  
Old 19th January 2012, 09:18
Elrodyn Elrodyn is offline
Senior Member
 
Join Date: Sep 2008
Posts: 170
Elrodyn is on a distinguished road
Baan: LN 6.1 - DB: Sql Server - OS: Windows server 2003
Hello,


I already tried the script...but it still returned only the last row...i wonder where did it went wrong...



Roy
Reply With Quote
  #6  
Old 19th January 2012, 17:41
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,924
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Post your complete script. Or maybe try moving the detail.3 to the after.layout. The few reports I checked I always do the layout.again in an after.layout event to keep looping. In my mind doing it in the before.layout - actually happens before it prints, and loops. Then would only print the last one.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #7  
Old 19th January 2012, 18:29
Elrodyn Elrodyn is offline
Senior Member
 
Join Date: Sep 2008
Posts: 170
Elrodyn is on a distinguished road
Baan: LN 6.1 - DB: Sql Server - OS: Windows server 2003
Hello Mark,


below is the full code of my report.

Code:
|******************************************************************************
|* tisfc040101000   VRC B60  a  dr38
|* Production Orders by Order Number     
|* 
|* 12-01-12 [20:36]
|****************************** declaration section ***************************

declaration:

extern domain tcdsca DESCRIPTION
extern domain tcuef.effn COLOR
extern domain tcdsca COLORDESCRIPTION
extern domain tcutcs PlanDelDate
extern domain tcitem ItemCodeLine
extern domain tcdsca DescriptionLine
extern domain tiqcp1 EstQTY
extern domain tiqcp1 NetQTY
extern domain tcopno STARTOPR
extern domain tcopno NEXTOPR
extern domain tctano TASK
extern domain tirou.mcno MACHINE

extern domain tcamnt holdpono


table ttisfc001       |Production Order
table ttcibd001       |Item General
table ttisfc005       |Order Distribution
table ttcuef002       |Unit Effectivity
table ttisfc010       |Production Order Line
table tticst001       |Production Order Line Estimated Material Line 


before.program:
test =0

Header.1:
before.layout:


Select
tcibd001.dsca:DESCRIPTION
From tcibd001
where tcibd001.item ={:tisfc001.mitm}
SelectDo
EndSelect

Select
tisfc005.effn:COLOR
From tisfc005
where tisfc005.pdno ={:tisfc001.pdno} 
SelectDo
EndSelect

Select
tisfc001.pldt:PlanDelDate
From tisfc001
where tisfc001.pdno ={:tisfc001.pdno} 
SelectDo
EndSelect


detail.1:
before.layout:
      holdpono = 0

Detail.2:
before.layout:
     Select tisfc001.pdno,ticst001.pdno,ticst001.sitm:ItemCodeLine,ticst001.pono
     From ticst001
     where
 ticst001.pdno = {:tisfc001.pdno}
   and 
ticst001.pono > :holdpono
     as set with 1 rows
     Selectdo
             holdpono = ticst001.pono
             layout.again()
      selectempty
           lattr.print = false
      endselect

let me try your solution again....i am really curious of this report, please help me solve this problem.

Thanks,

Roy

Last edited by mark_h : 19th January 2012 at 19:51. Reason: Add code tags
Reply With Quote
  #8  
Old 19th January 2012, 19:53
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,924
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Yeah try it in the after.layout. The first line printed might have a 0 in it, but that can be remedied.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
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
Good Practice for storing 'external' source code in BAAN shah_bs Code & Utilities 1 30th July 2008 23:02
Variable value different in pgm. script & report script ? PacSun Tools Development 5 28th June 2006 20:09
FS Script for the Session tdslsl205s001(Maintain Excise Invoice Details) KHN Naik AFS/DDC/OLE: Function servers 0 30th October 2002 18:15


All times are GMT +2. The time now is 18:27.


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