Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: New Page trouble for Newbie!  (Read 12552 times)
.
Posts: 64


« on: November 08, 2010, 09:33:41 pm »

Hi everyone,

Really sorry but I've done my first Genero report today and most things have gone OK but I am really struggling as to where to place a new page break (using 'y-size = rest' on a mini-page).

The report takes a 'large record' of data that has been pre-processed by the BDL driver so only needs to output. All the 'PRINT' statements in the BDL occur in the 'AFTER GROUP OF lr_report.disp_no' so that's where I've placed everything in the report design.

For each user that the report prints for I want a page break afterwards as it is '1 person per page' that I want.

It sort of works, in that I do get just one person per page. The problem is that before it breaks for the next page it prints the name of the next user and the titles of the first set of fields (See output.png), and then only the data that follows them on the next page. If this were all BDL I would suggest it was effectively doing
BEFORE GROUP OF user_no
PRINT user_name
PRINT "titles"
SKIP TO TOP OF PAGE

This isn't BDL though, so I can't work out what it is doing. You can see from the Structure.png that I have placed the page break at the bottom of the items that (I think) are being processed as part of the 'lr_report.user_no' group so in my mind should break cleanly at the end of the page.

I've also included the DispKPI.4rp file for reference, although I've saved it as DispKPI.txt in order to post it to the forum so it will need renaming. (be gentle when looking at it, it's my first go!).

I would really appreciate any help on this as I'm quite attached to me hair!

Thanks

Jeff McFee


* Output.png (46.75 KB, 644x466 - viewed 1594 times.)

* Structure.png (63.82 KB, 1226x644 - viewed 1630 times.)
* DispKPI.txt (71.87 KB - downloaded 799 times.)
Reuben B.
Four Js
Posts: 1047


« Reply #1 on: November 09, 2010, 12:07:56 am »

Hi Jeff,

If you send or attach a .4rp you have to send the accompanying rdd as well.

A handy tip when designing reports is to add a background colour, then you can see how your items actually are actually rendered.

Another handy tip is to remember that X and Y aren't always in the direction you learned when at school (don't blame me for this design decision).  The Y direction is the layout direction.  In your case the Page Break node has a Layout  Direction of leftToRight.   (note the direction of the green Y-axis arrow) so when you say Y-size=rest, you are saying the horizontal size is rest (ie the remaining width of the page).

Try changing the layout direction property of the Page break node to TopToBottom or swapping the X-size and Y-size properties around. (if you have max or a hard-coded value instead of min then the background property tip shows you where the object is being rendered)

Although it makes no difference in this instance I tend to use a LayoutBox instead of a MiniPage for nodes like this.

Also there is another technique to handle page breaks which avoids this y-size=rest node.  Structure your report so that PageRoot isn't the top node but is a child of the node you want to PageBreak on.  Then every time this child node occurs, a new page is rendered.

Reuben   


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
.
Posts: 64


« Reply #2 on: November 09, 2010, 12:53:49 am »

Thanks for that Reuben, very helpful tips and moving the PageRoot has made the diffference that I needed. Interestingly there is now an exclamation mark against every field - but it works so I don't care that much about that!

I can't believe I forgot to attach the .rdd! First report, first cry for help on reports, first schoolboy error! Not surprising as I actually spent the first 2 hours trying to work out why half the time I stretched the width of something it also changed height. Would be nice to get that one documented!

Thanks for the advice on the y-axis. I simply did what it said in the instructions with the y-size = rest but hadn't appreciated how the y-axis works.

Thanks

Jeff
Schroeder D.
Posts: 4


« Reply #3 on: November 19, 2010, 06:05:51 pm »

Thanks for that Reuben, very helpful tips and moving the PageRoot has made the diffference that I needed. Interestingly there is now an exclamation mark against every field - but it works so I don't care that much about that!

I can't believe I forgot to attach the .rdd! First report, first cry for help on reports, first schoolboy error! Not surprising as I actually spent the first 2 hours trying to work out why half the time I stretched the width of something it also changed height. Would be nice to get that one documented!

Thanks for the advice on the y-axis. I simply did what it said in the instructions with the y-size = rest but hadn't appreciated how the y-axis works.

Thanks

Jeff
because they scale everything. Causes problems for me as well
.
Posts: 64


« Reply #4 on: November 19, 2010, 06:14:58 pm »

Hi Schroeder,

If you are refering to the stretching of the fields, this caused me a major headache until I spoke to Neil Martin in the UK who pointed out that it was quite easy to resolve, so I'll list it here incase anyone else is reading this because they haven't quite worked out what is happening when they stretch!

Click on the field once, and 'stretch points' appear in the 'centre points' of the field (ie: the middle of each side but not the corners). Stretching now will adjust height and width.

Click on the field a second time and the corners will also highlight. Stretching now will only affect the direction (width or height) stretched.

I know this is teaching grandma to suck eggs but I wish I had found this documented somewhere!

Greatonce you know how. Frustrating as anything until you do though.

Thanks

Jeff

Schroeder D.
Posts: 4


« Reply #5 on: November 19, 2010, 06:17:38 pm »

Hi Schroeder,

If you are refering to the stretching of the fields, this caused me a major headache until I spoke to Neil Martin in the UK who pointed out that it was quite easy to resolve, so I'll list it here incase anyone else is reading this because they haven't quite worked out what is happening when they stretch!

Click on the field once, and 'stretch points' appear in the 'centre points' of the field (ie: the middle of each side but not the corners). Stretching now will adjust height and width.

Click on the field a second time and the corners will also highlight. Stretching now will only affect the direction (width or height) stretched.

I know this is teaching grandma to suck eggs but I wish I had found this documented somewhere!

Greatonce you know how. Frustrating as anything until you do though.

Thanks

Jeff



Thanks for the info.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines