vbainbridge
15th March 2002, 14:11
Having problems with page breaking in reports - using Baan 5c.
Working on a highly customized version of the picking list report. The report no longer resembles the standard Baan report.
This is what I need to do - I need a blank page to start each report. The blank page will only contain a few lines of "header" information as well as a barcode for the pick list number. The report should then page break and continue printing the remainder of the information.
The report has many before field layouts, followed by the details and after field layouts. I added a new before field layout for my new "blank" page. However, I can't get the report to page break once this new layout is printed. It always seems to print my new layout on the same page as everything else on the report.
I've tried to code in page() in the report script as well as the new page option when creating layouts. Nothing seems to be working.
Any ideas?
mark_h
15th March 2002, 14:25
If I understood you correctly you want your new page first. If I was doing this I would put what I wanted in a before.report field not a before.field layout. And then with the first header having the page option clicked it should work.
Good Luck!
Mark
vbainbridge
15th March 2002, 14:49
I do want my new page first, however I can't use before.report. This only prints before the first report. If I happen to print out three reports at one time I would only get one blank page instead of three.
Thanks,
Val
mark_h
15th March 2002, 15:08
Gotcha - did not think about multiple picking lists. Clicking on the page option on your new before field should start it on a new page and clicking on the page option on the next printed layout should also start it on a new page.
I guess what I am having problems with is it being a before.field. Here is why:
header.1
header.2
before.field.newfield
detail.1
detail.2
It makes me think that the headers are going to print first and then your new before field. Is there a possibility of you making it header.1 with the page option clicked on both header.1 and header.2. This tells me that header.1 starts on a new page and header.2 also will start on a new page. BUT in the report script in the header.1, before.layout you check to see if it is a new key and set lattr.print to false when it is still printing the same picking list. When I say key this represents whatever you are keying off - order, run number, etc. Then each time you hit a new key it prints header.1 to a new page.
Is that better or possible? I guess with out really knowing the layouts and such it makes it hard to guess what is really happening.
Mark
vbainbridge
15th March 2002, 17:17
My first before.field layout is my new "blank" page with only a barcoded field. My second before.field layout is the header information for only the first page of the report. The subsequent pages of the report have different header information. I have controlled this by using the lattr.break variable. However, both layouts have the new page option set to Yes. I still do not get a new page when the second layout begins to print.
When creating header layouts the page option is automatically set to Yes. It is not an editable field. So, I have tried to make my new "blank" page a header.1 layout instead of a before.field layout. I tried to add yet another header.2 layout to see if page breaking would occur. Even with both headers page breaking does not occur. Both headers are printed on the same page.
It's like the new page option is getting ignored?
mark_h
15th March 2002, 19:05
You are right. I did a help on the page option and it says that it is not applicable to the header and footer options. So yes it is ignoring this.
But then again I think the page() should work in the script in the after layout section. I will look around and see what I can find. Hopefully one of the real guru's will come to your rescue.
Mark
mark_h
15th March 2002, 19:22
From a Knowledge Quest CD
9. New Page
Indication whether the report layout must be printed on a new page or not. Skipping to a new page always causes printing of present footers, headers and "before.field" layouts. If the current line is already at the top of the page, the page command will be ignored.
(Not applicable for header and footer layouts).
10. Extra Need
This number indicates how many extra lines are needed for the layout on the same page.
Before printing a layout the report writer calculates the free space at the current page. If the layout does not fit on the same page, then the layout will be printed on a new page. If the value of "Extra need" is 0, only the number of lines of the layout itself are taken into account. With "Extra need" you can increase the number of extra needed free lines for the layout. Increasing this number of lines can be useful e.g. if you want to print at least 2 detail layouts on the same page together with a "before.field" layout.
For headers and footers you cannot specify "Extra need" lines.
And about lattr.break
9. New Page
You can suppress automatic printing at the top of every page, by using as an output expression "lattr.break". lattr.break is a predefined variable, which contains the value 1 (true) when the sort field changes. Using this output expression the layout is only printed when the input variable is changed.
Lets see:
Layout field Print Expr. Page
header.1 1 yes
before.field.1 Order lattr.break yes
after.field.1 Order lattr.break yes
detail.1 1 no
Is it something like the above? The before field would print when sort field changes and advance to the next page to start printing, then the blank after field would start the next page. It sounds like this is what you tried, so I am lost as to what is missing.
Sorry bout wasting your time. Still waiting for a true guru to step in. :)
Mark
PBforBaan
25th April 2002, 18:47
Hi,
what about using skip.to at the reports script ?
Baan-Help-Text:
Skip.to( expr )
Skip to line expr, intervening lines are left blank. If the new line is less than the current one a new page is started.
End of Baan-Help-Text
This means that the following code should work (inserted behind the right section):
after.layout:
Skip.to(1)
:) PB
SujithKumar
22nd April 2016, 19:14
I was having similar issues. Skip.Io () work around worked!
Thanks