Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Increment counter.

Status
Not open for further replies.

geestrong

Programmer
Jun 24, 2005
58
US
Hello,

I am using CR XI and Oracle 9i

I have been trying to get this counter correct. There are jobs that are approved or on hold. The analyst wants to count jobs that where on hold the previous month(i.e. Decement or prior) but may have been approve(January). If the report is ran for the month of January, he wants to count it has a prior job and an approved job. My question is how can I get it to count the holds

Approved
#1234 1-11-2006
Hold
#1234 12-14-2005
#1234 12-03-2005
I currently have the report grouped by decision(Approved or Hold). I need to flag the holds so that I can count the first instance of the hold.

Thanks,
Greg
 
sounds like a change to the table to accomodate a flag; I don't think you can see back in time with crystal - am I correct in assuming that once something is no longer held, it only shows as approved?

alternately, you can run this report for january to see what's held and export to excel. when you run the report at the end of feb, you can pull the excel data in to find approved items which were previously held.

 
Thanks pelajhia,

That is what I have been trying to tell the analyst that how the report is written that it would be diffcult to get that information. I have exported to excel to do the analyst of the data.

geestrong
 
It should be possible to do this within CR, but I couldn't follow your first post. If you reread it, you will see that it needs some editing for clarity. If you want to try again, I'll take a stab at this.

It wasn't clear to me whether the month of the hold was important or whether it was just that you wanted to count one for any previous hold. Also wasn't clear when you referenced: "he wants to count it has a prior job and an approved job." What exactly are you counting--only instances where this is an approved job AND a hold, or where there is just a hold, or...

-LB
 
lbass

I meant 'he wants to count it "as" a prior job and an approved job.'

Here is the criteria that I am counting. (jan-01-2006 to jan-31-2006)
Pending in - Jobs that were put on hold prior to the selected reporting period before Jan-01-2006

New - New Jobs that where started in the period.

Appoved - Jobs that were aproved for the period.

Hold - Jobs that were put on hold for the period.

Pending out - Jobs that are on hold going out of the time period.

The issue is that if the job was on hold let's say 12-20-2005 and then approved in the January time period. I am sorting the report by the decision(ie. Approved or Hold) the logic of the report reads the job as approved, but not pending in from December. I hope that this clears up

Thanks,
Greg
 
If you didn't group on decision, but instead grouped on job# (your first sample column), you could test for your various conditions using conditional formulas, such as:

//{@pendingin}:
if {table.date} < Minimum({?daterange}) and
{table.decision} = "Hold" then 1

Then create a second formula for counting:

//{@cntpendingin} to be placed in the jobno group header or footer:
whileprintingrecords;
numbervar pendin;
if sum({@pendingin},{table.jobno}) > 0 then
pendin := pendin + 1;

Then in the report footer use the following to display the result:
whileprintingrecords;
numbervar pendin;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top