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 5th April 2012, 11:48
camste camste is offline
Junior Member
 
Join Date: Aug 2009
Posts: 28
camste is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle - OS: Linux
Report script not executing (I think)
Baan: ERP LN 6.1
C/S: None/Unknown

Hi everybody,
I'm having a problem with a report I'm making. There are two sessions calling this same report, but based on different items. Because of this I wanted some of the linked data to be fetched in the report instead of in the session scripts to avoid copying and pasting the code (or making a function for this small logic).

In one of my sessions I then have this (the other one is based on the rows in warehouse receipts though, so the fetching is done with a different query, but it still gives the item):

Code:
function read.main.table()
{
        select  tcibd001.*
        from    tcibd001
        where   tcibd001._index1 inrange {:item.f}
                                     and {:item.t}
        order by tcibd001._index1
        selectdo
                rprt_send()
        endselect
}
Simple enough right?

In the report script:
Code:
declaration:
        table ttcibd003
        table ttdisa001
        table ttcmcs001
        table ttcibd001
        
        extern domain cddev.str16       item.short

before.program:
        item.short = "test"
        
Detail.1:        
before.layout:
        if isspace(tcibd001.item) then
                item.short = "No!"
        else
                select  tcibd003.*, tdisa001.*, tcmcs001.*
                from    tcibd003, tdisa001, tcmcs001
                where   tcibd003._index1 = {:tcibd001.item,tdisa001.cuqs}
                  and   tdisa001._index1 = {:tcibd001.item}
                  and   tcibd003.unit refers to tcmcs001
                selectdo
                        item.short="Found"
                selectempty
                        tcibd003.conv = 1
                endselect
                item.short = "Yes!" | tcibd001.item(10;16)
        endif
I've just been trying to debug using this item.short variable, but it seems like it doesn't call my report script at all! Item.short always appears as empty in the report results, even though the item has been fetched. The description is shown. I've tried compiling the report script in debug mode, but it never enters into debug.

Report layout fields:
item.short, tcibd001.dsca, tdisa001.cwar, tdisa001.cuqs, tcibd003.conv and tcibd001.cuni

Input fields:
item.short, num.labels, tcibd001.item, tcibd001.dsca, tdisqa001.cwar, tdisa001.cuqs, tcibd003.conv and tcibd001.cuni
The report shows values for the two fields from tcibd001, but not for the other ones which should be computed.

Why isn't it called?? I've tried looking at other scripts in Baan, but it all seems similar, and it doesn't look like like there's anything missing.
Reply With Quote
  #2  
Old 5th April 2012, 17:35
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,649
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Try !

Code:
function read.main.table()
{
        select  tcibd001.*
        from    tcibd001
        where   tcibd001._index1 inrange {:item.f}
                                     and {:item.t}
        order by tcibd001._index1
        selectdo
                rprt_send()
        endselect
}
Simple enough right?

In the report script:
Code:
declaration:
        table ttcibd003
        table ttdisa001
        table ttcmcs001
        table ttcibd001
        
        extern domain cddev.str16       item.short

before.program:
        item.short = "test"
        
Detail.1:        
before.layout:
|put tcibd001.item in detail.1

        if isspace(tcibd001.item) then
                item.short = "No!"
        else
                select  tcibd003.*, tdisa001.*, tcmcs001.*
                from    tcibd003, tdisa001, tcmcs001
                where   tcibd003._index1 = {:tcibd001.item,tdisa001.cuqs}
                  and   tdisa001._index1 = {:tcibd001.item}
                  and   tcibd003.unit refers to tcmcs001
                selectdo
                        item.short="Found"
                selectempty
                        tcibd003.conv = 1
                endselect
                item.short = "Yes!" | tcibd001.item(10;16)
        endif

        lattr.print = false

detail.2:
before.layout:

|put the expected fields in layout 2 !
Regards
__________________
//Bernd

Last edited by bdittmar : 5th April 2012 at 17:36. Reason: Code tags moved
Reply With Quote
  #3  
Old 6th April 2012, 19:35
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
report script

Quote:
Originally Posted by camste View Post
Hi everybody,
Why isn't it called?? I've tried looking at other scripts in Baan, but it all seems similar, and it doesn't look like like there's anything missing.
Probably because layout details.1 does not exist or it has print condition always returning false.
Reply With Quote
  #4  
Old 6th April 2012, 23:32
steveauckly steveauckly is offline
Senior Member
 
Join Date: Sep 2001
Location: Kansas City, MO, USA
Posts: 168
steveauckly is on a distinguished road
Baan: Baan IVc4 SP26 - DB: Oracle 10g - OS: Windows XP Pro
If it never enters debug mode, then you probably have an instance of the report running and it will not load the debug version. Check your processes.
Reply With Quote
Sponsored Links
  #5  
Old 7th April 2012, 11:19
ulrich.fuchs's Avatar
ulrich.fuchs ulrich.fuchs is offline
Guru
 
Join Date: Aug 2001
Location: Germany
Posts: 514
ulrich.fuchs is on a distinguished road
Baan: IV, LN6.1 - DB: --- - OS: ---
If the report doesn't enter debug mode, then that's the problem you need to solve. Obviously your code and what's in the compiled object is not the same. Try to become more sure about that: Put a before.report layout it, and type some text in that layout ("blabla" will do). Compile, execute. Does it print? If not, one reason could be that you have the report again in a higher package VRC that hides your object. Can you find it in the "Reports" Session? No? Go and check on the file system ($BSE/application), that's what counts in the end, might be, that something is hanging around there, that is not in the data dictionary any longer,
__________________

Dipl. Ing. Ulrich Fuchs
- ERP consulting and software development -
Widumestra├če 18 - 44787 Bochum - Germany
mail@ulrich-fuchs.de - www.ulrich-fuchs.de
http://all-in-for-erp.com (Blog zu Infor LN))
Reply With Quote
  #6  
Old 7th April 2012, 15:42
camste camste is offline
Junior Member
 
Join Date: Aug 2009
Posts: 28
camste is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle - OS: Linux
It works now

My office mate was able to debug it in the end. He was logged in as bsp. I have no idea if that was the reason he could debug it. I don't believe this report was running anywhere else before since I was developing it by myself. And it didn't exist in any other vrc than the one I was developing in. But there he found that the query didn't return any values. Changing the query made the report show the right values. (But I think it's strange that it didn't show these test values in the item.short variable at least, since they didn't depend on the data.) Afterwards I saw that I needed to log out and in again to see the new values though. I don't know if there might be some caching going on somewhere. I had tried logging in over again several times while I was developing though, so I have no idea what happened. It works now at least. But thank you everybody.
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
print 2nd report from 1st report script cmandal Tools Development 6 15th October 2012 00:56
Good Practice for storing 'external' source code in BAAN shah_bs Code & Utilities 1 30th July 2008 23:02
Session input fields in report script sivasankari Tools Development 3 13th February 2008 08:00
Variable value different in pgm. script & report script ? PacSun Tools Development 5 28th June 2006 20:09
solving recursion problems rmarles Tools Development 2 25th January 2005 22:23


All times are GMT +2. The time now is 01:46.


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