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

New Report Field OnPUSH Event

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

    New Report Field OnPUSH Event

    i love the ability to add an onpush event on a field in a report - this is one of my favorite new features in V9 from V5 conversion. I do have one question, however.

    I have a financial trial detail report that shows all activity to each chart of account. Because the detail can be from a journal entry or cash disbursement, etc. (different tables)... how can i do an if..then on this event.

    So, if the transaction id starts with JE - the onpush sends to the journal entry form, if the transaction id starts with CD the onpush sends to the cash disbursement form, etc.... not sure how to add if, then statments to the onpush. I am still someone that mainly uses action scripting, so i don't know how to convert and add layers here.
    Thanks for any suggestions.

    #2
    Re: New Report Field OnPUSH Event

    Something like this should work.
    Code:
    dim tbl as p 
    dim trans_prfx as C
    'get a pointer to the table on which the report is based.
    tbl = table.current()
    
    trans_prfx = left(tbl.transaction_id,2)
    
    select
        case trans_prfx = "JE"
            form.view(....
        case trans_prfx = "CD"
            form.view(....
    end select
    or if using action scripting place an open form action for each choice and make the action conditional on an expression eg left(transaction_Id,2)= "JE"
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

    Comment


      #3
      Re: New Report Field OnPUSH Event

      i LIKE AND UNDERSTAND THIS, BUT THERE IS ONE VARIABLE MISSING THAT I'M NOT SURE I KNOW HOW TO ADD... THIS WORKS GREAT FOR CHOOSING WHICH FORM IT GOES TO, BUT WHEN IT GOES TO THE FORM, I WANT IT FILTERED TO THE TRANSACTION ID... SO IT IS THE RECORD IN THAT FORM THAT MATCHES THAT TRANSACTION ON THE REPORT... SO IF JE100000001 IS SELECTED, IT GOES TO THE JE SCREEN, TO TRANSACTION ID 100000001.

      I am not very good at xbasic, so here is my attempt to take what you had and add the "filter" variables for each of the selections.... when i try to run in my report, it isn't working however... the error is Paramter1 =eval(transaction.value), Variable "JE10000022" not found.. HERE IS WHAT I DID TO YOUR CODE...

      dim tbl as p
      dim trans_prfx as C
      'get a pointer to the table on which the report is based.
      tbl = table.current()
      trans_prfx = left(tbl.transaction,2)
      Parameter1 = eval(Transaction.value)

      select
      case trans_prfx = "JE"
      DIM SHARED VarP_Journal_EntrIES as P
      DIM layout_name as c
      filter = "entry_no = [right(varC->paramter1,10)]"
      query.filter = replace_parameters(filter,local_variables())
      query.order = ""
      layout_name = "Journal Entries"
      VarP_Journal_EntrIES = :Form.viewqueried(layout_name,query.filter, query.order )
      case trans_prfx = "CD"
      DIM SHARED VarP_Cash_Dispursements_V as P
      DIM layout_name as c
      filter = "trans_no = [varC->paramter1]"
      query.filter = replace_parameters(filter,local_variables())
      query.order = ""
      layout_name = "Cash Dispursements V"
      VarP_Cash_Dispursements_V = :Form.viewqueried(layout_name,query.filter, query.order )

      end select

      ====
      Any suggestions?

      Comment


        #4
        Re: New Report Field OnPUSH Event

        Hi Lynda,

        I could not tell you if your code was right or not.

        I would simply use Action Scripting.

        The script I would use would be the same Action Script filter you would use if you were opening another form from a form button.

        Hope this gives you another angle to work with.
        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: New Report Field OnPUSH Event

          the problem with action scripts, is that i'd have to put several of them because there are several places it could go. And if i do that, i get "no record in layout" box that has to be closed by user for each of the ones that don't apply. So if the report has three transactions; JE100000001, CD000001, F1000001.... the JE would need to be sent to the journal entry form filtered to 100000001 (notice it has to be trimmed here which isn't allowed in action scripting that i can see), the CD would need to be sent to the Cash Disbursement screen filetered to CD000001 (no trim here) and the F1000001 would have to be sent to the Dispatch Load sheet filtered to F1000001.... when a user clicks on a F1000001, there are two boxes that say "record not found" because it looks to the first two action scripts first and there obviously isn't an "F1000001" in the journal or CD... this isn't very professional or clean unless you have an idea of how to use the action scripting that i don't. That's why i like the idea of the select list, just now sure how to add the filter variables for each as shown above.

          Comment


            #6
            Re: New Report Field OnPUSH Event

            Try this

            I moved the left() function to each case test since you now say there are different possibilities for the length of the prefix. I also used the 'this' as a pointer to the control with the transaction value. I did not know the field name (in red) in the Dispatch Load form so you will have to edit that if wrong.

            Code:
            dim trans as C
            trans = this.text  'The 'this' refers to the control that the code is attached to.
            
            select
            case left(trans,2) = "JE"
            DIM SHARED VarP_Journal_EntrIES as P
            DIM layout_name as c
            query.filter = "entry_no = " +quote(right(trans,10))
            query.order = ""
            layout_name = "Journal Entries"
            VarP_Journal_EntrIES = :Form.viewqueried(layout_name,query.filter, query.order )
            
            case left(trans,2) = "CD"
            DIM SHARED VarP_Cash_Dispursements_V as P
            DIM layout_name as c
            query.filter = "trans_no = " +quote(trans)
            query.order = ""
            layout_name = "Cash Dispursements V"
            VarP_Cash_Dispursements_V = :Form.viewqueried(layout_name,query.filter, query.order )
            
            case left(trans,1) = "F"
            DIM SHARED VarP_Dispatch_Load as P
            DIM layout_name as c
            query.filter = "[COLOR=Red]trans_no[/COLOR] = " +quote(trans)
            query.order = ""
            layout_name = "Dispatch Load"
            VarP_Dispatch_Load = :Form.viewqueried(layout_name,query.filter, query.order )
            end select
            Tim Kiebert
            Eagle Creek Citrus
            A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

            Comment


              #7
              Re: New Report Field OnPUSH Event

              thank you. it works like a charm... now i can take this and expand it, or edit for different reports with multiple goto locations, etc....

              Again, you have been very helpful with this and the multiple reports onpush event and i appreciate it greatly!

              Lynda

              Comment

              Working...
              X