Baanboard.com

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

Retirement Notice

Baanboard is shutting down on 31-dec-2023. See: http://www.baanboard.com/baanboard/showthread.php?t=76043


User login

Frontpage Sponsor

Main

Poll
What do you expect from your SI Implementation partner for the success of ERP implementation.
Bring best practices - Not to offer more CR's Leveraging standard functions
14%
Need more honesty to work with the Users until their processes are fully mapped & Users are trained
43%
Focus on process automation/ integrations/ Real time data/ BI analytics
14%
Stick to basics
29%
Total votes: 14

Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 15th September 2023, 19:00
tion1976 tion1976 is offline
Member
 
Join Date: Jan 2023
Posts: 39
tion1976 is on a distinguished road
Baan: 4,5,6,10 - DB: sql - OS: windows
report how to print on next page some before.field and also footer
Baan: Infor ERP 10.7
C/S: Client

Hi,
I have a problem with a report with many layouts.
I have more before.field and they show on page #2 however the footer does not make it to show.
Somehow i figured out that I need to get to the next page by calling either page() or to.page(3). However, the remaining before.field layouts do not show even if i set the expression lattr.pageno=3
If I set the expression to the first I want to appear on page #3 it is displayed on page #1.
I am not sure that page() is the same Next page checkbox on layout attributes.

Code:
before.orco.43:
before.layout:
	if cntr=1 then
		lattr.print = false
	endif
	|#14092023.sn
|after.layout:
|	if cntr=2 then
|		to.page(3)
|		lattr.pageno = 3
|	endif
	|#14092023.en

before.orco.44:
before.layout:
|message("cntr %d", cntr)
	if cntr=1 then
		lattr.print = false
	endif
	|#14092023.sn
	if cntr=2 then
|		message("page %d", lattr.pageno)
		to.page(3)
|		lattr.pageno = 3
		lattr.print = true
Recap... I need to print the footer on every page.
How do i do that?
Reply With Quote
  #2  
Old 19th September 2023, 16:37
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,818
mark_h will become famous soon enoughmark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Well - I am missing something. If you add a footer layout to the report it should print every page. Now you can use certain things - like output expression to only print footers under certain conditions. So what am I missing? I am not sure you need the page commands at all.
__________________
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 22nd September 2023, 10:14
tion1976 tion1976 is offline
Member
 
Join Date: Jan 2023
Posts: 39
tion1976 is on a distinguished road
Baan: 4,5,6,10 - DB: sql - OS: windows
The issue was there were too many lines to print on that second page of report and not break the page. The content on that page was updated and it was twice as before.
With the updated content I had 5 layouts each of 22 lines.
What it worked for me:
1) I set Next page checkbox in the report layout #4 (out of those 5) and set output expression to be lattr.pageno>2
Also, I set the same output expression to be lattr.pageno>2 on the report layout #5 but no check on Next page.
2) On the report properties I set Foot margin 1 (instead of -1) and Page Length 70 (instead of -1). I noticed that before I had 3x22=66 lines on page.
I am not sure if page() and to.page(3) would have been worked on before.orca.44
BTW what is the difference between page and to.page ?
Reply With Quote
  #4  
Old 22nd September 2023, 11:01
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Posts: 1,982
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox Tools 10.7/D.3 - DB: tbase, ms-sql7, oracle10gV1, 11g, 12c, 19c - OS: HP-UX, W2K3, SLES, RHLE
page() , to.page()

Hello,

Code:
Report script functions
The statements programmed in a report script section consist of a combination 
of 3GL programming language features: overview and the following 4GL report functions: 

layout.again() Evaluate and print layout again. 
need( expr ) Force a page break if the number of free lines is less than expr.  
page() Start a new page. 
reset.suppress() It is possible to suppress printing a value when it is the same as 
the previous value. You can use this function to suppress the value once (that is, for one value).  
skip( expr ) Skip expr number of lines before printing the next layout.  
skip.to( expr ) Skip to the line number indicated by expr. Intervening lines are left blank. 
If the specified line number is less than the current page number, a new page is started.  
to.page( expr ) Start a new page with number expr.  
 
You cannot use need(), page(), skip(), skip.to(), or to.page() in header and footer layouts.
Regards
__________________
//Bernd
Reply With Quote
  #5  
Old 22nd September 2023, 11:57
tion1976 tion1976 is offline
Member
 
Join Date: Jan 2023
Posts: 39
tion1976 is on a distinguished road
Baan: 4,5,6,10 - DB: sql - OS: windows
Having lattr.pageco = 2 if i code to.page(16) in report script, does it create all the pages from the cuurrent (3) to 16 ?
I am not clear how useful is to use to.page rather than page? What is the use case for these functions?
Reply With Quote
  #6  
Old 22nd September 2023, 18:45
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,818
mark_h will become famous soon enoughmark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I always used page(). To page would start renumbering the pages so if you printed 3 pages and then had to.page(5) it would start a new page with 5. So you would have page numbers 1,2,3,5,...... All to.page does is start a new page numbers. The benefit of this is lets say you were printing 3 purchase orders - each time you hit a new purchase order you could say to.page(1) and the second purchase int he range would start with page number 1 and same for the 3rd order(how ever many you printed). Never did it myself, but can see how that can be helpful.
__________________
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 23rd September 2023, 22:42
OmeLuuk's Avatar
OmeLuuk OmeLuuk is offline
Guru
 
Join Date: Mar 2002
Location: NetherBelgium
Posts: 1,374
OmeLuuk will become famous soon enough
Baan: Infor LN 6.1 10.2.1 > 10.7 - DB: MS SQL2017 - OS: VM WindowsServer2016
I think you would have to play with the need setting on the report to account for the max length of the footer, making sure the report breaks its stream to place the footer on each page. No need for (programmatically) messing with page or to.page imho.
__________________

Also read Luke 24:4-8

After that you can find many answers on Infor, LN, BaanIV, BaanV, InforLN and ION and even some questions asked here on baanboard.com
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


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


©2001-2023 - Baanboard.com - Baanforums.com