Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Pulling different info from 2 fields Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2012 at 7:09am
make a formula field to combine the ID and name into one string
//name
totext(table.id,0,"") + " " + table.name
 
 
insert a crosstab in the report header
for row use the Name fomrula
for column use CUSTOMDEFNAME field
for the sumamrized field use CUSTOMDATA field set to a maximum
 
play with the formatting until you get it the way you want it
IP IP Logged
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Posted: 19 Sep 2012 at 11:39am

I got an error when I tried that formula because the field the number is in  is already a string. I took the totext out of the statement but then I get an error saying a ";" is expected.

Thanks
KevV
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2012 at 11:43am

i gave you crystal syntax so make sure the crop dowm in the formual editor is set to "crystal syntax"

if you still get the error please copy and past the exact formula you are using
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 19 Sep 2012 at 12:24pm
From KevV comments, I think the formula should be:
table.id+ " " + table.name
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Sep 2012 at 3:37am
I assumed that table.id+ " " + table.name was what was being used when the totext was dropped form the formula but the ";" eror was still happening.
If that was not the case then Kevlray's post would clearly be the next step to try.
IP IP Logged
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Posted: 20 Sep 2012 at 4:37am
I did get it to work the only problem is that it shows all the fields in the CUSTOMDEFNAME column and there are a few I dont want to see. It also dosen't give me the ability to arrange them on the report. The other way is close I just need to figure out how to get the two lines to combine and show the ID number and SS number on the same line.
 
Thanks
KevV
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Sep 2012 at 5:44am

easy way

create one running total per type youwant to see
example
RT name=DOB
field to summarize=CUSTOMDATA
type = maximum
evaluate=use a formula
{VP_PERSONCUSTDATA.CUSTOMDEFNAME}="Birthday"
reset=on change of group (select customer group)
place in group footer (RTs do not work in headers)
 
repeat and change the formula for each type
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Sep 2012 at 5:45am

You can go the route your were going an create one fomrula field per type

if{VP_PERSONCUSTDATA.CUSTOMDEFNAME}="Birthday" then {VP_PERSONCUSTDATA.CUSTOMDATA}
 
Place it ont he detail row and make sure it works correctly
then insert a summary as a maximum of this formual field at the group level
repeat both steps per type
IP IP Logged
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Posted: 20 Sep 2012 at 7:36am
I tried your second suggestion and I ended up getting a lot of extra records. I did it the first way and it looks good. I have a few reords that are showing all of the information like address and phone number but all the information that comes from the {VP_PERSONCUSTDATA.CUSTOMDEFNAME} field is blank. I am figuring it must be something in a record that is messing it up because if one of the numbers is missing on the report all of them are. I just have not figured it out yet. I checked the records in the tables and the information is there and formatted the same it just isn't pulling it.
 
Thanks
KevV
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Sep 2012 at 7:40am
i neglected to state that in both instances you should suppress the detail section and only show the group header or footer.
 
If you have more than one table check your joins to try and see if that explains the missing data
Also review any select statement


Edited by DBlank - 20 Sep 2012 at 7:41am
IP IP Logged
<< Prev Page  of 3 Next >>
Post Reply Post New Topic
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



This page was generated in 0.048 seconds.