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 Report

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

    Print Report

    Hello!

    I've searched around, but it seems that no one has addressed this problem, and for the life of me, I can't seem to figure it out.

    I have a report I've been using for years, that just this month came up with no records to print. Becasue it is just one of several reports that need to go to this agency, I have to print something just to say that the report is null.

    What I'd like to do is print all the headers and everything on the report as usual, but just put a line in the detail section saying that there are no records at this time.

    What is the best way to do this?

    Also, it would be good if Alpha could add this code automatically when the report is called, so that if the report is blank then the user would have the option of having the report say that. (Just an idea)


    Charlie

    #2
    Re: Print Report

    Charlie, an easy solution would be to design a second report layout by copying over the existing layout and modifying it. Then use your script to determine in advance if there are any records to print. If so, print layout1, if not print layout2. A5_GET_RECORDS_IN_QUERY() is an easy way to find out if the record count for the report will be zero or not.

    Comment


      #3
      Re: Print Report

      Tom,

      Thanks. I thought of that just after I posted this.

      What might be nice is in the Action Script dialog box where Alpha asks the user for the filter and order, to add something to take care of this problem because it just has to happen many times.

      Alpha has progressed so far! Now everything seems to be in the action scripting! Hardly any need anymore to do coding!

      Thanks again,

      Charlie

      Comment


        #4
        Re: Print Report

        Ideas from the land of Oz:

        1-Add a blank record to your table. Totally blank, or based on the order you want to print your report, put a value that's it way out of the range in a field that is not in the report, for example an ID of 100,000

        2-In your report, put in the filter:
        (you filter).OR.ID="100,000"

        That record will always be there, but will be blank, hopefully at the bottom, so it is not there

        3-Put a calc field (or Conditional object) with the desired message and use an expression that says:
        If(tablecount(.....your filter)=0,"Your message here","")

        Comment


          #5
          Re: Print Report

          Charlie, I don't see this as Alpha's problem. The solution you envision would require either that Alpha automatically prepare duplicate reports to cover the "no records in report" situation, or that Alpha would somehow be able to modify any report layout at print time automatically. Given the number of potential regions, nested groups, footers, reports without details region, and other complexiites currently supported by the report engine, there's likely no way to do this cleanly. For my money I'd much prefer that they tackle different problems than this. Furthermore, in my own work I've found users often don't want a blank report, or even any report at all when there are no records in the selected query. A change of the type you are dreaming about would require me and others to build in special code to suppress the unwanted "no records found" report.

          Comment


            #6
            Re: Print Report

            Tommy,

            Calm down. All it needs is a flag in the Action scripting such as, "If report is blank, suppress report or print message". It doesn't need to be escalated into a doomsday scenario! I've got enought to worry about with global warming!

            Come to think about it, I could probably write a function in the time it takes to argue about this.

            Charlie

            Comment


              #7
              Re: Print Report

              Charlie, you're right. I'll go take my meds. :o

              Comment


                #8
                Re: Print Report

                Tom,

                Me too. Sorry! Had a bad day. I didn't mean to bite your head off.

                Thanks Gabe for your thoughts too.

                I'm serious though about writing a function which could be called for this. For this app, and for many others, I need the user to know that there were no records to print. This is in an accounting app, where this report shows the outstanding checks not cashed, so obviously they need to know when there are none.

                Charlie

                Comment


                  #9
                  Re: Print Report

                  Hmm .. Charlie, before you function it, it would fnction because it is not your function to function what alpha functions.

                  When you print a report based on certain criteria, alpha goes and query the table(s), builds a temp table with your criteria, and prints it.

                  You have to insert yourself between these two steps:
                  after alpha query the table and
                  before it issues the "No pages" message.

                  Unless you have connections with dem guys up in Boston, I don't see how you are gpoing to funtion this.

                  I further modified my idea to:
                  1-Put a completly blank record in the table and include it in the filter
                  2-Make the message dynamic, i.e. a dialogue box will popup and asks:
                  there are no records matching your criteria, Print, abort, then another box showing different pre-formated messages to choose from or write a new one.

                  You could take that and apply it to any report. You could function that, but you still have to add a blank record.
                  Last edited by G Gabriel; 11-19-2007, 07:18 PM.

                  Comment


                    #10
                    Re: Print Report

                    OK...
                    As I was writing the above, it dawned on me that I have always said that I have never come across a situation where you need a dummy table or a dummy record and always advocated against that.

                    So, is this situation an exception?
                    Did I just refute my own theory?

                    No, not really.

                    A better solution is to use a global variable instead of the dummy record.

                    Comment


                      #11
                      Re: Print Report

                      Gabe,

                      I see what you mean. It also occurs to me that this will only work if when someone is using Action Scripting, they define a filter for the report. It will not work so well, if the report itself is filtered, because then it is too late to intercept the potential problem. This would be a case where you design a report and set the filtered properties of the report, then call it from a form or button.

                      That is why I was hoping for some Alpha help in a future release. The way it would work in the Action Script, would be if someone selected a filtered expression, another dialog would pop-up asking what Alpha should do if there were no records to print. Based on that a flag would be set and then the report would either be suppressed or printed blank. As I was saying to Tom Cone, there are times when you need to produce a blank report or at least a report that states there is nothing to print. That is particularly true for me, because I do a lot of accounting programs, so knowing there is nothing in the report is important to my clients.

                      I am assuming too that Alpha internally knows this, because when there is no data to print for a report it prints "Report does not Contain any records".

                      I once had this printed on the face of some checks inserted into my printer. I wrote a program that would print checks for a user based upon his selections on a form. In other words, he could select those records to produce checks. In this case, he selected None, then hit the print button and proceeded to destroy a check. I recoded this and fixed it, but it gives you an example of what I sometimes run into. In this case I didn't want Alpha to print ANYTHING.

                      Thanks for your ideas. I'll keep working at it.

                      Charlie

                      Comment

                      Working...
                      X