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 Multiple Checks

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

    Print Multiple Checks

    Am requesting assistance in setting up a procedure to prompt user for a starting check number to print and an ending check number to print. In A4, I created a script which defined the report, the report index and displayed a list of checks most recently entered. User typed in the starting and ending checks and pressed {f10}.

    As a new user of Alpha5, I am finding many things easier to construct than in Alpha4, but I am also finding the reverse. This is one of them.

    I tried creating an Xdialog box promting for check numbers and it worked. I tried to connect the Xdialog box to the report that prints checks, and I failed miserably. Am pulling out what little hair I have left. Please help before I am bald.

    john linley

    #2
    Re: Print Multiple Checks

    John, there's an example of something similar in AlphaSports. Choose the Invoice Report(s) option, then study how they produce invoices based on a date range. Should help you a bunch.

    Later: Actually, as I look at the code there it might be more than you can handle. There are parts of it that aren't clear to me, either. A simpler approach would be to put a button on your form and use Action Scripting to preview the report layout. Options exist there to define the range of records included in the report.
    Last edited by Tom Cone Jr; 07-18-2008, 07:37 PM.

    Comment


      #3
      Re: Print Multiple Checks

      TO: Tom Cone

      Received your fast response, thanks again...
      Will attempt to accomplish this task this weekend. Will the action scripting allow for a user interface giving the user prompts for first and last check numbers to print??? If so, and it is too complex, I may not be able to handle it and I might need further assistance.

      Hope that is OK.

      I don't know where I would be without the message board and guys like you who are so generous with their time!!!

      Kindest regards,

      john linley

      Comment


        #4
        Re: Print Multiple Checks

        Second reply to Tom Cone Jr

        Tom. I can currently print a check that was just entered. The check report is OK. The Company also can print multiple checks for payroll.
        In accounts payable however, I need to construct something similar to Alpha4 which had a "screenfreeze" in the script which alllowed a user to enter a starting and ending check number to print.

        In A5, a print checks button should have the same options - somewhere - for selecting which check numbers to print. I had thought of executing the print based solely on "system->date". This would work if they printed accounts payable checks only once a day. However, I think the Company will probaly need, on occasion, to print a series of checks twice on the same date. With this in mind, I am assuming I need to capture a starting check number variable and an ending check number variable that precedes or is part of the print check routine. I did try to do this in action scripting, but got lost again.

        I do not see where in action scripting I can allow the user to enter current starting and ending check numbers.

        Still lost at sea,

        john

        Comment


          #5
          Re: Print Multiple Checks

          John,

          You can pass check # into the report or just set up a filter for the report based on the check #'s entered into the x-dialog. The trick is to remove any filtering from the report and use the "query.filter", "query.order" options on the "report.print" command. I've attached a piece of code under a button from a screen. We use it to select records for a report based on starting and ending dates. You should be able to use this as an example for your needs.

          By the way, We're in Rochelle Park, not too far from Englewood Cliffs.

          Code:
          'Date Created: 11-Jul-2008 02:12:59 PM
          'Last Updated: 23-Jul-2008 02:27:45 PM
          'Created By  :
          'Updated By  : 
          'Prompt for a value using a radio button dialog box.
          DIM Shared  audrep as c 
          dim shared rep as c
          dim global level as c
          if level="A"
          	'ok
          else
          	ui_msg_box("Med.Audit Reports","Access Denied")	
          	end
          end if	
          '
          'get from and to dates
          DIM GLOBAL dFrom as D
          DIM GLOBAL dTo as D
          DIM Global cTitle as C
          Dim shared tpye1 as C
          dim shared audrep as C
          type1 = "All"
          cTitle = ""
          dFrom = {}
          dTo = {}
          DIM SHARED varC_result as C
          heading_string = "Medicaid Audit Reports"
          ok_button_label = "&OK"
          cancel_button_label = "&Cancel"
          varC_result = ui_dlg_box(Agency,<<%dlg%
          {region}
          {text=55,1:heading_string};
          {endregion};
          {frame=1,1:Report Choice}
          {region}
          (audrep:Status Changes){lf}
          (audrep:Redet Dates Blank on active Cases);
          {endregion};
          {lf};
          {frame=1,1:Please Enter Dates}
          {region=a}
          Enter Beginning Date:|	[%DATE;P=popup.calendar(dtoc(dFrom));I=popup.calendar%.40dFrom!dFrom_*];
          Enter Ending Date:|	[%DATE;P=popup.calendar(dtoc(dTo));I=popup.calendar%.40dTo!dTo_*];
          {endregion};
          {lf};
          {condition=(audrep="Status Changes")}
          {region}For Status Change, Please Select: |
          (type1:All)|
          (type1:Denied Only);
          {endregion};
          {lf};
          {condition=.T.};
          {line=1,0};
          {region}
          <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
          {endregion};
          %dlg%,<<%code%
          if left(a_dlg_button,6) = "dFrom_" then 
          	if a_dlg_button = "dFrom_killfocus" then 
          		dFrom = ctod(dtoc(dFrom))
          	end if 
          	a_dlg_button = ""
          end if 
          
          if left(a_dlg_button,4) = "dTo_" then 
          	if a_dlg_button = "dTo_killfocus" then 
          		dTo = ctod(dtoc(dTo))
          	end if 
          	a_dlg_button = ""
          end if
          %code%)
          if varC_result = "Cancel"
          	ui_msg_box(agency,"Action Cancelled at User Request")
          	end
          end if
          if audrep = "Status Changes"
          	rep="Medaud Statchng"
          	if type1 = "All"
          		cTitle = "Status Changes"
          		filter = ".not.isblank(\"B_Stat\").and.B_Stat<>A_Stat.and.BETWEEN(A_Cdate,[VarD->dFrom],[VarD->dTo])"
          	  else
          	  	cTitle = "Cases Denied"
          	  	filter = ".not.isblank(\"B_Stat\").and.B_Stat<>A_Stat.and.A_Stat=\"D\".and.BETWEEN(A_Cdate,[VarD->dFrom],[VarD->dTo])"
          	end if
            elseif audrep="Redet Dates Blank on active Cases" 
          	rep="Medaud Redetchng"	
          	filter = "B_Redetdate<>{}.and.a_Redetdate={}.and.(A_Stat=\"M\".OR.A_Stat=\"N\".OR.A_Stat=\"A\").AND.BETWEEN(A_Cdate,[varD->dFrom],[varD->dTo])"
          end if
          
          debugcheck()
          Query.filter = replace_parameters(filter,local_variables())
          Query.order = ""
          'Prompt user whether to print, or preview the layout. Set default to Preview 
          prompt_result = ui_get_print_or_preview("Preview ")
          If prompt_result = "Print" then
          	:Report.Print(rep,Query.filter,Query.order)
          
           Else if prompt_result = "Preview" then 
          	:Report.Preview(rep,Query.filter,Query.order)
          End if
          end
          The trick here is to use the "replace parameters" command. It takes your variables and converts them to text used in the "query.filter". The filter needs to be a text field. If you modify the code a bit and use Numeric variables for starting and ending check #'s instead of starting and ending dates, it should work. You will need to remove some of the things specific to my application. If you set your "query.order" to check #, I think you will get the results you need.

          Tom

          Comment


            #6
            Re: Print Multiple Checks

            Hi John,

            A consideration when printing cheques whether singly or multiple, and that is reprints. Do you allow them or not?

            If a payment has been made, how do you prevent a duplicate payment?

            Just a passing thought.
            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


              #7
              Re: Print Multiple Checks

              Keith is right. Unless you want a rela fiscal mess on your hands, you need to identify that you have printed the checks.

              In our check print routine, we use the beginning and ending check numbers as a range for an update of the payment records. using that range, we update a "printed" field with the date that the checks were printed.

              Tom

              Comment


                #8
                Re: Print Multiple Checks

                TO: Tome Cone Jr: Tom Henkel: Keith Hubert

                Gentlemen:

                In response to your responses, I submit the following...

                First, Thanks to all for trying to help.

                Second, The issue of duplicate checks is not a pressing matter as of this moment. Frankly, I had never thought of it. The ladies using A4 software are crackerjack office people and in over ten years, none has printed a check twice. However, finding a way to 'flash' should someone attempt to pay an invoice twice is of interest.

                Third, the lengthy code suggested is a bit much for this new convert to A5.
                I doubt I can handle it. If it is the only way to accomplish printing multiple checks, I will have to spend a great amount of time on this project.

                Was I on the wrong track trying to combine an Xdialog box with a print check report operation? I have attached ask variables to operations as suggested by Tom Cone with success. This seems a similar situation.

                In the almost one year, I have been using A5, I have learned a lot. I use the message board and the help file, although, I seem to get more from the Mesage Board. It seems as if I am becoming an alphaholic also, but on a much much lesser level. What else does a 75 year old have to do!

                Well, hopefully, someone will find the time to resolve my problem of the moment. Kindest regards to all.

                john linley

                Comment


                  #9
                  Re: Print Multiple Checks

                  John,
                  Not to add to an already complex issue, but you could save the last check # that was printed and offer the next incremental value as the default value of the first check to be printed during the next check run.

                  I usually put a start table in all my apps to hold junk like that. Others refer to it as a dummy table. It can have three or four character fields, three or four logical fields, three or four numerical fields, three or four date fields and a few memo fields. You can stick the number of the "last check printed" in one of the text fields and then increment it and offer it as the default number of the first check to be printed next time. It might also flag if a check is stolen.

                  Good luck.
                  Jay Talbott
                  Jay Talbott
                  Lexington, KY

                  Comment


                    #10
                    Re: Print Multiple Checks

                    Hi John,

                    Well, hopefully, someone will find the time to resolve my problem..
                    Does this mean you have not done this?
                    Was I on the wrong track trying to combine an Xdialog box with a print check report operation?
                    You are on the right track, if your Cheques report has a field which is the cheque number then this is very simple even a youngster of 75 like you can do it.

                    From a print button on a form you will have two Action Scripts, the first will be your own Xdialog to ask for the first and last numbers. The second will be the report with the cheque details. The filter for the report will be between(cheque_no,Variable_1,Variable_2) which will be the two variables from the Xdialog, and that should do the trick.

                    The code that Tom Henkel gave you was an Xdialog which contained a start and end date for the print range. He then went on to say
                    If you modify the code a bit and use Numeric variables for starting and ending check #'s instead of starting and ending dates
                    That was assuming the cheque #s were numeric.

                    Let us know how you get on.
                    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


                      #11
                      Re: Print Multiple Checks

                      John, I still think the action scripting solution is the easiest by far. Here's a simple example. -- tom

                      Comment


                        #12
                        Re: Print Multiple Checks

                        A form with a beginning and ending check number is basically the same and a filter in the report using the 2 date variables will accomplish this simply.

                        If you have a check off field in the table with the check numbers, they can be marked as done when you print. this could stop further prints and shouldin my humble opinion be included in the report filter.

                        if you want to reprint a check it could be overridden with a seperate operation.

                        using "done" as your field and vars holding checkstart and checkend: filter would be something like
                        between(checknumer,checkstart,checkend).and. done=.f.

                        you could even put the above in a variable and pass it to the report. it would give you the option for many parameters.

                        .


                        .


                        .
                        Dave Mason
                        [email protected]
                        Skype is dave.mason46

                        Comment


                          #13
                          Re: Print Multiple Checks

                          Originally posted by john linley View Post
                          TO: Tom Cone

                          Received your fast response, thanks again...
                          Will attempt to accomplish this task this weekend. Will the action scripting allow for a user interface giving the user prompts for first and last check numbers to print??? If so, and it is too complex, I may not be able to handle it and I might need further assistance.

                          Hope that is OK.

                          I don't know where I would be without the message board and guys like you who are so generous with their time!!!

                          Kindest regards,

                          john linley

                          Comment


                            #14
                            Re: Print Multiple Checks

                            from: john linley

                            to: Keith; Tom H: Tom C: Jay: Dave M;


                            Gentlemen,

                            Hip hip hooray, printing multiple checks is now functioning correctly. Many many thanks to all. For awhile I was continuing to have problems, receiving various error messages. I kept trying and finally erased the original xdialog box and re-wrote it. I don"t know exactly what I did wrong the first time, but the xdialog works fine with the print check report. I still have a little hair left. Thank you all for letting me to keep it intact.

                            To: Tom Cone Jr. I have given consideration to your proposal and am looking into installing one of the software programs you suggested. I do
                            anticipate needing further assistance down the road with other projects.
                            Will contact you further about this later on.


                            Regards to all, and again, many thanks.

                            john linley

                            Comment

                            Working...
                            X