Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
Would you like to see a separate forum on Baanboard for the ION product?
No
14%
Yes
86%
Total votes: 80

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 11th December 2001, 10:33
spartacus's Avatar
spartacus spartacus is offline
Guru
 
Join Date: Dec 2001
Location: Germany
Posts: 764
spartacus is on a distinguished road
Baan: BaanERP 5.0c - DB: Oracle 8 - OS: SunOS 5.9
report function "need()"

I programmed in a reports after field section a "need()" function call. I retrieved the argument for need from tttxt002.nlin (The number of lines, which the current text needs). I tried also with a fixed number as argument, but that doesn't help. The report crashes sometimes with the message :"Function need; Recursion not possible refcount=2; Can not continue in <reportnp> in DLL: ottstprepdll(get.company).."

Is it possible, that this is a problem of the report DLL?

Thanx
Spartacus
Reply With Quote
  #2  
Old 11th December 2001, 16:38
Han Brinkman's Avatar
Han Brinkman Han Brinkman is offline
Guru
 
Join Date: Aug 2001
Location: The Netherlands
Posts: 1,055
Han Brinkman has a spectacular aura aboutHan Brinkman has a spectacular aura about
Baan: All - DB: Oracle/ms-sql/db2 - OS: *nix/windows
Be carefull

Could it be that it crashes because you have texts with more than 60 lines, meaning that it will never fit on one page?

Regards,
Han
Reply With Quote
  #3  
Old 11th December 2001, 18:30
spartacus's Avatar
spartacus spartacus is offline
Guru
 
Join Date: Dec 2001
Location: Germany
Posts: 764
spartacus is on a distinguished road
Baan: BaanERP 5.0c - DB: Oracle 8 - OS: SunOS 5.9
I think this cannot be the reason. I think I have a maximum about 12 lines
Reply With Quote
Sponsored Links
  #4  
Old 12th December 2001, 16:39
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Louisville, KY, USA
Posts: 5,941
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Shot in the dark

I have never used the need function, but I see from your post that you are checking it in an 'after field' section. Is it in the after.print or before.print section? From a quick glance at my knowledge quest CD it mentioned that you would use this function in the before.print section on a text field. I am not sure if that makes a difference. Just a guess - I really thought Han had solved it.

Mark
Reply With Quote
  #5  
Old 13th December 2001, 09:25
spartacus's Avatar
spartacus spartacus is offline
Guru
 
Join Date: Dec 2001
Location: Germany
Posts: 764
spartacus is on a distinguished road
Baan: BaanERP 5.0c - DB: Oracle 8 - OS: SunOS 5.9
need in before print

Hi Mark,

thanks for that hint, but I used it in a "before.print" - section.

Thanks
spartacus
Reply With Quote
  #6  
Old 13th December 2001, 10:28
Han Brinkman's Avatar
Han Brinkman Han Brinkman is offline
Guru
 
Join Date: Aug 2001
Location: The Netherlands
Posts: 1,055
Han Brinkman has a spectacular aura aboutHan Brinkman has a spectacular aura about
Baan: All - DB: Oracle/ms-sql/db2 - OS: *nix/windows
Debug

Can you reproduce the error? If you can I would suggest that you debug the report script, I don't have a clue why it happens. For sure Baan doesn't support recursive calls so you have to find out by debugging what exactly is happening.

Rgrds,
Han
Reply With Quote
  #7  
Old 13th December 2001, 21:07
spartacus's Avatar
spartacus spartacus is offline
Guru
 
Join Date: Dec 2001
Location: Germany
Posts: 764
spartacus is on a distinguished road
Baan: BaanERP 5.0c - DB: Oracle 8 - OS: SunOS 5.9
DEbug

Hi Han,

I can not debug, because at the moment I have no access to that system anymore.
Due to a lag of time I programmed the "need()" manually, with spool.pg.length and the actual line number. That works fine.

The report which is concerned is a cust of one of the tisfc0408m000 reports. In the program-script of this session the reporthandling is realized with brp.open, brp.close...... (IMHO a little complicated). Maybe the reason for the problem with
"need()" is related to that.

Greetings
spartacus
Reply With Quote
  #8  
Old 13th August 2002, 08:28
arunkw's Avatar
arunkw arunkw is offline
Member
 
Join Date: Jan 2002
Location: mumbai
Posts: 48
arunkw is on a distinguished road
Baan: Baan IV c4 Version: B40c.65 - DB: Bisam - OS: Sun Solaris 8
Lightbulb Had solved same problem

Hi Spartacus,
I had encountered same Probelm of Recursion not possible for function say "need()" ref count = 2
I think that in Baan Resursion is restricted or not allowed [ i might be wrong to say that ]
but what i did to solve this proble is to have two functions calling each other
ie
Code:
|        calling need.one() function from main body 
         need.one()
...
function need.one()
{
    if condition then
         need.two()
    else 
|    Exit through the function
    endif 
}

function need.two()
{
    if condition then
         need.one()
    else 
|    Exit through the function
    endif 
}
Thanks and Regards
Arun
__________________
mail me at arunkw@yahoo.com
Reply With Quote
  #9  
Old 13th August 2002, 12:39
jaapzwaan's Avatar
jaapzwaan jaapzwaan is offline
Member
 
Join Date: Jul 2002
Location: Amersfoort, NL
Posts: 98
jaapzwaan is on a distinguished road
Baan: None - DB: None - OS: Win XP
Recursion

Recursion in Baan is possible, as long as you don't use function arguments and local variables. So in the example above: it is not because you use two functions that makes it possible, it is because you don't have local variables and no function arguments.
Reply With Quote
  #10  
Old 30th July 2004, 03:21
pcolombo's Avatar
pcolombo pcolombo is offline
Member
 
Join Date: Feb 2003
Location: Rosario - Argentina
Posts: 72
pcolombo is on a distinguished road
Baan: Baan IV c4, Baan 5c ,ERP LN 6.1 - DB: Oracle ,Microsoft SqlServer, Informix, MySql - OS: Windows, UNIX, Linux
Hi , Just Today i had the same problem. It occurs when you have a text field in a footer layout ( in despite you have text fields defined in details layout). you can discover where is the problem , running the report in debugger, entering "c" in the debugger session. Once the program stop pointing the line who caused the problem you can determine ( by the name of the function in generated script), who were the format/s where the text field is placed.

Hope this post can helps you and sorry about my english
Reply With Quote
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
xml question steveauckly Tools Development 4 27th July 2004 10:41


All times are GMT +2. The time now is 10:57.


©2001-2013 - Baanboard.com - Baanforums.com