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 Filter (mental block!)

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

    Report Filter (mental block!)

    For some crazy reason I can't seem to wrap my head around this seemingly simple task.

    I have a report based on a set. The set consists of a Parent Table which lists Fire Incidents, Locations, Dates, etc.

    That table is linked to a child table consisting of "ApparatusTypes" (vehicles) responding to that incident.

    The last child table is called "Personnel Responding" and is linked to the ApparatusTypes table.

    A typical record would consist of a DATE, an APPARATUS TYPE, and SEVERAL PERSONNEL:

    04/12/2010

    ENGINE 20

    Smith = 1
    Jones = 1
    Wilson = 1
    Hargrove = 1

    Total Personnel on this ApparatusType (vehicle) = 4
    (Names are actually hidden on the report)

    Each person on a vehicle has a field with a value of "1," and on the report I have a calculated field that totals the number of personnel per vehicle, per incident.

    Now here's my problem: I need to filter the report to only show incidents (dates) where the number of personnel per ApparatusType (vehicle) is LESS THAN 4, and I can't figure out how to write the filter expression.

    The total number of personnel per ApparatusType is figured in the following expession:
    total(Personnelresp->Personnel_Count,grp->ApparatusType,grp->Detail)
    and I assume I somehow need to figure that into the filter expression, but for the life of me I can't figure out how.

    Any enlightenment would be appreciated.

    (A sample report is included but not filtered.)
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

    #2
    Re: Report Filter (mental block!)

    Originally posted by Rich Hartnett View Post
    Now here's my problem: I need to filter the report to only show incidents (dates) where the number of personnel per ApparatusType (vehicle) is LESS THAN 4, and I can't figure out how to write the filter expression.
    Could you not put a calculated field on the report and hide it? The in the filter, simply refer to the calc field in the filter; so your expression would be: Calcfield > 4

    kenn
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

    Comment


      #3
      Re: Report Filter (mental block!)

      Hi Ken, and thanks for the quick reply.

      Actually I thought of the same thing as you, but I can't get it to work.

      I took the same calculated field that I used to total all the personnel assigned to each vehicle, and used it in the filter expression.

      Here's the caculated field:
      PersonnelTL = total(Personnelresp->Personnel_Count,grp->ApparatusType,grp->Detail)
      And here is what I put in the filter expression:
      PersonnelTL<4
      The result is the same with or without the filter.
      (Notice the last pic. This is the report printed with the filter added, and
      there are responses with 5 and 6 personnel which should not be showing up
      since the filter specifies "less than 4.")
      Sergeant Richard Hartnett
      Hyattsville City Police Department
      Maryland

      Comment


        #4
        Re: Report Filter (mental block!)

        Rich,

        Use just the field which stores the # of personnel as the filter; personnel <4. You need the filter by the field, not a calc field.

        kenn
        TYVM :) kenn

        Knowing what you can achieve will not become reality until you imagine and explore.

        Comment


          #5
          Re: Report Filter (mental block!)

          Well I don't seem to be getting anywhere with this problem and I know it should be somewhat easy to do, so let me try this a different way.

          In the attached screen shot I have a report which groups calls for a particular fire truck by Incident No.+Date. On each call, there are anywhere from 4 to 10 firemen on the truck. Each fireman gets a count of "1", and the total number of firemen is listed at the bottom of each group. My calculated total field is called "PerTL."

          All I want to do is figure out how to filter the report to only show calls where there are (for example) 4 firemen on the truck.

          I thought this could be done by using the calculated field and writing it as "PerTL = 4," but it gives me nothing but a blank screen.

          What is the correct way to do this?
          Sergeant Richard Hartnett
          Hyattsville City Police Department
          Maryland

          Comment


            #6
            Re: Report Filter (mental block!)

            Hello, Rich.

            I don't think you can do this with a report filter that uses the calculated field for a group based on a linked child table to determine whether the parent (incident) record should be included in the report or not.

            I can imagine two solutions for you.

            1) Add a "flag" field (data type logical) to the incidents table. Run a script before running the report. The script would set all the flags false, and then when step through the incidents and set flags true if any of the vehicles that responded have the desired number of personnel. Then filter your current report limiting the included incidents to those where the flag field is set to true.

            Alternatively

            2) Run a script that steps through the incidents table and copies each record to a temporary table if and only if any of the responding vehicles have personnel totals that meet your desired criteria. Then base your report on a different set that includes the temp table instead of the incidents table.

            It's not clear from your description how you need to handle incidents with multiple vehicles. If two respond, with one carrying 3 people, and the other carrying 5, would you exclude this incident since the total number of people for the incident is 8?

            Comment


              #7
              Re: Report Filter (mental block!)

              Originally posted by Rich Hartnett View Post
              I know it should be somewhat easy to do
              It is..

              Comment


                #8
                Re: Report Filter (mental block!)

                Tom in answer to your question about other vehicles, this particular report is already filtered to just show this Vehicle Type, as this is the only one that has to be reported if it leaves the fire house with a certain level of staffing, so the other responding vehicles are not figured into the picture.


                Gabriel that works!!!!

                Thank You Very Much for putting that together for me. I have been beating my head against the wall for weeks trying to make it work with the info I displayed, and you have made it happen.

                As always, I appreciate everyone's input and suggestions. This message board is a wealth of knowledge.
                Sergeant Richard Hartnett
                Hyattsville City Police Department
                Maryland

                Comment


                  #9
                  Re: Report Filter (mental block!)

                  G,

                  Thanks for the simpler approach. You neatly sidestepped the issue I was worried about. Instead of trying to filter the report based on a calculated field in the layout itself, you used dbcount() in the filter expression to exclude unwanted records from the report. Nice job.

                  Comment


                    #10
                    Re: Report Filter (mental block!)

                    You're both welcome.

                    Comment


                      #11
                      Re: Report Filter (mental block!)

                      I'm back again with a somewhat similar request, only this time the report is laid out a little different.

                      This report shows an incident date, incident no., apparatus type and names of personnel, along with a single "count" for each volunteer firefighter, and a single count for each "career" (paid) firefighter, although I'm only interested in career firefighters for this project. I also have a total of each type (volunteer / career) for each incident. (See attached sample report.)

                      (The report has a group break on Incident Number, and on Apparatus Type.)

                      This is a monthly report, and what I am trying to do is create some caclulated fields in the footer that will tally how times an APPARATUS TYPE responded with 1 CAREER F/F, how many times it responded with 2 CAREER F/F's, 3 CAREER F/F's etc.

                      That information all appears to be available in the report, but I'm at a loss as how to create the correct expression that will give me the totals. I've tried a boatload of calculations but none of them give me the correct results.

                      As an example, in the attached report the footer should show something like this: (These are valid results for this report)

                      No. of times Engines responded with 1 Career Firefighter = 1
                      No. of times Engines responded with 2 Career Firefighters = 1
                      No. of times Engines responded with 3 Career Firefighters = 3
                      No. of times Engines responded with 4 Career Firefighters = 2
                      No. of times Engines responded with 5 Career Firefighters = 0
                      No. of times Engines responded with 6 Career Firefighters = 0
                      No. of times Engines responded with 7 Career Firefighters = 0

                      If I can just figure out how to make one of these expressions work, I can apply that calculation to the other values.
                      Sergeant Richard Hartnett
                      Hyattsville City Police Department
                      Maryland

                      Comment


                        #12
                        Re: Report Filter (mental block!)

                        Hi Rich,

                        I learned this from Tom Cone.

                        You need 2 calculated fields for each value you want to count. One to count the other to display the total.

                        Here is an example from a report that gives the results from a questionnaire. This counts the number of Responses that = 5 and displays the total value for each count in the calc field Res_EX_Tot.

                        Res_EX = if(Cust_Sat_Data2->Response=5,1,0)

                        Res_EX_Tot = total(calc->Res_EX,GRP->grand)

                        If you need more help with this, post some sample data.
                        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


                          #13
                          Re: Report Filter (mental block!)

                          Yes Tom is certainly "the man" when it comes to expressions.

                          Keith this looks like it will do the job, thank you very much.

                          My problem was that I was trying to make it work with a single calculation, rather than with two. As the expression goes, "I couldn't see the forest for the trees," and never thought to use a second calculation to total the first one.

                          I learn something new every day.

                          Thanks to both of you.

                          Rich
                          Sergeant Richard Hartnett
                          Hyattsville City Police Department
                          Maryland

                          Comment

                          Working...
                          X