Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Field contains 3 rows of data, need only the third Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
LearningAsIGo
Newbie
Newbie


Joined: 04 Apr 2011
Online Status: Offline
Posts: 15
Quote LearningAsIGo Replybullet Posted: 04 Apr 2011 at 10:44am
Is there a way to combine the fields into one row with a separator and then query against the separator?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Apr 2011 at 10:48am

for testing make the formula do this and tell me what number comes up on each row

instrrev({B3APO_ATTRIBUTE.B1_ATTRIBUTE_VALUE},CHR(13))

IP IP Logged
LearningAsIGo
Newbie
Newbie


Joined: 04 Apr 2011
Online Status: Offline
Posts: 15
Quote LearningAsIGo Replybullet Posted: 04 Apr 2011 at 10:51am
0.00 this is 200 character string field.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Apr 2011 at 10:55am
Ok. You have no carriage returns which was what I was trying to key off of.
You need to find soeething that is consistently a differentiator beween where your Municipal Name ENds and your subdivision Name begins.
From your sample the only that comes to mind is that the first lowercase character (from right to left) is always the last character of the Municipality Name.
Is that an accurate statement?
IP IP Logged
LearningAsIGo
Newbie
Newbie


Joined: 04 Apr 2011
Online Status: Offline
Posts: 15
Quote LearningAsIGo Replybullet Posted: 04 Apr 2011 at 10:56am
You are correct, that is a constant!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Apr 2011 at 11:11am
hmmm...
not sure how to do this.
I think you will need to loop through each character from right to left to see if it is lowercase until you get the position of the first lc character at which point you can use it to get text value you want.
Anyone else have any ideas or thoughts on how to right that formula?
IP IP Logged
LearningAsIGo
Newbie
Newbie


Joined: 04 Apr 2011
Online Status: Offline
Posts: 15
Quote LearningAsIGo Replybullet Posted: 05 Apr 2011 at 4:31am
Ok, figured it out, here is the solution.

The B3APO_ATTRIBUTE table, “subdivision” field is a custom field. This custom field, each field has its own row. Custom fields are in different tables depending what category of data it belongs to. B3APO_ATTRIBUTE holds custom fields related to Addresses, Parcels or Owners (APO).

My query retrieves 3 rows of data from B3APO_ATTRIBUTE, that’s because there are 3 different custom fields, one of which is the subdivision. To only retrieve the specific row in the table that relates to the subdivision field, I had to add a selection criteria against the B1_ATTRIBUTE_NAME column. For example, if the attribute name of the “Subdivision” field is SUBDIVISION, then in my Crystal Report selection formula, I have {B3APO_ATTRIBUTE}=”SUBDIVISION”.

Thanks for your time on this, sorry if I was not using the correct wording.
IP IP Logged
<< Prev  Page  of 2
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