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

Report based on a filter

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

  • Report based on a filter

    I have searched the forum and really can't find a clear answer to this. I have a view with two components.

    Component one is a Grid linker. This allows me to have Parent - child view and is great.

    Component two is the Print report. I can print all records but really only want the one that the view is on at that time.

    How do do I get the unique ID from the field on the form that I want to be used in the filter in the report. I have looked in the source code to the page and cannot yet follow how to extract it.

    I am sort of thinking that when I press the button to print the report it takes the data then, but still not sure how to get this.
    Any help appreciated

  • #2
    Re: Report based on a filter

    Normally you would do it through a dialog using the Genie, send some screen shots so we can see what you are doing.
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

    Comment


    • #3
      Re: Report based on a filter

      OK - what you see here is a screen shot of the basic web page. Note there is on header with detail below which is a child, hence the need to use the Grid linker.

      I want to extract the header ID to be used to fileter the report. I can get the report to be based on all records, but this is not what I want to do.

      Thanks for the help

      Comment


      • #4
        Re: Report based on a filter

        I need to see what's behind the button?

        You know V10 this is standard in the grid - so I'd encourage you to upgrade when it hits.
        Insanity: doing the same thing over and over again and expecting different results.
        Albert Einstein, (attributed)
        US (German-born) physicist (1879 - 1955)

        Comment


        • #5
          Re: Report based on a filter

          Thanks - All that is behind the button is the standard genie result on the after validate. I have tried experimenting with variables, but nothing worked, so it as that point

          dim filter as c
          dim order as c
          Filter = ".T."
          Order = ""
          Dim filename as c
          filename = session.session_folder + "tempreport.pdf"
          filename = report.saveas("[email protected][PathAlias.ADB_Path]\jsa.set","pdf",filter,order,filename,.f.)
          if file.exists(filename)
          currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
          end if

          The above will print all records in te found set. I just want the one

          Comment


          • #6
            Re: Report based on a filter

            OK I'm just going out to dinner - but you can figure this out.

            Hint: go in to the dialog builder and do your button, then use the GENIE to build your report process and tell it the FILTER other than just .T. it needs a condition .t. .and, whatever...else.

            Give it ago.
            Insanity: doing the same thing over and over again and expecting different results.
            Albert Einstein, (attributed)
            US (German-born) physicist (1879 - 1955)

            Comment


            • #7
              Re: Report based on a filter

              I did that - the button is on its own dialog. It is the condition that I am trying capture. How do I reference the unique ID from the view of the html form? I understand the need to filter this but I cannot see how to do it. As it is built in a component, I cannot capture it as you would with CurrentForm.Controls.fieldname.value. This does not work here so there is something else that is required.

              Comment


              • #8
                Re: Report based on a filter

                See if this helps. You reference it from the file or the grid {place holder} in the demo attached it's {Account}.

                Hope this helps.

                http://www.screencast.com/users/iGro...d-34601cd2def6
                Insanity: doing the same thing over and over again and expecting different results.
                Albert Einstein, (attributed)
                US (German-born) physicist (1879 - 1955)

                Comment


                • #9
                  Re: Report based on a filter

                  Thanks for that, but it is not what I need. The from has two components. One is the print button dialog and the other is a grid linker, so there are two grids. I want the button to grab the ID field from the first grid in the grid linker and filter the report on that.

                  Your demo shows that you can get the details of the set into a drop down list. I don't think sets apply in V9 as I cannot see mine like you can. Maybe V10 only.

                  When I veiw the HTML code for the form, it does not show the fields as they are built by Ajax. What I can see is that each component gets placed into a variable container. I thought I might be able to drill down that container to the field, but cannot get it right.

                  My option here is to break my steps back down and move away from the grid linker for the print.

                  After all this typing, I am actually overlooking the obvious. All a user needs to do is print my view using the web browser - duh. Still I like the challenge on this and will pursue it another day.

                  Thanks for all the help

                  Comment


                  • #10
                    Re: Report based on a filter

                    I think the simple solution is to add a print link to the grid.
                    Bob Moore


                    Comment


                    • #11
                      Re: Report based on a filter

                      can you give more advice on this one.

                      Comment

                      Working...
                      X