Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: formula which exclude one of the condition of main Post Reply Post New Topic
Author Message
radheshyam
Newbie
Newbie


Joined: 01 Oct 2011
Online Status: Offline
Posts: 7
Quote radheshyam Replybullet Topic: formula which exclude one of the condition of main
     Posted: 30 Nov 2011 at 11:28am
I have joined some tables with orderid as the common element in them and I filtered my report based on the condition of cancellation of orderstatus in 'order' table.

There is another table called 'persons' with personid and orderid. I am in need of the total count of personids.

If I join persons table with order table. Then I am getting the count of personids when orderstatus has got cancelled.

I do not want the count of personids when orderstatus got cancelled, but I want the count of personids irrespective of orderstatus.

Entire report is based on the cancellation status.
But i want one particular formula which should give the total count of personids without considering the orderstatus of cancelling.

can anyone help with it.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 30 Nov 2011 at 12:18pm
you could create a subreport for count of repsonids.
IP IP Logged
radheshyam
Newbie
Newbie


Joined: 01 Oct 2011
Online Status: Offline
Posts: 7
Quote radheshyam Replybullet Posted: 30 Nov 2011 at 8:45pm
Is it possible to use that obtained value of subreport in the calculation of other formula in main report?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Dec 2011 at 2:26am
yes, use shared variables and CR will allow access to values in the subreport.
 
declare them like:
so in the subreport it would look like this
shared numbervar aVar;
// do stuff
 
 
in the main it would look like:
shared numbervar aVar;
//do other stuff
 
CR did make that part pretty simple.  Once they are referenced like this, they are available to any formula.
 
HTH
 
IP IP Logged
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