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
36%
Installation Wizard into new VRC
36%
Manual into existing VRC
7%
Manual into new VRC
22%
Total votes: 45

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 25th November 2003, 09:57
drifter's Avatar
drifter drifter is offline
Junior Member
 
Join Date: Jun 2003
Location: Sometimes Idon't know...
Posts: 23
drifter is on a distinguished road
Baan: 5 - DB: Oracle - OS: XP
Lines to page end on report?

Hello everybody!

What I am trying to find out is if it is possible to know in the program script how many lines are left until the page end? I guess in report script there is something for that but is there a way in program script? I only found that I can get the total number of lines that fit on report and then I could make my own counting function but is there any other way?

Thanks for ideas!

d.
Reply With Quote
  #2  
Old 25th November 2003, 11:19
shuklan's Avatar
shuklan shuklan is offline
Member
 
Join Date: Aug 2003
Location: New Delhi, India
Posts: 38
shuklan is on a distinguished road
Baan: B4c4, sp10, India Localization - DB: MS SQL Server 2000 - OS: WIndows 2000 Advance Server
Hi there
u can use the following simple logic.
-------------------------------------------------------
long no.of.lines.printed, no.of.lines.left

before.program:
no.of.lines.printed = 0
no.of.lines.left = 0

detail.10:
before.layout:

no.of.lines.printed = no.of.lines.printed + 1

after.layout:

no.of.lines.left = spool.pg.length - no.of.lines.printed
--------------------------------------------------------
i hope it will work...

Nishant
Reply With Quote
  #3  
Old 25th November 2003, 11:29
drifter's Avatar
drifter drifter is offline
Junior Member
 
Join Date: Jun 2003
Location: Sometimes Idon't know...
Posts: 23
drifter is on a distinguished road
Baan: 5 - DB: Oracle - OS: XP
hi

yes but this logic requires me to have a report script and do it in there, right?

d.
Reply With Quote
  #4  
Old 25th November 2003, 11:33
shuklan's Avatar
shuklan shuklan is offline
Member
 
Join Date: Aug 2003
Location: New Delhi, India
Posts: 38
shuklan is on a distinguished road
Baan: B4c4, sp10, India Localization - DB: MS SQL Server 2000 - OS: WIndows 2000 Advance Server
yeah!! this is only for report script.
Reply With Quote
  #5  
Old 25th November 2003, 11:43
drifter's Avatar
drifter drifter is offline
Junior Member
 
Join Date: Jun 2003
Location: Sometimes Idon't know...
Posts: 23
drifter is on a distinguished road
Baan: 5 - DB: Oracle - OS: XP
ok, thanks for help



d.
Reply With Quote
  #6  
Old 25th November 2003, 12:12
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
Hi,

In report script you can use the function need(expr), which will force a page break if the number of lines left are less than expr.

Good luck!

En.
Reply With Quote
  #7  
Old 25th November 2003, 18:05
drifter's Avatar
drifter drifter is offline
Junior Member
 
Join Date: Jun 2003
Location: Sometimes Idon't know...
Posts: 23
drifter is on a distinguished road
Baan: 5 - DB: Oracle - OS: XP
Thanks for all your help but you are missing a point. I need to control or to have information on how many lines there are on the page left or all together in the program script and not report script.

So if I could know how many lines there are on the page I could control it with a simple counter....but how do I get that in program script?

Thanks for ideas

d.
Reply With Quote
  #8  
Old 25th November 2003, 18:14
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
spool.pg.length is a predefined variable that should be filled after the report is opened, and should be available in the program script.

Give it a shot - I have never tried, just found it in the doc.
Reply With Quote
  #9  
Old 26th November 2003, 08:23
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
spool.pg.length witll work only in report script

As Lisa pointed out the spool.pg.length may be available in the program script but will not be of any use as u will not be able to know the line at which detail line corresponding to ur rprt_send is going to be printed (due to sort fields available on report). If there are no sort fields , then this may help.

A possible alternative is to declare a report script variable in report script .

Sample code could be like this.

PHP Code:

long remlines

detail.1
:
before.layout:
if 
lattr.print then
      remlines 
spool.pg.length lattr.lineno
      
|*use remlines to do actions u wish to do
endif 
It is not clear why u insist only program script for this purpose. If u still insist on it , please clarify the reason for ur insistence on program script.
Reply With Quote
Sponsored Links
  #10  
Old 26th November 2003, 08:31
pconde pconde is offline
Senior Member
 
Join Date: May 2002
Location: Belgium
Posts: 163
pconde is on a distinguished road
Baan: BaanIVc4, BaanERP 5.0, ERP LN6.1 - DB: Oracle, informix, DB400 - OS: unix, As400, windows 2003
You cannot have this information in the script in all cases :
Here are the step for some reports with sorting
1)the script open the report
2)the script read data and send it to the report
3) the report start or accumulate data if there is some sorting needed (if you use something different a presorted data)
4) back to point 2 until there is no more data
5) close the report in the script
6) start sort in report if needed and report start printing

So when the report print all jobs are already down in your script.

Regards
Reply With Quote
  #11  
Old 21st June 2018, 06:32
AnuKass AnuKass is offline
Junior Member
 
Join Date: May 2018
Posts: 18
AnuKass is on a distinguished road
Baan: 9.2 - DB: sql - OS: windows10
hii

brp_id1=brp.open("rtccom946501000","ASCIF",0)
if brp_id1 > 0 then
spool.pg.length=60
....
endif
still i can't change the spool.pg.length
Reply With Quote
  #12  
Old 21st June 2018, 13:24
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,068
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Never really played with that setting - try setting it before you open the report.
__________________
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
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
Page x of y: Kevin Brock's solution. ~Vamsi Code & Utilities 4 5th January 2006 11:08
Report to RTF mostrightfuture Tools Development 1 21st October 2004 17:32
How to specify report page sizing for a non printer device Jabran Tools Development 1 3rd August 2004 12:39
how to print Continue at end of page in Report ??? learner Tools Development 5 27th January 2003 19:08


All times are GMT +2. The time now is 05:19.


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