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

Export a fixed length file

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

    #16
    Hi Stan

    File I am copying is attached in the last field that is only period and 251 long is how it is formatted in the attached file.

    Stan I have just been talking and looking at the file and there are four extra fields and the last period fields is different

    second period is for 116
    new field account = Acno for 30
    branch = Col_depot for 15
    W "if branch = 01" for 90
    O is on put on the Nomi code line for 15

    My depot codes are as follows

    col_depot = old = 01
    col_depot = G = 02
    col_depot = ost = 03
    col_depot = mcr = 05
    col_depot = so = 06
    col_depot = be = 07

    Andy

    Comment


      #17
      Sorry Stan

      Missed attachment

      Comment


        #18
        revised

        From your attachment I think you want the attached script.
        Last edited by Stan Mathews; 03-28-2006, 03:24 PM.
        There can be only one.

        Comment


          #19
          Thanks Stan

          I will try it tomorrow and let you know how it goes

          Andy

          Comment


            #20
            Hi Stan

            Please find attached my revised script it now matches the original in respect of the lenght and orientation of each field,

            If I look at the original file "trans" what it does is total the field net_value for a account "acno", then within the account sums each field with the nomi code for each nomi code. each total goes on a new line the only diferance is that instead of a "D" for debit as on the account line there is a "C" for credit and the Account becomes the nominal code,

            We have a tax here called VAT which the nominal code is 9350 for this line in the file we have to total the vat field this is also within the account

            I dont think I have explained that very well

            I will attach a summary operation to the dbase and call it stan for you to look at, the results are in a table dc00003

            Andy
            Last edited by [email protected]; 08-21-2006, 02:36 PM.

            Comment


              #21
              Out of touch til Monday

              Andy,

              I'll give it a look sometime Monday.

              Stan
              Originally posted by [email protected]
              Hi Stan

              Please find attached my revised script it now matches the original in respect of the lenght and orientation of each field,

              If I look at the original file "trans" what it does is total the field net_value for a account "acno", then within the account sums each field with the nomi code for each nomi code. each total goes on a new line the only diferance is that instead of a "D" for debit as on the account line there is a "C" for credit and the Account becomes the nominal code,

              We have a tax here called VAT which the nominal code is 9350 for this line in the file we have to total the vat field this is also within the account

              I dont think I have explained that very well

              I will attach a summary operation to the dbase and call it stan for you to look at, the results are in a table dc00003

              Andy
              There can be only one.

              Comment


                #22
                thanks Stan

                Andy

                Comment


                  #23
                  Hi Stan

                  Hope you had a good weekend

                  One other thing I have seen on the file on the nominal code line its total by nominal code by depot

                  ie
                  dp10360
                  1010 old = 01
                  1010 ost = 02


                  Andy

                  Comment


                    #24
                    Hi Stan

                    Here is my Latest version It nearly does everything i want

                    The only Problem i have is does not start a new Account but it runs through there nominal codes and vat codes

                    I know its a problem with my if statement but i am not sure how to put it right

                    Andy

                    Comment


                      #25
                      Hi Stan

                      I have come up against another problem

                      The two lines of the file write should write the total invoice value and the total vat value

                      fil.write_line(padr(alltrim(tbl.acno),15," ") +var->pd+cdate(tbl.first_invoice_date)+" "+"M "+(padr(remspecial(str(tbl.total_Net_total,12,2,"")),18," "))+"D "+"captn"+"captn"+padr(remspecial(str(tbl.first_invoice_no,15,0,"")),15," ")+"invoice "+cdate(date())+var->pd+space(154))+crlf()
                      fil.write_line("9350 " +var->pd+cdate(tbl.first_invoice_date)+" "+"M "+(padr(remspecial(str(tbl.total_vat,12,2,"")),18," "))+"c "+"captn"+"captn"+padr(remspecial(str(tbl.first_invoice_no,15,0,"")),15," ")+"invoice "+cdate(date())+var->pd+space(244)+padr("O",15," "))+crlf()

                      And the third line would be the nominal code value writes the nominal codes for the invoice

                      The problem I have is that in the sumarize it has not got sub groups, so the first total would be total for the invoice/ account and vat total.

                      and the sub group would be nominal code

                      Andy
                      New script attached

                      Comment


                        #26
                        I'm lost.

                        Here's my alteration of the andyscript2 file. You had two issues as I saw them.

                        The section

                        Code:
                        newaccount:
                        DIM SHARED account AS c
                        account = tbl.eval("acno")
                        occurred before the tbl.fetch_first() so it was looping back to the very beginning instead of starting at the next record. Move this after the tbl.fetch_first().

                        The section

                        Code:
                        DIM SHARED account AS c
                        		account = tbl.eval("acno")
                        		
                        		IF account = account THEN
                        			goto sameaccount else
                        			goto newaccount
                        		END IF
                        has the problem that account = account will always be true. This should probably be something like

                        Code:
                        DIM SHARED naccount AS c
                        		naccount = tbl.eval("acno")
                        		
                        		IF naccount = account THEN
                        			goto sameaccount else
                        			goto newaccount
                        		END IF
                        Past that I am lost in all your discussions of summarizing, totals, etc.

                        Hope this gets you back on the right track.

                        Stan
                        There can be only one.

                        Comment


                          #27
                          Hi Stan

                          If I could just go over again what i am trying to achieve then maybe you could give me an idea of the way i should go about it

                          in the table i have the fields total_cost, Vat, Net_value

                          For the Account line in the file I am trying th produce I want a total of net_value for a invoice No and a total of Vat (this is for all the consignments for any given invoice)

                          The nomi code line in the file is the total_cost for each nominal code( this is for the given invoice)

                          so my file would end up like below

                          DP10360 TOTAL OF NET_VALUE
                          9350 TOTAL OF VAT
                          1010 TOTAL OF TOTAL_COST = TO 1010
                          1020 TOTAL OF TOTAL_COST = TO 1020
                          DA00017 TOTAL OF NET_VALUE
                          9350 TOTAL OF VAT
                          1010 TOTAL OF TOTAL_COST = TO 1010
                          1020 TOTAL OF TOTAL_COST = TO 1020
                          DA00020 TOTAL OF NET_VALUE
                          9350 TOTAL OF VAT
                          1010 TOTAL OF TOTAL_COST = TO 1010
                          1020 TOTAL OF TOTAL_COST = TO 1020


                          I hope this makes a little more sense of what i am trying to achieve

                          Andy

                          Comment


                            #28
                            Originally posted by [email protected]
                            Hi Stan

                            If I could just go over again what i am trying to achieve then maybe you could give me an idea of the way i should go about it

                            in the table i have the fields total_cost, Vat, Net_value

                            For the Account line in the file I am trying th produce I want a total of net_value for a invoice No and a total of Vat (this is for all the consignments for any given invoice)

                            The nomi code line in the file is the total_cost for each nominal code( this is for the given invoice)

                            so my file would end up like below

                            DP10360 TOTAL OF NET_VALUE
                            9350 TOTAL OF VAT
                            1010 TOTAL OF TOTAL_COST = TO 1010
                            1020 TOTAL OF TOTAL_COST = TO 1020
                            DA00017 TOTAL OF NET_VALUE
                            9350 TOTAL OF VAT
                            1010 TOTAL OF TOTAL_COST = TO 1010
                            1020 TOTAL OF TOTAL_COST = TO 1020
                            DA00020 TOTAL OF NET_VALUE
                            9350 TOTAL OF VAT
                            1010 TOTAL OF TOTAL_COST = TO 1010
                            1020 TOTAL OF TOTAL_COST = TO 1020


                            I hope this makes a little more sense of what i am trying to achieve

                            Andy
                            I think I have the picture now. The attachment should do what you want.
                            Last edited by Stan Mathews; 03-28-2006, 03:24 PM.
                            There can be only one.

                            Comment


                              #29
                              Originally posted by Stan Mathews
                              I think I have the picture now. The attachment should do what you want.
                              I commented out the summarization routine for testing. Attached is the un-commented out -real- script.
                              Last edited by Stan Mathews; 03-28-2006, 03:24 PM.
                              There can be only one.

                              Comment


                                #30
                                Hi Stan

                                The Total off the VAT, & NET_TOTAL fields

                                I want to do the same as the VAT & NET_TOTAL, on the total_charge field but giving me all the totals of the nominal code fields for each depot so I think it should be BY ACCOUNT,BY COL_DEPOT BY NOMI_CODE,
                                Thanks again Stan
                                Andy
                                Last edited by [email protected]; 01-30-2006, 03:09 PM.

                                Comment

                                Working...
                                X