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: Several questions on Genero Report Writer  (Read 17451 times)
Newdecision T.
Posts: 12


« on: July 29, 2009, 12:59:59 pm »

I have several questions on Genero Report Writer:

Versions used:

Server:
    Red Hat Enterprise Linux ES release 4 (Nahant Update 8 ) (arch: x86_64) (64 bits)
    Genero BDL 2.20.06
    Genero Report Writer 1.00.16

    Java:
      java version "1.6.0_14"
      Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
      Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)




Client:
    Microsoft Windows XP Professional (Service Pack 3) (arch: x86) (32 bits)
    Genero Desktop Client 2.20.13
    Genero Report Designer 1.00.06-69057


1.) How do i use a different page trailer for the last page of a report ?

     - I tried to use the Four J's technical FAQ suggestion (How do I have a different first or last page in a report? (https://4js.com/fjs_faq/index.php?c=42#411)) but it produces the following error in Genero Report Designer:
           Node order violation: Node has "section" property but it is preceded by a node ....


2.) How do eject the page BEFORE a group but NOT FOR THE first ocurrence of that group ?

     --> I want to eject the page before the group changes but not for the first row sent to the report.



3.) How can i use the ON EVERY ROW variables on a PAGE HEADER ?

     --> I have a simple report ordered by 2 columns and I want to print the first column value in the page header (I print both columns on the "ON EVERY ROW" section of the report using the "PRINTX" statement, but the value printed, on every page, is the value of the first row sent to the report).




Vitorino Ribeiro
SINFIC - Sistemas de Informação Industriais e Consultoria, S.A.
http://www.sinfic.pt
vribeiro@sinfic.pt
Alex G.
Four Js
Posts: 148


« Reply #1 on: July 30, 2009, 08:58:33 pm »

Do I understand the third question correctly? You have a report that displays a table of values (two columns). Now, if I put the text "This is the value of the first field of the first row of this page: xxx" in the header, this would be what you are trying to achieve?

If yes, then the answer is, that you cannot do this currently. What you can do is: "This is the value of the first column of the last row of the previous page: xxx" in the page header and "This is the value of the first colum of the last row of this page: xxx" in the page footer.

We actually have the functionality you are asking for in the backend but we did not add this option to the REFERENCEBOX to make things more simple. The option we have provided enables you to make things like "Total from previous pages: xxx" in the header and "Total until this point: xxx" in the footer.
Alex G.
Four Js
Posts: 148


« Reply #2 on: July 30, 2009, 09:05:03 pm »

Pertaining question 1: You must put all elements in a minipage that are headers, footers or spacers (the have the section property set) as first elements of the minipage. In other words, these elements must appear in the structure view "above" the other children of the minipage. You are not allowed to insert another element in between or above these. The error indicates that this is the case in your report. Try moving the offending elements downward using the structure view and see what happens.
Alex G.
Four Js
Posts: 148


« Reply #3 on: July 30, 2009, 09:20:39 pm »

Pertaining question 2: How about ejecting after the group? That should get the behavior that you want since after the group is before the next. If you want to eject before the group but not on the first group you might consider adding a group count field in the data. Then you could add a visibility condition on your page break element which supresses it when the count is exactly 1.
Newdecision T.
Posts: 12


« Reply #4 on: July 31, 2009, 10:41:50 am »

Ok, ejecting the page AFTER the group works!

... But wont I have problems if the number of lines printed on the last page is equal to the number of lines available on the page (I mean: if the last page of the report is "full", will there be an extra blank page ? (a "standard" problem with Informix 4GL / Four J's BDS "traditional" reports))



Vitorino Ribeiro
SINFIC - Sistemas de Informação Industriais e Consultoria, S.A.
http://www.sinfic.pt
vribeiro@sinfic.pt


Alex G.
Four Js
Posts: 148


« Reply #5 on: July 31, 2009, 10:53:10 am »

No I don't think so since "rest" will evaluate to zero in this case so that nothing will happen. You can test this by playing with the row height until the last line hits the bottom.
Newdecision T.
Posts: 12


« Reply #6 on: August 02, 2009, 10:42:32 am »

OK, it's allmost done:


Using your suggestion (InfoNode / ReferenceBox) I have now the before group working ok (see attached archive "test0003.zip")


Now I have only one problem:
   - How do I change the page footer of the LAST page ?

       --> For every page (except the last) I want the page footer to be like this:

                  date/time of the report                                       Page: page_number



       --> For the LAST page of the report, I want the page footer to be like this:

                  date/time of the report                   Last Page: Page: page_number

                  (in the LAST page of the report I want to print the string "Last page: " before the textbox with the page number ("Page: page_number"))




Vitorino Ribeiro
SINFIC - Sistemas de Informação Industriais e Consultoria, S.A.
http://www.sinfic.pt
vribeiro@sinfic.pt

* test0003.zip (7.53 KB - downloaded 1026 times.)
Alex G.
Four Js
Posts: 148


« Reply #7 on: August 03, 2009, 10:13:09 am »

OK, I suggest the following:
- First set the property "Hide Page Footer On Last Page" for the node "Page Root. This will supress the page footer on the last page (The space will be still allocated but it will be empty)
- Add a layout node as last child of "Page Root". This you can do by dragging it from the toolbox onto the element "Page Root" in the structure view so that the element "Page Root" is surrounded by a rectangle. Now you position (set x and y) the element to the bottom of the page so that it acts like a page footer. This will work as this node will be output at the end of the report after all other data. In this node you can also freely access all variables (The will have the value of the last row).
Newdecision T.
Posts: 12


« Reply #8 on: August 03, 2009, 04:18:22 pm »

It's OK now!

I followed your suggestions and set a new Layout Node (I named it "Last Page Footer") and its perfect! (see attached file "test0003.zip")


Thanks!


P.S.:
  1.) The page footer for the "normal pages" I had this geometry:
               X                <<empty>>
               Y                <<empty>>
               X-Size         max
               Y-Size         2cm

        For the "Last Page Footer" I set this geometry (to force the correct position):
               X                <<empty>>
               Y                max-2cm
               X-Size         max
               Y-Size         2cm


  2.) A suggestion for the next release of Genero Report Designer / Genero Report Writer:

           In "Layout Nodes" on the "Layout -> Section" property, add a value for "LastPageFooter" for the last page footer (we can already do a specific footer for the first page ("firstPageFooter"), and I think it would be a good feature to do a specific footer for the last page (without this workaround))





Vitorino Ribeiro
SINFIC - Sistemas de Informação Industriais e Consultoria, S.A.
http://www.sinfic.pt
vribeiro@sinfic.pt

* test0003.zip (7.57 KB - downloaded 1031 times.)
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines