[Solved] Page header not responding to formula

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
weematt
Posts: 5
Joined: Sat Mar 15, 2014 1:36 pm

[Solved] Page header not responding to formula

Post by weematt »

I have been generating a "simple" phone book listing for my bowling club. Generally going well.
Desired report will be the names sorted by Gender, Surname, Forename and in two sections - Ladies and Gents.
Each page will be headed "Gents" or "Ladies" depending on what is listed below.
Within the pages there will be Alpha groups with an Alpha header ... A,B,C etc.
I am using Base with Oracle Report Builder.

Achieved so far:
Grouping into Ladies and Gents
Sub grouping into Alpha sections with Alpha label printing at each change of Surname first character.
Paging as desired - Ladies section page breaks before Gents section.

Desired but not achieved:
A page header that uses the Gender data ("f" or "m") to head the page appropriately with "Ladies" or "Gents".

What I have tried and failed with:
Placing a text box with logic "=IF([txtGender]="m";"Gents";"Ladies") in the Page header.
The failure is that every page header is the same, "Gents" or "Ladies" depending on my overall sort order. Never do both headers appear in the same report.
Other input: I have tested the logic in the Group Header and can get "Gents" or "Ladies" to print and change at that level and that works, but that only occurs once per report. I can also create page headers with my own fixed text combined with page numbering.

It seems trivial but I have blunted my pick on this one.
Last edited by weematt on Sun Mar 16, 2014 1:34 pm, edited 2 times in total.
OpenOffice 4.1 on Windows 7 Home premium
User avatar
Sliderule
Volunteer
Posts: 1282
Joined: Thu Nov 29, 2007 9:46 am

Re: Page header not responding to formula

Post by Sliderule »

Welcome to the forum, weematt.

I have attached, a sample report . . . for you to test and, hopefully, you can learn from. The database is using an Embedded Database . . . therefore . . . HSQL 1.8.0.10 .

The name of the file is: Bowling_Report.odb
Bowling_Report.odb
If I understood correctly, you want ALL 'Ladies' first ( one or more pages ), grouped by the first letter of "SURNAME" . . . and . . . sorted within "SURNAME" by "FORENAME". After 'Ladies' is display / printed . . . 'Gents' with the same grouping ( first letter of "SURNAME", "FORENAME" ).

I hope this helps, please be sure to let me /us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
weematt
Posts: 5
Joined: Sat Mar 15, 2014 1:36 pm

Re: Page header not responding to formula

Post by weematt »

Thanks Sliderule for your reply.
I have reviewed the sample you provided but it is not attempting to do the bit that won't work for me. I have managed the same report as the sample. Maybe I didn't specify the issue fully in my post.
The missing and tricky(for me) bit is to have each page having the gender printed in the page header such that pages of Ladies have "Ladies" in the page header and pages of Gents have "Gents" in the page header.
I have tried a text box with a similar formula to the one providing the section header but this does not produce the desired result. I get either "Ladies" or "Gents" on each page depending on the sort order of the two groups.

Summary of my requirement:

All that is in the sample you generated PLUS each page has a Page Header with the Gender printed according to the contents of the page. Pages of Gents have "Gents" at the top, pages of Ladies have "Ladies at the top. Hope you can solve that for me.
OpenOffice 4.1 on Windows 7 Home premium
User avatar
Sliderule
Volunteer
Posts: 1282
Joined: Thu Nov 29, 2007 9:46 am

Re: Page header not responding to formula

Post by Sliderule »

I do think I understand.

One thing I did, I suspect, while you may have FIRST downloaded my report / database file . . . I re-posted the sample file. Put another way, in the SECOND report ( and, I used a Table, rather than a Query as the data source, in the SECOND report ) - Bowler_02 - . . . I think it does what you want / need.
  1. NOTE: to the best of my knowledge, the 'contents' of the Page Header is determined ( internally set ) only ONCE . . . so . . . it will NOT change on the 'Ladies' vs 'Gents', as records change. :(
  2. WORK AROUND: I placed a 'calculated field' in a Group Header . . . immediately below the Page Header . . . so, it will display the changing information ( data ) 'seamlessly'. :)
I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
User avatar
Sliderule
Volunteer
Posts: 1282
Joined: Thu Nov 29, 2007 9:46 am

Re: Page header not responding to formula

Post by Sliderule »

I have created an addition Base file . . . and . . . reports . . . that I would like you to look at, to see if they will meet your needs.
Bowling_Report_02.odb
  1. Report BOWLER_03 uses a Page Header, and a Group Header with a field of 'Ladies' or 'Gents'
  2. Report BOWLER_04 uses a Page Header, and a Group Header with a large title as a string
  3. Report BOWLER_05 does NOT contain any page Header, and, the Group Header contains a field of 'Ladies' or 'Gents' that is placed at the top and center, as well as other information . . . date, time, page. :)
I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
weematt
Posts: 5
Joined: Sat Mar 15, 2014 1:36 pm

Re: Page header not responding to formula

Post by weematt »

Thanks again Sliderule.

All three reports you offer do what I want. I was hung up on placing the logical expression, logically IMHO, in the Page Header. I had begun to suspect that the page header does not interrogate the data on page changes due to the expression producing a partial result depending on what gender was placed first in the sort.
Is it not a bit weird that the report builder can change certain variables per page (page number, total pages etc) but not do anything relating to the contents? Anyway my requirement can be met by report builder.
I was guilty of not thinking outside the Page Header box.

Problem solved.
OpenOffice 4.1 on Windows 7 Home premium
Post Reply