Fields/Dimensions/Metrics 2 / Conditional Formula Solution 1 pt. 2
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
That was the first way to do it. The second way to do this is a little bit different. Go to your View, go to Field Explorer, right-click on the Formula Fields and press New, and in this case we'll call it If Then 2. You can really name it whatever you want. In this case I'll say If my If-Then Solution is equal to December Bonus then 1 else zero. And I'll Check. No errors are found. Now follow me, here. This is saying it's going to look at my formula and every time there's a December Bonus I'm going to put the number 1 and I'm going to Save and close. From here I'm going to go ahead and close out my Field Explorer, go to my design view, and in this case, I'm going to suppress that Group Section, both Group Header 2 and Group Footer 2. Next, I'm going to insert a Summary Field, and in this case I'm going to choose the If Then 2 formula, and I'm going to Sum it, and this time it's going to be at the Group 1 Level. For fun I'm going to go ahead and not suppress the Group Level so we can compare our result sets. I just lined it up a little bit, and press Preview. Now the formatting's a little off, but it's no big deal. I've got this highlighted and I'm going to go up to this arrow here and I'm going to decrease the decimals. Notice how I've derived the December Bonus Count Ð those transactions over 250 dollars Ð by using a formula, in fact a formula of a formula, a conditional of a conditional. Now, it's a little confusing but I wanted to point this out to you that these Conditional Formulas are extremely flexible. You can use them within formulas and play on other formulas and get to the same result without having to use your Grouping Function. A lot of it depends. In some cases people don't want to see December Bonus in regulate it, they just might want to see the year and then the metric. It all depends on the audience of the report. Hopefully this solution helped you realize the potential for this conditional formula. The only downside to this Conditional Formula is it can get a little complicated and if you don't keep track of each step you can soon find yourself in over your head.
Tutorial Information
| Course: | Crystal Reports XI: Beginner |
| Author: | Kurt Dunlap |
| SKU: | 33966 |
| ISBN: | 1-935320-29-7 |
| Release Date: | 2009-02-10 |
| Duration: | 6.5 hrs / 95 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 