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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Percentage question 1

Status
Not open for further replies.

luv2bike2nv

IS-IT--Management
Jun 28, 2007
90
US

Crystal Reports 8.5

The report is a Vendor Performance Report, in the report I have the Vendor number, description of what was ordered, when the vendor promised the item to be delivered, when it was actually delivered, if it was delivered on time or before the delivery date (formula) how many days early/on time was it. If it was late, how many days late (formula). I also created formulas for true or false – if the product was delivered on time or not. I was hoping to use the true/false formulas to get a percentage of on time delivery and late delivery, however I can not figure out how to do that. Is there another way to get a percentage for on time delivery and late delivery?


See attached MS Doc for a sample of what the report looks like (I hope the doc is there for you to see)

As you can see the percentage is not correct for the On-time column. I know I don’t have the formula correct, any help would be greatly appreciated! I also want to surpress the 0 in the On-time and Late delivery columns. I don’t want to add up the days late or on time. And if it on-time/early I do not want a 0 in the False column for that item.

Once I have the report correct with the Percentage I will hide the true and false fields.

Thanks in advance for any assistance here.

Robin
 
//{@Ontime}:
if {table.promisedduedate} >= {table.recddate} then 1

//{@perctontime}:
sum({@ontime},{table.orderno})%count({table.orderno},{table.orderno})

To suppress the on-time values, justs use a section suppression formula like this:

{table.promisedduedate} >= {table.recddate}

However, I wonder whether you mean to evaluate the on-time status of each "delivery line" --you don't show separate IDs per line, and I don't know whether you would need to take into account qty ordered vs qty delivered. I also assumed that the recddate was the delivery date.

-LB
 
Thank You LB.

I will follow your suggestions and will get back to you if I have any other questions.

The recddate is the delivery date, and what the user is looking for is a percentage over a period of time for ontime and late delivery. He wants to see for each line item how many days ontime/early or late on delivery.


thanks again :)

Robin
 
LB,

I am having some difficutly with the last part (percentage).
I am not very good at figuring out the percentage stuff.
what i am thinking I need to do is count each line for each "group" in the on time column, add up all of the "1" values and get a percentage out of that. however i am not sure how to go about doing this.
ie... say one group has 10 lines and out of 10 lines there are 6 "1" so the percentage of on time is 60%. another group has 20 lines and there are 15 "1" so the percentage of on time is 75%.

i need to do this for the late delivery column as well.

I tried to create the @perctontime formula using the correct fields (or what i believe to be the correct fields) however i was getting the error message:
"The summary /running total field could not be created".

Any help would be greatly appreciated!
Thanks,
Robin
 
You should have been able to use my formulas as presented except that you need to substitute your actual field names, and you need to have inserted a group on order number. Please post the actual formulas you used.

-LB
 
LB...

thank you it did work this time. I did not insert a group for order number. that was my mistake. Thanks again. I really appreciate it!

Robin :) :)


 
i have one more question. probably a simple solution but i guess i have been working on this report for a while that i just don't see it.

For some reason the last page of the report does not have any detail lines it has the Page Header, along with page and report footer. What do i need to do to not have that page come up.

thanks in advance.

Robin
 
Suppress the report footer if it is unused.

-LB
 
I finally found what was causing this problem... in the Group footer section expert the new page after was checked off. thanks again LB for your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top