Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula Post Reply Post New Topic
Page  of 2 Next >>
Author Message
rburke72
Newbie
Newbie
Avatar

Joined: 03 Aug 2011
Online Status: Offline
Posts: 13
Quote rburke72 Replybullet Topic: Formula
     Posted: 15 Aug 2011 at 5:05am
I am looking for assistance with a formula.
 
if {Attribute Type}='Commute Method' and {Attribute Name}='Bicycle' then 'X'
 
However, I need the formula to be by Employee.  Any ideas?
 
Thanks,
 
 
Racquel Burke
IP IP Logged
rburke72
Newbie
Newbie
Avatar

Joined: 03 Aug 2011
Online Status: Offline
Posts: 13
Quote rburke72 Replybullet Posted: 15 Aug 2011 at 6:35am
This is the formula I currently have.
 
if {@EmpLastFirstID}= if {Attribute Type_lv_PickFromList0.value}= "Home Office - Personal" and {Attribute.name}='Home Laptop or Desktop' then {Attribute.name} then "X "
 
I believe I have the Employee part wrong. 
Racquel Burke
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Aug 2011 at 7:15am
I do not understand what you are trying to accomplish...
Can you show a some sample data rows and what you want the formula to return based on the samples?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Aug 2011 at 7:41am
so the {@EmpLastFirstID} = "Home Laptop or Desktop"  ??
 
 
IP IP Logged
rburke72
Newbie
Newbie
Avatar

Joined: 03 Aug 2011
Online Status: Offline
Posts: 13
Quote rburke72 Replybullet Posted: 16 Aug 2011 at 2:48am

If Employee(EmployeeLastNameFirstNameID) has Attribute Type (Home Office - Personal) and the Attribute Name (Home Laptop or Desktop) then "X". 

Employee                                   Home Laptop or Desktop         Home Fax
CruzRachel011234                                  X
 
So, there will be a list of attribute names going all the way across.  For each attribute an X will be mark should the employee have that attribute. 
 
I hope this helps with what I am trying to accomplish.
 
Thanks.
Racquel Burke
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Aug 2011 at 3:25am

Your first post

 if {Attribute Type}='Commute Method' and {Attribute Name}='Bicycle' then 'X'
 
is correct and will apply the formula per row which should be per employee. However it may be incorrect info if your tables are joined in a way that does not support what you want
IP IP Logged
rburke72
Newbie
Newbie
Avatar

Joined: 03 Aug 2011
Online Status: Offline
Posts: 13
Quote rburke72 Replybullet Posted: 16 Aug 2011 at 3:33am
That is correct with that formula.  But, I need it to be by Employee and showing each attribute associated to that employee.  Currently it is listing the employee multiple times showing each attribute associated to that employee, one at each employee listing.  For example
 
CruzRachel01234     Home Laptop or Desktop      Home Fax      Printer
                                              X
CruzRachel01234                                                        X
 
CruzRachel01234                                                                             X
 
I would like it to show as:
 
CruzRachel01234                  X                                    X                    X
Racquel Burke
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Aug 2011 at 3:37am
so your supprting data is one row per attribute per employee?
IP IP Logged
rburke72
Newbie
Newbie
Avatar

Joined: 03 Aug 2011
Online Status: Offline
Posts: 13
Quote rburke72 Replybullet Posted: 16 Aug 2011 at 3:42am
That is correct. 
 
Employee                            Home Laptop or Desktop     Home Fax    Printer
CruzRachel01234                             X                                  X               X
DanielLuey12546                             X                                                   X
JacobsRyan35481                            X
Racquel Burke
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Aug 2011 at 3:57am
here is one way
group on employee
make your formuals as you had them
an insert a summary on each formula as the Maximum value of each formula field per employee e.g. Maximum(formula_1,table.employee)
suppress the details and group header
(or move the maximum value results to the group header)


Edited by DBlank - 16 Aug 2011 at 4:00am
IP IP Logged
Page  of 2 Next >>
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum