Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
50%
Handover everything to System Integrator from drawing BP till implementation of ERP
0%
Hire more inhouse skilled & capable IT Resource to work directly with SI
50%
Rely on SI Architects/Consultants
0%
Total votes: 4

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th June 2020, 11:41
pegaga1979 pegaga1979 is offline
Senior Member
 
Join Date: Oct 2008
Posts: 192
pegaga1979 is on a distinguished road
Baan: Baan V - DB: SQL - OS: WINDOWS 2003
To print address by format
Baan: Infor ERP 10.7
C/S: None/Unknown

Hi,

I would like to print BP address based on format.
currently i used namc,namd, ln02.
i noticed that some of standard report used array.
May i know how to design?
Reply With Quote
Sponsored Links
  #2  
Old 17th June 2020, 12:19
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,848
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox Tools 10.7 - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Adress-Format

Hello,
Code:
Using address formats

You use address formats to define how addresses must be printed on documents.

The address lines on a document are usually 35 positions. The maximum is 60 positions. For this reason, two fields are available for the Name, Street, and City name fields in the Addresses (tccom4130s000) session. This enables you to print parts of the name, address, and city on separate lines, or to print only the first parts.
Address format and address lines format

In the Addresses (tccom4130s000) session, you can link an address format in these fields:

    Address Format for Address Lines
    Address Format

The Address Format for Address Lines is used to retrieve the correct address data for the Address Line 1 through Address Line 6 fields in the Addresses (tccom4130s000) session. These address line (1-6) fields are mainly used to exchange address data between LN and an external package.

If you do not want these address line (1-6) fields to be updated each time an update is made to a field that is specified in the address format, you must leave the Address Format for Address Lines field empty. If required, you can upload address lines from the Update Address Formats (tccom4235m000) session.

The Address Format in the Addresses (tccom4130s000) session, is the standard format for the specified address. If this field is empty, LN retrieves a country address format or a default format.
Country address format

You can define an address format for a country in the Countries (tcmcs0110s000) session. You use this to specify if the house number precedes or follows the name of the street, and if the ZIP/postal code precedes or follows the name of the city, in a specific country. The country address format is used for all addresses in that country for which you do not specify a specific address format.
Default format

When you specify or select an address, you can optionally link an address format to it. However, LN cannot print an address if it cannot find the format to be used. You must specify a default format to avoid that addresses cannot be printed.

To use the default format, specify an address format for the address of the company in which you are working. You can specify an address for a company in the General Company Data (tccom0502m000) details session. From the Address Code field in the General Company Data (tccom0102s000) session, you can zoom to the Addresses (tccom4530m000) in which you can view the linked (default) address format.

LN uses the most specific format to print an address. It searches for and uses the address formats in this order:

    The format linked to the address
    The format defined for the country of the address
    The default format

One address in different formats

If the same address must be printed in different formats, you must make a copy of the address and specify a different format for the copy. You must specify a new, unique code for the copied address.

You use this, for example, if on a request for quotation you want to print the fax number and e-mail address, but on a shipping order this information is not necessary. You can also achieve this by specifying a lower priority for the fax number and e-mail address.
Code:
Defining address formats

You define an address format by using the Address Formats (tccom4135s000) session.

Define for each address field where and how it must be printed, by specifying:

    Line
    The number of the address line.
    Sequence
    The sequence number of this field on the line.
    Priority
    The priority of this field.
    Space
    The number of spaces to follow this field.

Sequence

You can use the sequence number to print more than one field on a line. If the fields do not fit on the line, the information is truncated at the end of the line. LN does not check the priorities of the fields in this case.
Priority

You can use the priority to indicate which address fields can be skipped. If there are not enough lines available to print the complete address according to the specified format, the lines that contain fields with a low priority are not printed. 1 = highest priority, 2 = second priority, and so on.
Free text

You can specify free text that will be inserted between the address fields. You can use this to add commas, or the text P.O. Box or CEDEX to the address.

Use the Communication tab of the Address Formats (tccom4135s000) session to define the free texts of a format.

You define the position of the free text in the same way as for the other address fields. You can define only one position for a free text. For example, if you need two commas, you must define two free texts with a comma.

For each format you can define:

    Three long free texts, of up to 20 characters each.
    Six short free texts, of up to 6 characters each.

