Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    1

    Question Unanswered: Crystal Reports - Running Totals

    Hello,

    I'm using a product called SCEO which works with Crystal Reports. I am working with an Invoice. Invoices are identified by job numbers. Job numbers are defined by OrderNum and WONum. If the job number is 277-1, then the OrerNum = 277 and the WONum = 1. Each job number can have multiple WONum, ie, the second visit for OrderNum 277 would be 2 and so on.

    I'm using running totals for my quantity and price. We bill for products and services. The products are working fine, but the services need to change slightly. I need to print services separately if they occur in different visits "on the same day". Currently if the exact service occurs more than once on the same day but different visits (WONum), those services are combined. If the exact service occurs more than once on different days, the services print separately, and this is good.

    I have read all I have found on Crystal Syntax and I cannot get any formulas to work. I'm not sure if I should be using a variable in my running total or if I should be using Group formula functions since I think I want a calculation on the second pass. Currently I'm working with the reset, calculate, and define structure I read about when using a variable:

    //Reset variable Qty to zero
    WhilePrintingRecords;
    Gobal numbervar Qty :=0

    //Calculate running total for Qty when OrderNum and WONum are the same
    If OrderNum & WONum = OrderNum & WONum then Qty :=(I don't know what to put here because I can't get to my running total for quantity)

    WhilePrintingRecords
    Global numbervar Qty;
    Qty

    Please Help

  2. #2
    Join Date
    Oct 2005
    Posts
    178

    Wink

    Quote Originally Posted by Lenise
    Hello,

    I'm using a product called SCEO which works with Crystal Reports. I am working with an Invoice. Invoices are identified by job numbers. Job numbers are defined by OrderNum and WONum. If the job number is 277-1, then the OrerNum = 277 and the WONum = 1. Each job number can have multiple WONum, ie, the second visit for OrderNum 277 would be 2 and so on.

    I'm using running totals for my quantity and price. We bill for products and services. The products are working fine, but the services need to change slightly. I need to print services separately if they occur in different visits "on the same day". Currently if the exact service occurs more than once on the same day but different visits (WONum), those services are combined. If the exact service occurs more than once on different days, the services print separately, and this is good.

    I have read all I have found on Crystal Syntax and I cannot get any formulas to work. I'm not sure if I should be using a variable in my running total or if I should be using Group formula functions since I think I want a calculation on the second pass. Currently I'm working with the reset, calculate, and define structure I read about when using a variable:

    //Reset variable Qty to zero
    WhilePrintingRecords;
    Gobal numbervar Qty :=0

    //Calculate running total for Qty when OrderNum and WONum are the same
    If OrderNum & WONum = OrderNum & WONum then Qty :=(I don't know what to put here because I can't get to my running total for quantity)

    WhilePrintingRecords
    Global numbervar Qty;
    Qty

    Please Help
    You can create a formula in crystal to segregate the OrderNumber from the jobNumber by extracting the first 3 characters of the data, for example "Left({tblInvoice.jobnumber},3)", name the formula say "OrderNumber", and create a group using that formula. Once you do that then create your summaries or create your running total. It depends how big your database is, perfomance is always affected by using formula.
    Normally, you would want to create separate tables for OrderNum and WONUM and link them with common field name. It would be easier in the long run to manipulate your data records.
    Good luck
    Last edited by fredservillon; 11-03-05 at 10:54.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •