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



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

Conditional Object on a Report

  • Filter
  • Time
  • Show
Clear All
new posts

    Conditional Object on a Report

    Sorry! I'm really, really confused about the use of Conditional Objects on a report. I've never had to use them in the past and now it seems that there is no way to avoid it in this very simple problem.

    Essentially what I have is a report showing various names of products. In a report list for a particular consumer, there is a field showing the budget for each item. Depending on the product, the budget amount needs to be shown in dollars or just the number itself.

    I first thought I could do this by using the color conditions in the budget object itself by setting the font color to white on white to blank it out, etc. However, that did not work out too well as the object was obscured somewhat. So, I turned my attention to the conditional object. However, try as I might I just can't seem to get this beast to work! I have read the WIKI and multiple posts, but I still can't get a clear summation of how this object works. I truly wish the WIKI would contain working examples of this.

    Here is what I did. I selected the conditional object from the object list and placed it on the report form. I then dragged and dropped the budget object into the CO square. I then right-clicked the CO and made up a filter like substr(contracts->waivername,1,4)="ACTI" which, when true, should show the object in dollar format. But from there, I'm stumped! Do I need to create another object? If so, where does that object get placed? On top of the first object? Or do I need to create another CO with a different budget item in it? Also confusing is the name of the label, etc.

    Any info on this would be of great help!


    Re: Conditional Object on a Report

    Hi Charles,

    You are half way there. All you need now is another condition that is not the same as the first one. If you right click on the CO and select Properties you could then add the new condition there. You might even be able to use the Default. The label of the condition can be the expression itself or some other name that means something to you, for when you might want to go back and edit it.

    One other thing you can always do to change the display in a CO, is use a calculated field.
    Keith Hubert
    Alpha Guild Member
    KHDB Management Systems
    Skype = keith.hubert

    For your day-to-day Needs, you Need an Alpha Database!


      Re: Conditional Object on a Report

      The AlphaSports sample invoice form has the credit card number and expiration date in a conditional object. You might study that.

      A conditional object performs the same on a report as it does on a form.
      There can be only one.


        Re: Conditional Object on a Report

        OK. Looking over the suggestions! Thanks.


          Re: Conditional Object on a Report

          OK. Thanks Keith and Stan.

          I looked over the AlphaSports invoice. I see that it works to either show or hide the field based on the conditional properties.

          In order to get what I want, i.e. dollar formatting for the field as opposed to regular formatting, do I create two CO's and then put one over the other, or can I do it with just one? I've experimented with both ideas and can't get it to work.



            Re: Conditional Object on a Report

            The AS example uses a single CO with multiple layers. That's typical. That's probably all you need.


              Re: Conditional Object on a Report


              Here's a link to the help file topic.


                Re: Conditional Object on a Report

                Thanks Tom. I read this over again and again. However I don't think it applies to my situation. I need the CO on a report, not on a form like in the A5 example. I need the CO to determine the information in the detail line and then show the required formatted object. When I try this, all I get is a blank. If I am mistaken or don't understand, just tell me. In the meantime, I'll try and work up and example of what I am trying to do.



                  Re: Conditional Object on a Report


                  OK. I made up a quick sample. Please look at the report "Mgr_Contract_Report". You will see the CO in the middle of the report. Again, all I am trying to accomplish here is displaying the object "AllowanceUnits" formatted in dollars when the waivername = "Activity". Other than that, it should display as a regular number.

                  Attached Files


                    Re: Conditional Object on a Report


                    - duplicated your report
                    - stripped out the filter and ordering properties of the report
                    - deleted your CO
                    - created a new CO with two layers: IsActivity and NotActivity
                    - changed the condition expressions you were using.
                    notice that the expressions differ, your's did not
                    - dropped the AllowanceUnits field into the NotActivity layer of
                    the CO
                    - discovered that could not use the numeric formatting satisfactorily
                    for the IsActivity layer, so created a new calc field in the report
                    to show the trimmed string equivalent of the numeric field, formatted
                    as dollars.

                    Hope this helps.
                    Attached Files


                      Re: Conditional Object on a Report

                      Thanks Tom. I'll download this and look it over.

                      Question: Am I wrong for thinking that this should be a bit simpler?


                        Re: Conditional Object on a Report

                        Yes, I think so. When you get more experience with the conditional object you'll see that it's very powerful and flexible.

                        You call this a simple thing, but here's what has to happen to produce the result you want:

                        - the AllowanceUnits field in your table is NUMERIC data
                        - to display the field value as dollars Alpha must convert it to character data and then format it appropriately (commas, dollar signs etc). Dollar signs are not numeric data. Neither are commas.
                        - in one object in your report you sometimes want a simple string of characters, without dollar formatting. But sometimes for the same object you want Alpha to use the dollar formatting.
                        - what you want is "simple" if you use two objects in the report, but you want to use a single object.
                        - the CO fills the bill by permitting you to define two "layers" either of which will appear on condition

                        If you didn't use the CO you'd have to preprocess the records in the report, putting the desired string of formatted (or unformatted) characters in a different field, and then use that field in the one object you have in your report. That wastes disk space and is a clumsy workaround in my opinion, but if it floats your boat, add another field to your contracts table and create a table level field rule to define a calculated expression that stores the unformatted string in the new field if not activity, and stores the formatted string in the new field if its activity. Then change the report to drop the CO and replace it with the new field. Make sense?


                          Re: Conditional Object on a Report

                          Thank Tom. I got it to work. However, what I noticed was that if you play with the objects inside the CO, they will sometimes disappear. If I lengthen them, then they will re-appear. Are you noticing this?


                            Re: Conditional Object on a Report

                            Originally posted by Charles Hoens View Post
                            Question: Am I wrong for thinking that this should be a bit simpler?
                            It can be.

                            How about a calc fieldstr = if(waivername = "Activity","$","")+AllowanceUnits
                            can right justify with padl()
                            Conditional objects, while quite correctly useful and powerful may be overkill for a simple situation.


                              Re: Conditional Object on a Report


                              You have a good idea. In the context of his report the expression for the calc field you propose would be:


                              -- tom