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 groups nested using calculated fields

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

    Report groups nested using calculated fields

    I cannot derive the proper value using a calculated field in my report.

    The report is based on a set. The attached thumb nail image shows the
    Report, Set, 3 nested groups, and the issue with the Calculated field.

    See Image Below

    The report has 3 groups
    A. Code1 - based on first level of set (Section2)
    B. Area - Based on 2nd level of set - Breaks on Area->Area
    C. Question - Also based on 2nd level of set - Breaks on Area-Quest_No.

    The 2nd level table shows Area where each Quest_no is assigned an Area so that
    Area 1 has Questions 1-5, Area2 has Questions 6-13, etc...

    Within the 3rd group "Question", the calculated fields (Stat4,3,2,1,0) only display properly for the 1st Area.
    When the report displays the next Area ("2. Course Design..."), it refers back to the beginning.

    I display in LARGE/BOLD the QUEST_NO, and that displays properly.

    I also show the beginning of the calculated field (Stat1)
    (If(Area->Quest_no <6, eval("Section2->Q"+area->quest_no+"1"))
    It is THIS "Area->Quest_no " that fails when the area changes.

    I am guessing this is a design issue, where either my set is incorrect or the groups are not defined properly.

    I would appreciate any hints to get me back on track.
    Thanks,
    RAndy

    AreaGroup.jpg

    #2
    Re: Report groups nested using calculated fields

    Hi Randy,
    Did you ever get this resolved? Because without the tables there's not going to be much help available here.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    Comment


      #3
      Re: Report groups nested using calculated fields

      Okay, I still have the problem, but I've narrowed it down to my using the eval() function inside an IF statement in the Calculated field.
      I am posting another image that shows the EVAL() that works outside the IF statement and the Error that occurs when I use it inside the If (or IIF) statement (It did not matter which I used).

      Now that I have it narrowed down, it may be easier to debug.

      Thanks,
      RAndyIF_EVAL.jpg

      Comment


        #4
        Re: Report groups nested using calculated fields

        I think I see the problem.
        Both values used in an IIF statement must evaluate as the same variable type. Although they can be any variable type, they can not be different variable types. The Help topic on this function does not make this clear.

        In your example one evaluates as a string the other as numeric, that is assuming the field referenced is a numeric field.

        Your first scenario works because only the first value is evaluated, xbasic doesn't need the second value so it skips over it.
        In the second scenario xbasic first evaluates the first value than the second. But after evaluating the first value it has seen a string and expects the second value to be the same type hence the error.

        I can simulate your error with the following expression, where Patientage is a numeric field.

        iif(.T.,">>EVAL<<",Patientage)

        If the condition is true the expression evaluator returns ">>EVAL<<" if the condition is false I get the same error as your example.

        Comment


          #5
          Re: Report groups nested using calculated fields

          Place palm in front of forehead and slap hard.
          I knew it had to be something simple and I was so immersed, I could not see it.

          So my solution was really
          iif(.T.,">>EVAL<<",alltrim(str(Patientage,5,0)))
          and it works just fine.

          Thanks for the refresher!

          Randy

          Comment

          Working...
          X