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

Print Headers and Report Message when no records

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

    Print Headers and Report Message when no records

    Hello

    I'm using Alpha5 v 10.5. I'm creating a desktop application. I would like to know how to print report headers and a report message when there is not data returned from the filter/query in the report preview window? Right now when there is no data it shows a blank page.

    I have all the report arguments in the header of the report. I want a report that there was no data based on the agruments the user picked.

    I know about going to View/Systems/Preferences/Reports and setting a Report Message but you still get a blank page in the report preview window. Its not until you print the blank page or save the report, do you see the Report Message and only the Report Message. The Warning Diaglog box is not helpful either. Says something like "No data for layout" the users doesn't know what a layout is.

    Can anyone help?

    Thank you.

    Ohioguy_tim

    #2
    Re: Print Headers and Report Message when no records

    Hi Tim,

    This has come up before and the suggestion was to turn off the blank preview and display a dialog message box conditionally if there were no records to print.

    This was done by way of getting the count in a query first.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Print Headers and Report Message when no records

      Hi Keith

      Thanks for replying.

      I will think about your suggestion. Its sounds doable.

      What I really would like is for the user to be able to have a printed copy of the headers with the report message no data for report. Then they could print it and file it. It would show that the date range they typed in has no data to report on.

      Tim

      Comment


        #4
        Re: Print Headers and Report Message when no records

        Hi,

        I understand what you are asking but the idea is to save the planet and not to print documents unless they contain meaningful data.
        Regards
        Keith Hubert
        Alpha Guild Member
        London.
        KHDB Management Systems
        Skype = keith.hubert


        For your day-to-day Needs, you Need an Alpha Database!

        Comment


          #5
          Re: Print Headers and Report Message when no records

          Tim:

          I agree with you. I "print" reports and post them to the web for my customer organizations and it has always bothered me that I could not get the heading and "No information avaiable"( or other wording),it has not effect on the trees.


          If The Alpha software folks are monitoring these notes, this is a suggestions to have an option to "print" or "not to print" blank reports.

          Comment


            #6
            Re: Print Headers and Report Message when no records

            Hi Donald

            Thanks for your reply.

            I agree it would be nice to print headers and report messages when there is no data.

            Sounds like I need to post the the Wishlist forum :)

            Tim

            Comment


              #7
              Re: Print Headers and Report Message when no records

              Tim

              I had a scenario similar to what you are requesting.

              I created two forms - the first form had all the fields and was available if there were records in the filter.

              The second form was just the header and then the detail field names
              but no fields in the detail area.

              The only thing in the detail area was a text box that read " No records were found to match the filter"

              Then in my code to call the report I used a dialog box to get the filter and then queried the table to get the records that matched the filter.

              I used qry.records_get() to find out the number of records that were returned by the query - if records were returned I printed the real report - if there were no records in the query I printed the report with header and the text box stating no records. (the filter on that report was imbedded in the report select records recno()=1. It didn't matter what record number #1 was because there no fields in the detail section or anywhere except for the header information and the text box.

              However, I did this in xbasic and not action scripting but I am sure you could do the same in AS with branching etc.

              Just thought I would through that in - It was Keith's reponse that jogged my memory.

              FWIW

              Tom Baker

              Comment


                #8
                Re: Print Headers and Report Message when no records

                Hi Tom

                Thanks for your reply.

                I see how this could work.

                I'm a programmer so I'm cool with xbasic.

                This would take a little more work but I could do this.

                Just hate the idea of doing it for every report I create.

                Thanks Tom

                Tim

                Comment


                  #9
                  Re: Print Headers and Report Message when no records

                  Tim

                  The attached zip file might give you some ideas -

                  There are two table, in the app with two forms and three reports.

                  The table are identical except for the name (there are three records in each table)

                  The forms names are based on the table so you can determine which one you are viewing -

                  There is a button on each form to run a report for that form. Pushing the button a dialog box will come up asking for a name - if you put in the name of one of three records in the table, it will run the real report for that table. If you put a wrong name in the text box it will run the no_rec report with a header that says what table your are using. There is only one no_recs report for both tables (but it could be a hundred tables with the header changed)

                  Also when you push the button it will assign to a variable the header (v_header) which is the name of the table in this case and the filter used to populate the report (filt). These will both show up on the no rec report.

                  While there are two individual reports, there is only one report for no records.

                  By assigning the header when you push the button, the variable is shown in the header of the no records report when there are no records.

                  Using this you can have a hundred reports (those are the ones that you have to recode some things - see the code behind the buttons) but only one no rec report.

                  I have used this technique before and it works if you need a plain vanilla report that say there are no records. You can manipulate the no rec reports by using global variable to say anything that you want in the report header.

                  Just thought I would pass this on.

                  Tom Baker

                  Comment


                    #10
                    Re: Print Headers and Report Message when no records

                    Hi Tom

                    Thanks for attaching the zip file.

                    I will take a look at the file and see how I can incorporate it into my project.

                    I love learning new techniques.

                    Thanks once again.

                    Tim

                    Comment


                      #11
                      Re: Print Headers and Report Message when no records

                      Tim, Tom...just another way to approach this problem which works.

                      I used the same approach as Tom on a project that required almost exactly the same requirements....no records in the detail section, but they still wanted the beginning and ending balances and header/footers to show....and a message of "NO ACTIVITY" to be placed.

                      Instead of the possible maintenance headache with multiple reports, I just checked to see if there were records prior and if none, added one. Also, the "NO ACTIVITY" was placed on a conditional that checked for a value---

                      In my case, since dealing with passive linked tables, the added record was destroyed upon refreshing the table....otherwise a procedure to get rid of the record should also be created.

                      I had to do this for 3 subreports, but basically copy and paste/duplicate procedure once one was created like most things.
                      Mike
                      __________________________________________
                      It is only when we forget all our learning that we begin to know.
                      It's not what you look at that matters, it's what you see.
                      Henry David Thoreau
                      __________________________________________



                      Comment


                        #12
                        Re: Print Headers and Report Message when no records

                        Hi Mike

                        Thanks for the replying and for another option.

                        I will check it out.

                        Thanks

                        Tim

                        Comment

                        Working...
                        X