0
votes

My question is similar to the link. Crystal Reports - Count Formula The answer only works when the certain status type is giving to you. Now I am wondering that what if the status type is not giving to you (You dont know what's inside this filed first), and the type of the status can be varied based what's in {statustype} field. And I want to be able to list all distinct status type and calculate it's total appearance in the report.

2
I found difficult to read the entire post in the link. What is your exact issue explain in simple words will try to help you.Siva

2 Answers

0
votes

Well its easy if you see it my way, I read that thread which you referenced.

Make different Formulas for all the status types that you may know of, I am pretty sure that they will be maximum 4 or 5. Make formula like

localvar int x;
if(statustype = 'Accepted')
(
    x = x++;
)
x;

Or you can put all the formulas to one, using the same if clause but changing the display string, make sure that its a summary field or is placed at the report footer.

localvar int accept;
 localvar int reject;
 localvar int Pending;
    if(statustype = 'Accepted')
    (
       accept= accept++;
    )
   else if
   (
      reject = reject ++;
   )
   else if
   (
      Pending = Pending++;
   );
   "Accepted "+ accept + " Rejected " + reject + "  Pending "+ Pending;

Hope this helps,

0
votes

I figured out that a easy way that we can create a placeholder in main report for subreport. And we can make the manipulation in the subreport