Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
33%
Installation Wizard into new VRC
39%
Manual into existing VRC
6%
Manual into new VRC
22%
Total votes: 49

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 12th November 2003, 13:38
pjohns's Avatar
pjohns pjohns is offline
Guru
 
Join Date: Aug 2001
Location: Surrey - UK
Posts: 554
pjohns is on a distinguished road
Baan: IVc4 SP31 with HiDox - DB: Oracle 11.2.0.2 - OS: RHEL 5.8
Striping blank spaces in print expressions

Hello,

What is the correct syntax to use in print expressions when I want to strip white space (blanks).

I've tried strip[report field] and strip$[report field] but these don't appear to work.

Many thanks

PJ
Reply With Quote
  #2  
Old 12th November 2003, 13:47
Ilansu's Avatar
Ilansu Ilansu is offline
Member
 
Join Date: Feb 2002
Posts: 81
Ilansu is on a distinguished road
Baan: Bann IV C4 ,C2 - DB: informix - OS: Unix , NT
strip

Try strip$(shiftl$(field.name))

Ilan
Reply With Quote
  #3  
Old 12th November 2003, 14:03
pjohns's Avatar
pjohns pjohns is offline
Guru
 
Join Date: Aug 2001
Location: Surrey - UK
Posts: 554
pjohns is on a distinguished road
Baan: IVc4 SP31 with HiDox - DB: Oracle 11.2.0.2 - OS: RHEL 5.8
Hello again Ilan,

Whenever I try to enter a strip$ etc I get the error box that says "Field not defined as report input"

The field is defined in maintain report input fields. It's only when you try to add extra syntax into the print expression box you get this error.

Rgds

PJ
Reply With Quote
  #4  
Old 12th November 2003, 14:18
BaanForever BaanForever is offline
Member
 
Join Date: Nov 2003
Location: Moscow, Russia
Posts: 43
BaanForever is on a distinguished road
Baan: IVc4 - DB: Oracle 8 - OS: Win NT
It's not error - it's warning

It's not error - it's warning.
It work correct with this message.
Example: double: amount = 10, gross.amount = 12.
You can print gross.amount - amount. ==> 2
Message will appears, but it will work.
As for string - you sould use aligments box to shift it left or right. Lenth is allways set up in lenth box. It will helps only when you want in 1 field print value of several strings. for exmpl.
string a.str= " asd ", b.str = " fre "
strip$(shiftl$(a.str)) & "/" & strip$(shiftl$(b.str))
==> "asd/fre" in aligment and lenth as set up on form
__________________
Sorry for my English.
Reply With Quote
  #5  
Old 12th November 2003, 14:27
Ilansu's Avatar
Ilansu Ilansu is offline
Member
 
Join Date: Feb 2002
Posts: 81
Ilansu is on a distinguished road
Baan: Bann IV C4 ,C2 - DB: informix - OS: Unix , NT
layout

As BaanForever mentioned it's a warning

if u want to avoide the warning then u should edit the report script.

field.1:
before.layout:
field=strip$(shiftl$(field))

Ilan
Reply With Quote
  #6  
Old 12th November 2003, 15:12
pjohns's Avatar
pjohns pjohns is offline
Guru
 
Join Date: Aug 2001
Location: Surrey - UK
Posts: 554
pjohns is on a distinguished road
Baan: IVc4 SP31 with HiDox - DB: Oracle 11.2.0.2 - OS: RHEL 5.8
Hello,

Thanks for your input.

I have made the changes to my print expression and have acknowledged the warning message. But when I print my layout I still get white space printed. Please see the attached detailing my report field set-up. I have tried with the 'Link with Domain' option on and off.

I have no report script for this layout. Do I need one at this point? What I'm trying to do is generate a simple one line report that I can create a csv file from.

Regards

PJ
Attached Images
File Type: jpg report_fields.jpg (55.7 KB, 216 views)
Reply With Quote
  #7  
Old 12th November 2003, 15:39
patvdv's Avatar
patvdv patvdv is offline
Board Master
 
Join Date: Aug 2001
Location: Belgium
Posts: 2,166
patvdv is on a distinguished road
Baan: n/a - DB: n/a - OS: AIX, HP-UX, Linux
GRRRR. 2 offenders in one day! One more time today and I will ban MS Word document formats from this forum
__________________
Regards,

Patrick Van der Veken - Admin & Founder - (c) 2001-2018 baanboard.com/baanforums.com
Reply With Quote
  #8  
