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

Interactive Reports/choosing filters on the fly

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

    Interactive Reports/choosing filters on the fly

    Hi all,

    I'm new to Alpha Five! This is my first post here. So please be gentle :)

    I'm setting up a report for a client. The report uses a filter based on two specific values of two fields. For instance,

    Field_Color = Blue
    Field_Material = Steel

    I set these in the menu Report/Select Records. The report works fine.

    Now how can make these user selectable in the report during the preview? For instance, can we have two drop down boxes with the field values so the user can make the selections from these?

    Thanks.

    #2
    Re: Interactive Reports/choosing filters on the fly

    Hi ......Blue....???

    Hard to say why your thread got passed by as this is fairly straight-forward.

    Having said that, there are several ways in which to accomplish your objective, much of which is dependent upon how you are "calling" your report--from a form, manually via control panel, via a stand-alone script, ....

    If from a form, you could have the drop-down boxes bases upon the fields or even just a variable. Regardless, a variable would have to be used in order for the value(s) to be passed to the report--most likely the variable would be dimmed as global. Once chosen, the variable would be used where you now have it hard coded.

    If wanted just prior to a report, whether from a script or when a report is called directly via control panel, an xdialog box (or possibly a form) could be called up that will have combo boxes (or a multi-select list). Again, the values would be passed to variables. I would use the OnPrintInit event of the report in order to do this.

    If you could offer up a sample for us to use, I or someone else could cobble up something fairly quick to show you.....but with holidays and all it may be a bit until I could as am not on now but for a few minutes a day now---could very well be the reason why your question was not answered.

    Welcome to the messageboard---you will find most answers here, especially of the more basic nature---try a search and you may just find a solution as well. :)
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________



    Comment


      #3
      Re: Interactive Reports/choosing filters on the fly

      Hi Mike,

      Thank you very much for your help! I am new to Alpha5 and there are lots of options, it's little bit overwhelming at the beginning. I am calling the report directly via control panel. I will try your suggestions below. Thanks for the tips!

      Cheers.

      Comment


        #4
        Re: Interactive Reports/choosing filters on the fly

        Hi all,

        Calling the report directly via control panel and using text and listboxes worked well. As Mike suggested, I used variables for the input values.

        However now I need to figure out a way to be able to accept a wildcard as a part of the input. For instance, for the report filter, the client wants to input Field_Color = B* (in a textbox), which will select colors starting with the letter "B" (Brown, black, blue etc...).

        I am using the following statement in the filter:

        Field_Color =: Color_Input .AND. Field_Material=: Material_Input

        Any suggestions?

        Thanks!

        Comment


          #5
          Re: Interactive Reports/choosing filters on the fly

          Blue,
          I am fairly confused with your new question....in fact I don't have a clue as to what type of syntax it is you are trying to use.... a colon followed by a space followed by a name??
          Code:
          Field_Color =: Color_Input .AND. Field_Material=: Material_Input
          And if this is a filter (where used?) it would not work....maybe Field_Color =": Color_Input .AND. Field_Material=: Material_Input" . And it Field_Color a variable or the field name?

          Insert "B*" into a text box....easy enough....but wait--the second part of the sentence about something selecting colors???? what is selecting colors, how also. Could also maybe tell me (us) for what purpose as then things may begin to click.

          So many questions and am sure there will be a ton more from me at least. That is why a sample for me would be the ticket to help.... :)


          EDIT---would be nice to have a real name to call you by as well....unless Blue is your actual name!
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #6
            Re: Interactive Reports/choosing filters on the fly

            Hi Mike,

            Thank you for following up on this! My real name is Inanc not Blue :)

            The actual syntax of that line of code I posted is as follows (no spaces before the colons). Sorry for the confusion...

            Code:
            Field_Color=:Color_Input .AND. Field_Material=:Material_Input
            This is used as a filter for a report. The report and necessary calculation fields are all done. By the way, I am calling the report from the control panel (for now). Now I need to take this one step further for the client. He wants to have a "flexible front end" for the report so he can change the filter criteria without getting into writing the queries/codes himself. I am thinking that I might be able to do this by using a form where the client can make selections and the preview the report.

            Before going further here is a sample:
            ---------
            Date_Input,Color,Material,Cost1,Cost2
            1/1/2008,Black,Steel1,87,101
            2/1/2008,Blue,Steel2,104,97
            4/1/2008,Green,Copper,55,64
            1/1/2008,White,Plastic1,20,26
            ...
            ...
            ----------

            Let's say that we need to run the filter on Color and Material fields. We'd like to be able to use wildcards in the inputs for the filter. For instance for the Color field, I might use a textbox. The user can enter Black, Blue or B*. With B*, the colors Black and Blue will be selected from the sample above.

            From what I understand, this can be doable with a form to input the filter criteria and then push a button to preview/print the report. I need to find some samples to guide me at this point.

            Thanks,

            Inanc

            Comment


              #7
              Re: Interactive Reports/choosing filters on the fly

              Inanc,
              Code:
              Field_Color=:Color_Input .AND. Field_Material=:Material_Input
              most likely should be
              Code:
              "Field_Color=" + var->Color_Input +" .AND. Field_Material=" + var->Material_Input
              Assuming what comes after the var-> are variables--may not even need the var-> but makes it easier for you to see what I changed the colon to.

              I do not know of way to use a wild card in the filter as you want....but can be done by setting the variable to all colors starting with the letter chosen when suffixed with an asterisk like you want---this list could be created manually or with xbasic, then the filter set with if-then or select-case statements to figure it all out.

              The interface to do all this can be quite a few ways.....the messageboard has quite a few samples that have been attached which should show you some. Do some searches and look for attachments/samples/examples. You'll be surprised at how many are here and some are fairly complex as well.

              Hopefully answered a few of your questions....for future reference, try to limit a specific thread to just one question--helps everyone out then when searching for a specific solution.

              Have fun!! :)
              Mike
              __________________________________________
              It is only when we forget all our learning that we begin to know.
              It's not what you look at that matters, it's what you see.
              Henry David Thoreau
              __________________________________________



              Comment


                #8
                Re: Interactive Reports/choosing filters on the fly

                Mike,

                Thank you for your help. The code snippet I posted was for using the report filter when I ran it from the control panel directly. It worked OK, but I did something similar to what you posted when I started calling the report from a from and then pass the filter parameters.

                Have a great weekend,

                Inanc

                Comment

                Working...
                X