Modifying an existing Crystal report

Andrew54
Andrew54 used Ask the Experts™
on
I use a program called Accware which uses Advantage database to store its data.  Accware has predefined Crystal reports that pull our data from this database.  I'm trying to modify one of the predefined reports.  The report is a pick slip that is used pick orders from our warehouse.  I want the report to total up the number of items for a given order.  This will increase accuracy of the person picking the order by checking the total count of items they picked against this number. I have been successful at having it total but my problem is that the total also has none inventoried items in the total, like shipping, gift wrap.  I have not been able to figure out how to have it total only inventoried items.  There is a field in the database that indicates if it is inventoried or not but I do not know how to use it in modifying this report.  When I asked support which has limited support in modifying Crystal reports they say:

"You will need to add a variable in the report and increment it manually for each inventoried item using a crystal report script. It should be fairly simple."

Can anyone shed light on what that means?  I am new to crystal reports but not new to database work.  Is it possible to post the Crystal report to this form?  I would be interested any help within this form our outside this form.  It sounds like for an experience Crystal report writer this would be quick work.

Any thoughts and suggestions are much appreciated.

Andrew
andrew@celticmerchant.com
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Unfortunately I don't think you could post the report here.  Also because we sould need access to your database to use or modify the report it wouldn't do much good.

Are the inventoried items grouped in any way?

I would think you could set up a running total usng the inventoried item price and sum them that way.

You might look at

http://www.experts-exchange.com/Databases/Crystal_Reports/Q_20177111.html

http://www.experts-exchange.com/Databases/Crystal_Reports/Q_10607661.html

mlmcc

Author

Commented:
Thanks for your reply and those links.  I have modified my question so that it is clearer.  Two thing I left out is:

Total up the number of items for a given order (I left out "the number")

Second thing I left out:
There is a field in the database that indicates if it is inventoried or not but I do not know how to use it in modifying this report.

So going back to what support said: "You will need to add a variable in the report and increment it manually for each inventoried item"

How is that done in Crystal Reports?

Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
I have not had need to use a variable so if those links don't really help I can't add much more.

You could use the inventoried field in the running total.
I don't have CR here but one of the options in a running total is when to add the values.  Set it to be when the inventoried field is true.

The number of items could also be a running total.

mlmcc
Use a running total if you can, but an example of using a vaiable is as follows:

Shared NumberVar  MyTotal;

If <condition> then
MyTotal := MyTotal + {ValueField}

MyTotal;


Now, whenever you create a fromula with 'Shared NumberVar  MyTotal;' in it, you will have access to the MyTotal variable with data in it.

It is a good idea to create a formula that initially sets the variable to 0 - place it in the group header or something.

And then in the footer, simply put:
Shared NumberVar  MyTotal;
MyTotal;

To display the result, and the first formula I gave you goes into the detail section.

Author

Commented:
That's what I was looking for was syntax.  I understood the over all concept but did not understand were to start with the syntax.

What I finally did was to make the total pulled more accurate.  They were showing quantity pulled for items that had no have stock like service i.e. shipping and gift wrap.  So I made that numbered pulled more accurate before totaling.  Here is the formula I used.

If {items.QTY_STK} >0 then {@TmpOrdQty}-{@TmpShpQty}

This also makes quantity pulled more accurate when there are no stock for a stocked item.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial