Solved

if then statement for first record of a group <> last record of the previous group?

Posted on 2012-03-22
6
401 Views
Last Modified: 2012-03-22
How to create an if then statement for first record of a group <> last record of the previous group?  this refers to group #2
0
Comment
Question by:kgittinger
  • 3
  • 3
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 37753150
Do you have a group in the report?
If so there is no real need for this test.

Test should be

If (OnFirstRecord OR {YourField} <> Previous({YourField}) then
    Do something with the first record of the group


mlmcc
0
 

Author Comment

by:kgittinger
ID: 37753217
I have tried this
if not onFirstrecord and {Table.employee_number} <> previous({Table.employee_number}) then 1 else 0
 but if the employee_number is the same as the last employee_number of the previous group it returns a 0

I do not know how to call the group...

Please know, group 1 is employer, group 2 is class.  Employees can be in multiple classes

Thank you very much.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37753561
You can't call the group as such.
You put the formula on the report and at that point you have the current record and the previous record.

WHat are you trying to accomplish with this?

mlmcc
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:kgittinger
ID: 37753600
I need a listing of employees (of which could be in the same plan/class for multiple  occurances), but I only want to count them once.  I cannot use distinct count because the cross-tab does not add distinct count of groups...

Here is my entire formla for counting employees

if onFirstrecord
then 1 else
if not onFirstrecord and {Table.employee_number} <> previous({Table.employee_number}) then 1 else 0

is there an first record of group(2) as opposed to OnFirstRecord?

Thank you.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 37753642
YOu can use DISTINCTCOUNT as a summary of the employee field

If you have this as the data

employer    Class    employee    yourformula
emp1          class 1    joe                 1    
emp1           class1    tom                1
emp1           class2     joe                 1                           joe is not the previous
emp1           class3     joe                 0                           joe is the previous

Right click the employee field
Click INSERT --> SUMMARY
Change to DISTINCTCOUNT
Put it in the employer group footer

mlmcc
0
 

Author Closing Comment

by:kgittinger
ID: 37753701
Thanks a million!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now