Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Array ? Post Reply Post New Topic
Author Message
tampitt09
Newbie
Newbie


Joined: 23 May 2013
Location: United States
Online Status: Offline
Posts: 8
Quote tampitt09 Replybullet Topic: Array ?
    Posted: 15 Oct 2015 at 10:17am
Hello

I'm not sure on how to solve this issue, hope that somebody has seen this before, example:

CustomerName:     AmountSpent:

James               10.00
JamesAB             10.00
Mary                 9.00
MaryAB               9.10
BakerAB             15.00

I like to display on the report only if there is a pair of similar names and amount spent identical, in this case the pair James and JamesAB spent 10.00 each should be the only pair will be displayed on the report...not sure if this is possible , I'm using CR 11..thanks in advance

Pitt
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 16 Oct 2015 at 2:14am
Hi,

Create a formula as below fromula in report;
Formula 1:
If Right({CustomerName} ,2) <> "AB" Then {CustomerName} + "AB" Else {CustomerName}

Formula 2:
If {@Formula 1} = Next({@Formula 1}) And {AmountSpent} =Next({ AmountSpent}) Then
     True
Else
     Flase


Right click on Details section -> Suppress, write the below logic:
{@Formula 2} = False or IsNull({@Formula 2})

--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
tampitt09
Newbie
Newbie


Joined: 23 May 2013
Location: United States
Online Status: Offline
Posts: 8
Quote tampitt09 Replybullet Posted: 16 Oct 2015 at 9:37am
Thanks Praveen

It works! although I still don't understand the "AB" adding to all of customername, but that's ok, I shoudl be able to figure out that..thanks

Pitt
IP IP Logged
tampitt09
Newbie
Newbie


Joined: 23 May 2013
Location: United States
Online Status: Offline
Posts: 8
Quote tampitt09 Replybullet Posted: 16 Oct 2015 at 9:55am
ah I got it, you need to add that AB so you can later compare them, not sure about last record
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 18 Oct 2015 at 8:58pm
Hi,

Glad to know that formula has worked!!

--Praveen G :)
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
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.031 seconds.