The following is a guest post by independent Alpha Anywhere developer Doron Farber, owner of The Farber Consulting Group, Inc. Doron’s entire development business relies on Alpha Anywhere for custom software development and commercial software products.
The ChallengeThe Alpha Anywhere application I worked on for Avis Car Rental involved them acquiring another car rental company, Payless, while already having Budget as a subsidiary. This required us to design a versatile report with a similar structure for all three companies, but malleable and flexible enough for individual use by each.
In a scenario like this it would be typical for many Alpha Anywhere developers to use multiple Conditional Objects for the company logos. But, there is actually a much simpler way to go about it. Here's how to design a report Conditional Object that includes multiple conditions using Alpha Anywhere’s report engine:
Step 1:Click on the Conditional object found under the report’s Toolbox and place the cursor on top of the report’s body in the area where the logo generally appears. Expand the Conditional Object to the size that fits all logos.
Step 2:Right click on top of the Conditional Object line and select properties.
Steps 3:Click on the Condition Expression x:y button(see figure 2), and then click the Insert button (from the left side of Figure 1) while highlighting the Field Name option to select Company and then type = “Avis” as shown in the below image. That was the first condition for the first logo.
Click the OK button, and you are back in the Conditional Object Properties as shown in Figure 2.
In the Object name field you may enter a more descriptive name such as: Control_Logos. In the Label field enter the name Avis.
Step 4:Copy the first Image from your editor into the report’s body and paste it right within the Conditional Object. It is now a bit map image as shown in Figure 3.
Whenever we create a new condition you essentially “create a new tab” and so the surface is cleared for the new image.
Step 5:Highlight the New Condition right below the line named: Company = “Avis” as shown in Figure 2 and for the next logo repeat steps 2 to 5.
Step 6:Let’s add the 3rd logo based on steps 2 to 5. As a result of that, we now have 3 labels that represent each logo as shown in the below image. Right click on top of the Conditional Object will bring the menu with the 3 labels highlighted in yellow. Selecting each one of them will bring the corresponding image to the Conditional Object surface. Selecting the Default option below will show the empty surface above the Conditional Object.
About Doron Farber
Doron is an independent Alpha Anywhere developer and the owner of the The Farber Consulting Group, Inc. who builds database applications and websites for desktop and mobile devices. Doron’s entire development business relies on Alpha Anywhere for custom software development and commercial software products. Doron’s firm also provides database optimization and remote DBA services for MS SQL and MySQL databases.