Free text is treated as prefix and tag to the other address fields. These rules apply:

    A short free text at the end of a line is not printed (a long free text is).
    If there is only free text on a line, the line is not printed. The free text can be long free text or short free text.

For example, if you specify a format in which Name 2 is printed on line 2 followed by a free text, the entire line is skipped if the Name 2 field of the address is empty.
Note

You can specify the same combination of line, sequence, and priority for only one address field.
Example

Required printing address:
line 1:	Name
line 2:	Name 2
line 3:	P.O. Box (space) P.O. Box Number
line 4:	City, (space) City 2
line 5:	ZIP Code/Postal Code (space) (space) Country

 

Address Format	Line	Sequence	Priority	Space
Name	1	1	1	0
Name 2	2	1	1	0
P.O. Box Number	3	2	1	0
City	4	1	1	0
City 2	4	3	1	0
Country	5	3	1	0
ZIP Code/Postal Code	5	1	1	2
P.O. Box	3	1	1	1
,	4	2	1	2

 

where:

    P.O. Box is a long free text
    The comma is a short free text
__________________
//Bernd
Reply With Quote
  #3  
Old 18th June 2020, 02:44
pegaga1979 pegaga1979 is offline
Senior Member
 
Join Date: Oct 2008
Posts: 192
pegaga1979 is on a distinguished road
Baan: Baan V - DB: SQL - OS: WINDOWS 2003
Hi Bernd,
Thank you for the note.
The format actually already setup and available in the system.
However, i would like to print the same at my report which currently i used by standard field from table tccom130.
i checked from other standard reports, they used array.
so, i'm not sure how the script is designed.
Reply With Quote
  #4  
Old 18th June 2020, 04:42
tmannais's Avatar
tmannais tmannais is offline
Senior Member
 
Join Date: Jul 2017
Location: Bangkok, Thailand
Posts: 281
tmannais is on a distinguished road
Baan: LN 10.5, 10.6, 10.7 - DB: MSSQL - OS: Windows
Check this out.
http://www.baanboard.com/baanboard/s...ad.php?t=28007
for function tccom.dll4030.format.address()
Reply With Quote
  #5  
Old 18th June 2020, 06:24
pegaga1979 pegaga1979 is offline
Senior Member
 
Join Date: Oct 2008
Posts: 192
pegaga1979 is on a distinguished road
Baan: Baan V - DB: SQL - OS: WINDOWS 2003
hi,
actually i already read through the link. however, i'm not understand.
do i need to insert the function in my report script?
and how?
Reply With Quote
  #6  
Old 19th June 2020, 04:11
tmannais's Avatar
tmannais tmannais is offline
Senior Member
 
Join Date: Jul 2017
Location: Bangkok, Thailand
Posts: 281
tmannais is on a distinguished road
Baan: LN 10.5, 10.6, 10.7 - DB: MSSQL - OS: Windows
First, you declare a variable as an array of string.

Code:
extern	domain	tcmcs.str100m	addr(7)
or you can create in the input field of the report. Whatever makes it work for you, just try both options.

Then you call the function providing Address Code, Number of Line, and the array.

Code:
tccom.dll4030.format.address(tccom112.cadr,7,addr)
After the execution of that function, your array will have the formatted address data in separate lines. For example, you can just call
Code:
addr(1,3)
when you want the 3rd line of the text.

Note that I usually use
Code:
tccom.dll4035.format.address
instead of
Code:
tccom.dll4030.format.address
because it works for me; however, I don't know the difference between these two. Maybe one works in some versions and the other doesn't, or maybe it just works differently somehow.
Reply With Quote
  #7  
Old 19th June 2020, 13:20
DDPatel's Avatar
DDPatel DDPatel is offline
Member
 
Join Date: Dec 2018
Location: India,Gujarat,Umbergaon 396150
Posts: 33
DDPatel is on a distinguished road
Baan: LN10.3 - DB: SQL SERVER 2008 R2 - OS: WINDOW SERVER 2008 R2
This will be working fine....
We also used same method to print the address...
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
3GL ASCII-Menu System for ERP-LN AndreasSchmitt Tools Development 7 5th June 2008 12:07
Multiple date formats & currency formats by user. kphipps Tools Administration & Installation 6 9th November 2005 14:19
How can I print baan report in XML format? DDQING Tools Administration & Installation 1 12th May 2003 06:56
Print Packing slip does not print Delivery address halvorn Distribution, Transportation & Warehousing 1 30th January 2002 15:33


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


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