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
38%
Installation Wizard into new VRC
38%
Manual into existing VRC
5%
Manual into new VRC
19%
Total votes: 42

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 11th April 2018, 20:31
ben.kansas's Avatar
ben.kansas ben.kansas is offline
Member
 
Join Date: Aug 2007
Posts: 69
ben.kansas is on a distinguished road
Baan: LN, Baan IV - DB: SQL Server - OS: Windows 7
Text field on Report
Baan: Other/Unknown
C/S: None/Unknown

Hello,

We have a custom session to print our Contract Acknowledgement in LN 10.5 using LN UI.

On the report, we want to print the contract line text (tpctm110.text). We've placed it on the report in its own layout.

When the text field has a large amount of text, the report prints the first line, then skips to a new page. The new page is blank (no text from the text field, though it does print the other before field layouts). Then prints the remainder of the data on the report.

The full text is not printed.

Any advice on how to fix this?

Thanks,
Ben
Attached Images
File Type: png COA.png (50.7 KB, 12 views)
Reply With Quote
  #2  
Old 11th April 2018, 21:31
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,020
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Does it do the same thing if sending it to a display or a file?
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #3  
Old 11th April 2018, 22:51
ben.kansas's Avatar
ben.kansas ben.kansas is offline
Member
 
Join Date: Aug 2007
Posts: 69
ben.kansas is on a distinguished road
Baan: LN, Baan IV - DB: SQL Server - OS: Windows 7
Sending to Display the text is truncated after the first line.

However, sending to a file, all of the text prints.
Reply With Quote
  #4  
Old 12th April 2018, 14:36
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,020
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I am not sure about your version, but we have had instances where the users cut and paste into text from word(for example) and this causes some weird things to happen. I was wondering if you could confirm it is plain text? This is about the only thing I can think of right offhand.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #5  
Old 12th April 2018, 18:39
ben.kansas's Avatar
ben.kansas ben.kansas is offline
Member
 
Join Date: Aug 2007
Posts: 69
ben.kansas is on a distinguished road
Baan: LN, Baan IV - DB: SQL Server - OS: Windows 7
So I took your advice. I retyped all of the text to make sure that it was plain text. Now I am getting about half of the text printing.

It looks like the report is then trying to do a page break, but then isn't continuing with printing the text field.
Attached Images
File Type: png COA1.png (70.0 KB, 11 views)
File Type: png COA2.png (26.7 KB, 5 views)
Reply With Quote
Sponsored Links
  #6  
Old 13th April 2018, 14:44
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,020
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I was just looking at our print PO's and the layout that does text and I do not see anything special around it. Do you have any print page breaks turned on for the other layouts? One thing you can try is cloning it to a new report - then delete all layouts except text. Run it see what happens - then add layouts one at a time watching what happens with each addition. I am not even sure that will help. Swagging it here.

We do printing via UNIX printers. Most of our printers have formfeed checked - not sure if any of this makes a difference or not.

PS - when you re-typed it you spelled department wrong. That almost looks like our standard PO type text.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #7  
Old 13th April 2018, 17:48
ben.kansas's Avatar
ben.kansas ben.kansas is offline
Member
 
Join Date: Aug 2007
Posts: 69
ben.kansas is on a distinguished road
Baan: LN, Baan IV - DB: SQL Server - OS: Windows 7
Hi Mark,

Thanks for the advice. I took it.

I re-discovered in the process that on the layout I set the output expression to lattr.break, which would prevent the layout from printing on a page break, regardless of whether the text is complete.

Because the layout is a before.field type, I don't want it to print every time there's a new page. So I need to do some manual control on when the when the layout is printed.

Any suggestions on detecting that the text isn't complete and using lattr.print to control whether the layout prints?

Maybe something using lattr.textlineno and comparing it to the total number of lines in the text field?
Code:
txt.file = bse.temp.dir$() & "/ConTxt"
lines = text.read("tpctm110.text", "2", kw1, kw2, kw3, kw4, grp, opt, txt.file, 0)

if not lattr.break then
    if lattr.textlineno <= lines  then
        lattr.print = TRUE
    else
        lattr.print = FALSE
    endif
else
    lattr.print = TRUE
endif


Thanks,
Ben

Last edited by ben.kansas : 13th April 2018 at 18:09.
Reply With Quote
  #8  
Old 13th April 2018, 23:59
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,020
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Hmm - could you set a variable to like print.mylayout = true. Then in the after.layout set it to false. Then in the before layout test if print.mylayout the print it, if false set my print.layout = false. You then go into the layout for when you want to trigger it to print again - you just have to figure out when you want it to print again and set the print.mylayout back to true. I have actually used empy layouts just to trigger the script to do something.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #9  
Old 16th April 2018, 20:03
ben.kansas's Avatar
ben.kansas ben.kansas is offline
Member
 
Join Date: Aug 2007
Posts: 69
ben.kansas is on a distinguished road
Baan: LN, Baan IV - DB: SQL Server - OS: Windows 7
Here's the really frustrating part.

When the report is printed via BWPrint, it is fine. All the text prints and layouts are handled correctly.

However, we use LN UI and send our documents to the DOM for printing. When run through the DOM, the report cuts off half of the text.

If I remove the text field before print section, then it prints all of the text, but doesn't handle page breaks correctly.
Code:
field.tpctm110.text:
before.print:
	txt.file = bse.tmp.dir$() & "/ConTxt"
	txt.lines = text.read("text", "2", kw1, kw2, kw3, kw4, grp, opt, txt.file, 0)
	need(txt.lines)

Any advice on handling this with the DOM?
Attached Images
File Type: png COA via BWPrint.png (20.7 KB, 4 views)
File Type: png COA via DOM with field text.png (40.9 KB, 5 views)
File Type: png COA via DOM without field text.png (47.0 KB, 4 views)
Reply With Quote
  #10  
Old 17th April 2018, 14:09
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,020
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Sorry I do not know anything about the LN UI or DOM. Wait and see if someone comes along on DOM usage.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #11  
Old Yesterday, 21:45
ben.kansas's Avatar
ben.kansas ben.kansas is offline
Member
 
Join Date: Aug 2007
Posts: 69
ben.kansas is on a distinguished road
Baan: LN, Baan IV - DB: SQL Server - OS: Windows 7
Any help with DOM usage?
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
Invoices printing issue-display last record with 2 lines tracylee Tools Development 7 20th October 2017 10:51
Technical question adding TEXT field Cancoon2000 Tools Development 5 30th June 2015 20:26
How to identify a selected TEXT field Cancoon2000 Tools Development 3 25th June 2015 18:06
Problem in making text field to be mandatory field alerts Tools Development 10 17th December 2013 09:24
Appending text to a report field pjohns Tools Development 5 22nd July 2003 15:59


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


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