Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Reports with different headers/footers on each page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: Reports with different headers/footers on each page

    Originally posted by Stan Mathews View Post
    I'm getting a properties dialog that says the conditional shrink option is not available in a page footer.


    [ATTACH=CONFIG]29118[/ATTACH]
    My image is from version 8 1980:3163

    A5v10 does show image that you see...

    Must be an enhancement....
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.
    "Make it as simple as possible, but not simpler."
    Albert Einstein

    http://www.iadn.com/images/media/iadn_member.png

    Comment


      #17
      Re: Reports with different headers/footers on each page

      No, that doesnt work either (see the attached PDF)
      Attached Files
      --
      Support your local Search and Rescue Unit, Get Lost!

      www.westrowops.co.uk

      Comment


        #18
        Re: Reports with different headers/footers on each page

        Originally posted by Graham Wickens View Post
        No, that doesnt work either (see the attached PDF)
        Doesn't work - doesn't tell me what you expect versus what you are seeing.

        Also, what is the exact version of Alpha (and with build numbers) that you are using.

        Click the menu - help - about alpha5 to get that information.

        Also, attached the images you are using so I can test more accurately on my machine.
        Al Buchholz
        Bookwood Systems, LTD
        Weekly QReportBuilder Webinars Thursday 1 pm CST

        Occam's Razor - KISS
        Normalize till it hurts - De-normalize till it works.
        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
        When we triage a problem it is much easier to read sample systems than to read a mind.
        "Make it as simple as possible, but not simpler."
        Albert Einstein

        http://www.iadn.com/images/media/iadn_member.png

        Comment


          #19
          Re: Reports with different headers/footers on each page

          OK,

          Alpha 5 V8 1980-3163

          I have scanned and attached actual graphics from a previous edition:

          Page 1:

          Page_One_Header.bmp in a 7.2 cm deep page header
          Page_One_Photo_Montage.bmp in a 5.5 cm deep page footer

          Page 2 and 3:

          text
          A = Anniversary Markings, S = Special Markings, M = Mission Symbols, T = Tiger Markings
          in a 1 cm deep page footer

          Page 4:

          Page_Four_Footer.bmp in a 5.5 cm deep page footer


          I have also added an example of the layout I am trying to acheive [manually done in a word document]
          Attached Files
          Last edited by Graham Wickens; 08-21-2011, 05:00 AM. Reason: Added rtf file in target layout
          --
          Support your local Search and Rescue Unit, Get Lost!

          www.westrowops.co.uk

          Comment


            #20
            Re: Reports with different headers/footers on each page

            Graham

            Not having good luck with this. What I thought would work is not.

            I tried moving to A5v10 and while I did get better results, Alpha is not shrinking an object in the group page footer. (as Stan pointed out..)

            Not sure what the next option is....
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #21
              Re: Reports with different headers/footers on each page

              Al,

              it seems daft that we cannot get this to work, so far we have shrunk *ALL* footers quite easily, so why won't it work for individual footers? perhaps anyone reading this has any suggestions?

              I am loath to rely on manually changing sizes of footers on the day, this inevitiably leads to mistakes and added pressure to get it finished which I am keen to avoid as I have enough to do as well as this document.

              thanks for your input, as you say what next?

              Graham
              --
              Support your local Search and Rescue Unit, Get Lost!

              www.westrowops.co.uk

              Comment


                #22
                Re: Reports with different headers/footers on each page

                As I recall the issue is trying to keep an accurate line count (ie footer space size) for each page.

                Seems there was an issue of that mentioned (somewhere in a fading memory) on the message board or in release notes...

                One other option that I've thought of would be to write your own HTML and generate all the code needed.
                But you still have the issue of figuring out where you are on the page and when is it time to start the footer...
                Al Buchholz
                Bookwood Systems, LTD
                Weekly QReportBuilder Webinars Thursday 1 pm CST

                Occam's Razor - KISS
                Normalize till it hurts - De-normalize till it works.
                Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                When we triage a problem it is much easier to read sample systems than to read a mind.
                "Make it as simple as possible, but not simpler."
                Albert Einstein

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #23
                  Re: Reports with different headers/footers on each page

                  I have now written a script to create the Document/Report in plain text. What I need to do now is format the Group_Headers (.i.e. make bold.)
                  I am not so sure which way to continue, do I copy my plain-text data into a RTF Memo Field or do I import the plain-text file into an RTF object?
                  Which one is the less difficult and therefore easier to learn?
                  --
                  Support your local Search and Rescue Unit, Get Lost!

                  www.westrowops.co.uk

                  Comment


                    #24
                    Re: Reports with different headers/footers on each page

                    I have now progressed to creating my report in a rtf_memo field in a table. I can view the report by the table's form, I can print the rtf_Memo field in a report to perfection. BUT, what I cannot work out is how to export the RTF_memo field into an RTF file on my HD for use by MS Word or similar and for emailing to the recipient (I can email from my email account, so I dont need to do it from inside A5V8).

                    Code:
                    :Report.saveas("Produce_ACL_in_RTF","RTF","",","c:\RIAT\2011\Reports\RIAT_Checklist.rtf",.t.)
                    and
                    Code:
                    t = table.open("acl_rtf_version")
                    t.fetch_first()
                    filename = "c:\RIAT\2011\Reports\RIAT_Checklist.rtf"
                    save_to_file(t.Memo,filename,.f.)
                    t.close()
                    each attempt only gives me 4 blank pages,(or more precise, 4 page breaks!) rather than any data!!

                    any suggestions welcomed!
                    Last edited by Graham Wickens; 09-01-2011, 05:05 PM. Reason: correction
                    --
                    Support your local Search and Rescue Unit, Get Lost!

                    www.westrowops.co.uk

                    Comment


                      #25
                      Re: Reports with different headers/footers on each page

                      This should be in the wiki under Exporting an RTF memo field.

                      Code:
                      dim num as C
                      dim dat as C
                      dim memo_buffer as C
                      dim rtf_memo_buffer as B
                      dim rtf_memo as C
                      dim fbuffer as C
                      dim fptr as P
                      dim fname as C
                      dim fldptr as P
                      dim bptr as P
                      fbuffer = ""
                      fname = ui_get_file("Export RTF File Name", "(*.rtf)")
                      if (alltrim(fname) <> "") then
                          fptr = file.create(fname, FILE_RW_EXCLUSIVE)
                          fptr.write("{")
                      else
                          end
                      end if
                      tbl = table.open("export_demo")
                      tbl.fetch_first()
                      while .not. tbl.fetch_eof()
                          fldptr = tbl.field_get("rtfmemo")
                          bptr = rtf.create("")
                          bptr.Binary_Text = fldptr.value_get()
                          rtf_memo = bptr.Rtf_Text
                          rtf_memo = left(rtf_memo, len(rtf_memo) - 1)
                          rtf_memo = right(rtf_memo, len(rtf_memo) - 1)
                          fbuffer = rtf_memo + "{\par }{\par }"
                          fptr.write(fbuffer)
                          tbl.fetch_next()
                      wend
                      fptr.write("}")
                      tbl.close()
                      fptr.close()
                      Last edited by Stan Mathews; 09-01-2011, 05:12 PM.
                      There can be only one.

                      Comment


                        #26
                        Re: Reports with different headers/footers on each page

                        Well, Well, Well (Three holes in the ground), never knew the existance of the Wiki before now, so will have a good look through it now, oh yes, and give that code a twill!
                        --
                        Support your local Search and Rescue Unit, Get Lost!

                        www.westrowops.co.uk

                        Comment


                          #27
                          Re: Reports with different headers/footers on each page

                          For those users with A5 v 10, I'd suggest using the printhtml() command and a process to build the needed html.

                          Since that is not available in a5 v 8, Graham is using the tools that are available to v 8.
                          Al Buchholz
                          Bookwood Systems, LTD
                          Weekly QReportBuilder Webinars Thursday 1 pm CST

                          Occam's Razor - KISS
                          Normalize till it hurts - De-normalize till it works.
                          Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                          When we triage a problem it is much easier to read sample systems than to read a mind.
                          "Make it as simple as possible, but not simpler."
                          Albert Einstein

                          http://www.iadn.com/images/media/iadn_member.png

                          Comment


                            #28
                            Re: Reports with different headers/footers on each page

                            umm! still having problems. The RTF Memo Field displays the report correctly, but when I copy the RTF memo data to a rtf file on disk, strange things happen, i.e. when there is a "[" or "]" or "(" or ")" or lastly " (quotation mark) in the text, the character is ignore in the output and replaced by a null (I guess) making some lines shorter and causing columns to be incorrectly aligned (see below).

                            Data from RTF Memo field: (asterisk added for clarity)

                            Code:
                            "2100884"/D (N147DC)******C-47A Skytrain**********Aces High****************************************************S *ST
                            "WK436" (G-VENM)**********Venom FB.50*************Aviation Heritage********************************************S *ST
                            "XG194"/N (WT724/G-PRII)**Hunter PR.11************Team Viper**********************************(Viper 5)********S *FL
                            126922/H-503 (G-RADR)*****AD4-NA Skyraider********Kennet Aviation**********************************************S *ST
                            9932/32 (G-BZGK)**********OV-10B Bronco***********Bronco Demo Team*********************************************S *ST
                            CSX616********************Aermacchi M346**********Alenia Aermacchi*********************************************PP*ST
                            D-CALM********************Dornier Do 228**********Natural Environment Research Council*************************S *ST
                            Data from created file: (asterisk added for clarity)

                            Code:
                            2100884/D N147DC******C-47A Skytrain**********Aces High****************************************************S *ST
                            WK436 G-VENM**********Venom FB.50*************Aviation Heritage********************************************S *ST
                            XG194/N WT724/G-PRII**    Hunter PR.11************Team Viper**********************************Viper 5  ********S *FL
                            126922/H-503 G-RADR*****AD4-NA Skyraider********Kennet Aviation**********************************************S *ST
                            9932/32 G-BZGK**********OV-10B Bronco***********Bronco Demo Team*********************************************S *ST
                            CSX616********************Aermacchi M346**********Alenia Aermacchi*********************************************PP*ST
                            D-CALM********************Dornier Do 228**********Natural Environment Research Council*************************S *ST
                            presumably these 5 characters are used as control characters in Rich Text? Is there a way of being able to use these characters as literal rather than control characters in my report?
                            Last edited by Graham Wickens; 09-02-2011, 06:28 AM. Reason: spelling correction
                            --
                            Support your local Search and Rescue Unit, Get Lost!

                            www.westrowops.co.uk

                            Comment


                              #29
                              Re: Reports with different headers/footers on each page

                              Al,

                              as a bit of feedback, I finally got it to work, but only in A5V10:

                              Code:
                              dim line_count as n = 23
                              dim page_count as n = 1
                              dim box as c = "[]"
                              dim gh as c = ""
                              t = table.open("riat_input")
                              t2 = table.open("acl_rtf_version",FILE_RW_EXCLUSIVE)
                              t2.zap(.t.)
                              t2.close()
                              t2 = table.open("acl_rtf_version",FILE_RW_EXCLUSIVE)
                              t2.enter_begin()
                              t2.Memo = ""
                              t2.enter_end(.t.)
                              t2.fetch_first()
                              query.filter = "(arr.and..not.dep) .and. (status = 'FL' .or. status = 'ST'.or.status='B')"
                              query.order = "Group_Header-identity"
                              t.query_create()
                              t.fetch_first()
                              '**************************************************************************** Create 1st page header space
                              insert_text_in_rtf_memo(t2,"memo",crlf(23),1,"Courier New,8,b","red")
                              '**************************************************************************** Add Heading Text
                              insert_text_in_rtf_memo(t2,"memo","The following aircraft will be flying ",0,"Courier New,8","black")
                              insert_text_in_rtf_memo(t2,"memo","[FL]",0,"Courier New,8,b","black")
                              insert_text_in_rtf_memo(t2,"memo","and are to be found on the flight lines on the North ",0,"Courier New,8","black")
                              insert_text_in_rtf_memo(t2,"memo","[N], "+crlf(),0,"Courier New,8,b","black")
                              insert_text_in_rtf_memo(t2,"memo","South East ",0,"Courier New,8","black")
                              insert_text_in_rtf_memo(t2,"memo","[SE]",0,"Courier New,8,b","black")
                              insert_text_in_rtf_memo(t2,"memo"," and South-West ",0,"Courier New,8","black")
                              insert_text_in_rtf_memo(t2,"memo","[SW]",0,"Courier New,8,b","black")
                              insert_text_in_rtf_memo(t2,"memo"," of the runway. Static aircraft are to be found in the Showground Area ",0,"Courier New,8","black")
                              insert_text_in_rtf_memo(t2,"memo","[ST]."+crlf(),0,"Courier New,8,b","black")
                              insert_text_in_rtf_memo(t2,"memo","There may also be aircraft parked alongside the Patrons Pavilion ",0,"Courier New,8","black")
                              insert_text_in_rtf_memo(t2,"memo","[PP]",0,"Courier New,8,b","black")
                              insert_text_in_rtf_memo(t2,"memo"," just to the west of the Control Tower."+crlf(2),0,"Courier New,8,","black")
                              WHILE .not. t.fetch_eof()
                                  '**************************************************************************** Group Headers
                                  IF GH <>  ut(t.Group_header) THEN
                                      insert_text_in_rtf_memo(t2,"memo",rtrim(t.group_header)+crlf(),0,"Courier New,9,b","black")
                                  END IF
                                  '**************************************************************************** Detail Data
                                  textline = box+" "+padr(rtrim(t.Identity),25," ")+padr(rtrim(t.Type),23," ")+" "+padr(rtrim(t.Operating_Unit)+" "+rtrim(t.Markings),54," ")
                                  textline = textline+padr(ut(t.Special_marks),1," ")+" "+padr(t.location,2," ")+" "+ut(t.status)
                                  insert_text_in_rtf_memo(t2,"memo",textline+crlf(),0,"Courier New,8","black")
                                  gh = t.Group_header
                                  line_count = line_count + 1
                                  '****************************************************************************  Page Footers
                                  SELECT
                                      CASE (page_count = 1 .or.page_count = 4) .and. (line_count = 69)  ' Page 1 and Page 4 Footer
                                          insert_text_in_rtf_memo(t2,"memo",crlf(15),0,"Courier New,8","black")
                                          line_count = 0
                                          page_count = page_count + 1
                                      CASE (page_count = 2  .and. line_count = 79) 'Page 2 Footer
                                          insert_text_in_rtf_memo(t2,"memo",crlf()+"            A = Anniversary Markings, S = Special Markings, M = Mission Symbols, T = Tiger Markings"+crlf(2),0,"Courier New,8,","black")
                                          line_count = 0
                                          page_count = page_count + 1
                                      CASE (page_count = 3 .and. line_count = 74)  'Page 3 Footer
                                          insert_text_in_rtf_memo(t2,"memo",crlf()+"            A = Anniversary Markings, S = Special Markings, M = Mission Symbols, T = Tiger Markings"+crlf(3),0,"Courier New,8,","black")
                                          line_count = 0
                                          page_count = page_count + 1
                                  END SELECT
                                  t.fetch_next()
                              END WHILE
                              '**************************************************************************** if report finishes on page 3 add "markings" text to bottom of page
                              IF page_count = 3 THEN
                                  insert_text_in_rtf_memo(t2,"memo",crlf(83-line_count)+"            A = Anniversary Markings, S = Special Markings, M = Mission Symbols, T = Tiger Markings"+crlf(),0,"Courier New,8,","black")
                              END IF
                              t.close()
                              t2.close()
                              '********************************************************************* Print ACL
                              prompt_action = ui_dlg_box("ACL RTF Utility",<<%dlg%
                              {region}
                              {region}Action:{endregion}|
                              {region}(prompt_result:Print) 
                              (prompt_result:Preview) 
                              (prompt_result:Create){endregion};
                              ;
                              {endregion};
                              {line=1,0};
                              {region}
                              <*15OK!OK> <15Cancel!CANCEL>
                              {endregion};
                              %dlg%)
                              IF prompt_action = "OK"
                                  IF prompt_result = "Print" THEN
                                      :Report.Print("Produce_ACL_in_RTF") ',query.filter,query.order)
                                  ELSE IF prompt_result = "Preview" THEN
                                      :Report.Preview("Produce_ACL_in_RTF")',query.filter,query.order)
                                  ELSE IF prompt_result = "create" THEN
                                      :Report.saveas("Produce_ACL_in_RTF","RTF","","","c:\RIAT\2011\Reports\Test_Checklist.rtf",.t.)
                                  END IF
                              END  IF
                              the problem was the ":report.saveas()" command, in A5V8 it lost any literal quotation marks [,( or / but does when run in A5V10 they were included.
                              Last edited by Graham Wickens; 09-08-2011, 02:27 PM. Reason: corrections
                              --
                              Support your local Search and Rescue Unit, Get Lost!

                              www.westrowops.co.uk

                              Comment

                              Working...
                              X