Baanboard.com

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

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 11th November 2016, 03:11
DatinN DatinN is offline
Member
 
Join Date: Aug 2014
Posts: 65
DatinN is on a distinguished road
Baan: FP7 - DB: SQL - OS: Windows
Group Data in Query
Baan: ERP LN 6.1 FP7 (Infor ERP 10.1)
DB: SQL Server 2008 R2
OS: Windows 7
C/S: Both

Hi All,

Greetings to expert . I wrote a simple script for my aging report.
Additional to that, user request to group the data.
I'm using Baan Tool ttadv3530m000 for this script.

this is script i do ...
Code:
................................................................................................
declaration:
extern 	domain tcdate 		today, invdate
	domain tcmcs.long	no.of.days 
	domain tcamnt		amount
	
	
long 	lng.cdat, lng.ddta, lng.ctim, lng.dtim

before.program:
	today = utc.to.local (utc.num (), lng.ddta, lng.dtim)
detail.1:
before.layout:

amount = tdipu001.prip * whwmd530.qhnd

invdate = utc.to.local (whwmd530.idat, lng.cdat, lng.ctim)
no.of.days = lng.ddta - lng.cdat


if   tcibd001.csig = "" and no.of.days>120  
     group = "Aging" 
   
else if  tcibd001.csig ="" and no.of.days=120  then
      group = "Aging"

else if  tcibd001.csig = "" and no.of.days <120  then 
 	group = "Active" 

else if tcibd001.csig = "OB" then
 	 group = "Obsolete"

if tcibd001.csig = "PS" then
	group = "Pre-series" 

endif
................................................................................................
but when i compile, it gave error. I tried to resolve this and i got other error message .. this is the last portion i need to resolve before i deliver to my user . Hope, you could share on how to resolve this.

Thank you in advance
Attached Images
File Type: png error compilation.png (152.5 KB, 19 views)

Last edited by bhushanchanda : 22nd November 2016 at 12:32. Reason: Added code tags
Reply With Quote
  #2  
Old 11th November 2016, 05:43
manish_patel's Avatar
manish_patel manish_patel is offline
Senior Member
 
Join Date: Apr 2007
Location: Surat-->Bangalore, INDIA
Posts: 183
manish_patel is on a distinguished road
Baan: Baan IVc4, Baan 5.0 b - DB: Oracle 11g R2 - OS: HP-UX 11.31
check your IF ... THEN ... ELSE statement. It seems that "then" after first condition and "endif" keywords are missing

Instead I would right your condition as below

Code:
        ON CASE tcibd001.csig
        CASE "OB":
                group = "Obsolete"
                break
        CASE "PS":
                group = "Pre-series"
                break
        CASE "":
                if no.of.days <120 then
                    group = "Active"
                else
                    group = "Aging"
                endif
                break
        | DEFAULT:                    | optional
                | statements
        ENDCASE
__________________
Thanks & Regards,
Manish
Reply With Quote
  #3  
Old 11th November 2016, 07:46
DatinN DatinN is offline
Member
 
Join Date: Aug 2014
Posts: 65
DatinN is on a distinguished road
Baan: FP7 - DB: SQL - OS: Windows
hi Manish Patel,

thank you , your idea solved the error message .

the problem now, report didn't print the group
Attached Images
File Type: jpg Capture.JPG (72.4 KB, 16 views)

Last edited by DatinN : 11th November 2016 at 09:41. Reason: forgot
Reply With Quote
  #4  
Old 11th November 2016, 10:01
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 127
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
Debug the Report and check whether group is filled correctly or not. It may be due to a missing import variable in the input fields of the report or something else.
I don't remember how case will handle trailing spaces when used with a string variable. This may be worth checking too.
Reply With Quote
  #5  
Old 11th November 2016, 10:30
manish_patel's Avatar
manish_patel manish_patel is offline
Senior Member
 
Join Date: Apr 2007
Location: Surat-->Bangalore, INDIA
Posts: 183
manish_patel is on a distinguished road
Baan: Baan IVc4, Baan 5.0 b - DB: Oracle 11g R2 - OS: HP-UX 11.31
As suggested by Andreas, trailing space could be issue.
Could you replace ON CASE tcibd001.csig with ON CASE trim(tcibd001.csig) and check whether it is working or not.

(Assuming that all the required fields/variables are added in report input fields.)
__________________
Thanks & Regards,
Manish
Reply With Quote
  #6  
Old 14th November 2016, 03:03
DatinN DatinN is offline
Member
 
Join Date: Aug 2014
Posts: 65
DatinN is on a distinguished road
Baan: FP7 - DB: SQL - OS: Windows
Ok, I will try
Reply With Quote
  #7  
Old 22nd November 2016, 11:00
DatinN DatinN is offline
Member
 
Join Date: Aug 2014
Posts: 65
DatinN is on a distinguished road
Baan: FP7 - DB: SQL - OS: Windows
Hi,

I got this message :

Compilation Failed
rwhsqlagover3 (29): Error: Unresolved reference to function 'trim'.

thank you
Reply With Quote
  #8  
Old 22nd November 2016, 11:12
BChary's Avatar
BChary BChary is offline
Junior Member
 
Join Date: Apr 2016
Location: Poland
Posts: 9
BChary is on a distinguished road
Baan: Infor LN 10.4/10.5 - DB: SQL Server - OS: W10
You should use a trim$("something"), not a trim("something")
Reply With Quote
  #9  
Old 23rd November 2016, 07:33
DatinN DatinN is offline
Member
 
Join Date: Aug 2014
Posts: 65
DatinN is on a distinguished road
Baan: FP7 - DB: SQL - OS: Windows
Hi BChary,

It works !

thank you all support manesh_patel & andreas toepper.

thank you
Code:
ON CASE trim$ (tcibd001.csig)
CASE "OB":
                group = "Obsolete"
                break
        CASE "PS":
                group = "Pre-series"
                break
         CASE "PS8":
                group = "Pre-series8"
                break
        CASE "":
                if no.of.days <120 then
                    group = "Active"
                else
                    group = "Aging"
                endif
                break
        ENDCASE
Attached Images
File Type: jpg Capture aging.JPG (133.2 KB, 9 views)

Last edited by mark_h : 23rd November 2016 at 14:50. Reason: forgot add in script..added code tags
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
Use of "background" keyword in Baan kruyoupatel Tools Development 2 27th April 2016 07:03
current.mwindow() spartacus Tools Development 2 10th September 2009 12:43
Application data dictionary vs. run-time data dictionary NPRao Tools Development 5 7th July 2009 08:16
ERPJewels Hitesh Shah Third Party Products 10 6th November 2006 05:38
No permission for query group text mig28mx Tools Administration & Installation 4 20th September 2004 16:59


All times are GMT +2. The time now is 00:23.


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