Old 12th November 2003, 15:43
BaanForever BaanForever is offline
Member
 
Join Date: Nov 2003
Location: Moscow, Russia
Posts: 43
BaanForever is on a distinguished road
Baan: IVc4 - DB: Oracle 8 - OS: Win NT
Do U read what i write for U?
Set aligment to "Left". And there will be happyness.
__________________
Sorry for my English.
Reply With Quote
  #9  
Old 12th November 2003, 15:51
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,096
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Just thought..

PJ,

I was just reading this post and I think I just realized what you were asking. If you have a report field that takes 25 characters, then when you print that field there will be blanks at the front or the back of the field. That is all the shifts do when running to a CSV. I do not think there is a way to shrink the total line width - is that what you are trying to do?


Mark
Reply With Quote
  #10  
Old 12th November 2003, 15:52
pjohns's Avatar
pjohns pjohns is offline
Guru
 
Join Date: Aug 2001
Location: Surrey - UK
Posts: 554
pjohns is on a distinguished road
Baan: IVc4 SP31 with HiDox - DB: Oracle 11.2.0.2 - OS: RHEL 5.8
Pat: - Sorry!

BaanForever: - I did read your suggestion and did set the alignment to Left but I found no happiness. (Sorry I forgot to attach the correct screen shot)

What else can you suggest I try?

Regards

PJ
Reply With Quote
  #11  
Old 12th November 2003, 15:58
pjohns's Avatar
pjohns pjohns is offline
Guru
 
Join Date: Aug 2001
Location: Surrey - UK
Posts: 554
pjohns is on a distinguished road
Baan: IVc4 SP31 with HiDox - DB: Oracle 11.2.0.2 - OS: RHEL 5.8
To Mark

Mark,

That is exactly what I am trying to achieve!

If my report field is 25 characters long and the printed data is only 10 characters then I don't want to see 15 blank spaces.

e.g. ,12345678910 (15 blank spaces) , should have an output of 12345678910,


PJ
Reply With Quote
  #12  
Old 12th November 2003, 16:10
BaanForever BaanForever is offline
Member
 
Join Date: Nov 2003
Location: Moscow, Russia
Posts: 43
BaanForever is on a distinguished road
Baan: IVc4 - DB: Oracle 8 - OS: Win NT
Try this

strangely.
Set domain not tcbano, but some domain tcmcs.str15m(with left alig), set left aligment, and use strip$(shiftl$()). may be this will work.
__________________
Sorry for my English.
Reply With Quote
  #13  
Old 12th November 2003, 16:46
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,096
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Excel maybe...

Are you going to be using this CSV file with Excel? Or with another app. You may want to run the report to disk first and then strip out spaces.

Mark
Reply With Quote
  #14  
Old 12th November 2003, 16:51
pjohns's Avatar
pjohns pjohns is offline
Guru
 
Join Date: Aug 2001
Location: Surrey - UK
Posts: 554
pjohns is on a distinguished road
Baan: IVc4 SP31 with HiDox - DB: Oracle 11.2.0.2 - OS: RHEL 5.8
payment file

Mark,

I'm trying to create a layout that will generate a payment file out of the cash management module of Baan Finance.

The idea being that once the user has run through the process of maintaining a supplier payment the csv file will be created on the server somewhere which will then be swept up by a job which will transfer the file to the bank. I suppose I could write a unix script that will strip these spaces out but I would prefer to resolve this issue at time of file generation. Are you saying that I have no other option but to manipulate the file once it has been created?

Regards

PJ
Reply With Quote
Sponsored Links
  #15  
Old 12th November 2003, 17:04
BaanForever BaanForever is offline
Member
 
Join Date: Nov 2003
Location: Moscow, Russia
Posts: 43
BaanForever is on a distinguished road
Baan: IVc4 - DB: Oracle 8 - OS: Win NT
radical method

In script(session or report by your preference) use another variable reoprt.tfcmg001.bano with domain of same lenth, but left aligment. in script use reoprt.tfcmg001.bano = strip$(shiftl$(tfcmg001.bano))
and use in layout variable report.tfcmg001.bano

This will work 100%.
__________________
Sorry for 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
How to print a blank PO daniel5455 Distribution, Transportation & Warehousing 1 21st August 2003 16:38


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


©2001-2018 - Baanboard.com - Baanforums.com