10 Replies Latest reply on Jan 21, 2009 5:08 PM by ralvy

    Headers and Footers in Reports

    ralvy

      Title

      Headers and Footers in Reports

      Post

      Is there a way to have FMP 10 Advanced do things like this:

       

      1. Print a Footer at the bottom of each page except the final page.

       

      2. Print a Header at the top of every page except the first page.

       

      There doesn't seem to be any straightforward way to do this, as far as I can tell, but perhaps others have figured out way to make it appear to be doing this. It's something I'm used to doing in the DOS RDBMS I'm used to using.

        • 1. Re: Headers and Footers in Reports
          davidhead
            

          #2 is easiest so I will cover that first. 

           

          Create both a Header AND Title Header parts. Leave the Title Header empty and make it small. The header will print on all pages except the first.

           

          #1 can be done with some scripting and conditional formatting.

           

          First the print script needs to determine how many pages there are in the report and store this value in a global field or script variable.

           

          ...

          Enter Preview Mode

          Go to Record/Request/Page [Last]

          Set Variable [$pagecount; Get ( PageNumber )]

          Go to Record/Request/Page [First]

          Pause/Resume Script

          ... 

           

          The conditional formatting is applied to text objects in the footer with the formula:

           

          Get ( PageNumber ) = $pagecount

           

          And make the text colour white (to match the background). 

           

          See how those two go for you. 

           

           

          • 2. Re: Headers and Footers in Reports
            ralvy
              

            Very very nice. Especially this:

             

            Enter Preview Mode

            Go to Record/Request/Page [Last]

            Set Variable [$pagecount; Get ( PageNumber )]

            Go to Record/Request/Page [First]

            Pause/Resume Script

             

            I can use that to print "Page x of y" fields in reports, as well as with Conditional Formatting of my Footer fields.

             

            Thanks, as usual.

             

            Ralph

             

            • 3. Re: Headers and Footers in Reports
              ralvy
                

              One thing I find difficult to do is get a long horizontal line to conditionally show up in the Footer. FMP doesn't seem to allow me to apply Conditional Formatting to lines, only to fields. The closest I have been able to get is to create a text field with a long series of underscores in it, and then conditionally format that field.

               

              Is there a more straightforward way around this?

              • 4. Re: Headers and Footers in Reports
                TSGal

                ralvy:

                 

                Thank you for your post.

                 

                Is there a reason why you just don't use the line tool?  You can draw a line in the footer, and it will appear on each page.

                 

                TSGal

                FileMaker, Inc. 

                • 5. Re: Headers and Footers in Reports
                  ralvy
                     I want to get the Footer to appear on all but the last page. So I need to use Conditional Formatting, as David pointed out, to make all fields in the Footer disappear on the last page. But I can't do that with Line Tool objects.
                  • 6. Re: Headers and Footers in Reports
                    TSGal

                    ralvy:

                     

                    Oops...  I guess I should have read the entire thread.  My fault.

                     

                    You can create conditional formatting for that field.  As a simple example, suppose your field with the underline/underscore characters is called LINE.  Create a Number field called "NUM".

                     

                    Go into Layout Mode, click on LINE, pull down the Format menu and select "Conditional..."

                     

                    In the next dialog box, click on the "Add" button, and change the Condition pop-up to "Formula is".  Click on Specify, and set the formula to NUM=1.

                     

                    Below that, click on Text Color, and change the fill color to White.

                     

                    Click OK, and go to Browse Mode.

                     

                    You should now see the contents of LINE.  If you enter "1" into NUM and tab out, the LINE turns white so you can't see it.

                     

                    I know your scenario is a bit more complicated, but I think this should get you pointed in the right direction.

                     

                    TSGal

                    FileMaker, Inc. 

                    • 7. Re: Headers and Footers in Reports
                      davidhead
                        

                      Sorry TSGal, but that solution is way more complex than what is needed here. As Ralph knows, he can create a simple text object on the layout (no LINE field needed) and conditionally format it as per my instructions for the other text.

                       

                      And you solution will not conditionally hide the line in just the last footer. 

                       

                      Ralph has noted the lack of conditional formatting for line (and other) objects. That is the issue.

                       

                      There is a workaround. Since we cannot post files on this forum, Ralph might like to drop me an email - david at ulearnit dot com dot au. I will post a sample file. 

                      • 8. Re: Headers and Footers in Reports
                        ralvy
                          

                        TSGal,

                         

                        What ended up working, after a discussion with David via email, is creating a transparent text field in the report, where that field covers the line. It is then conditionally formatted to fill white when on the last page, otherwise left alone. That disappears the line on the last page.

                        • 9. Re: Headers and Footers in Reports
                          davidhead
                            

                          ralvy wrote:

                          ... is creating a transparent text field in the report...


                          Hi Ralph and TSGal
                          Actually, that was a transparent text object - no fields required. ;) 

                           


                          • 10. Re: Headers and Footers in Reports
                            ralvy
                               Yep. My mistake. I'm used to using a RDBMS that calls them report fields.