Tuesday, March 20, 2012

A bit of Crystal Reports 8.5 help

Hi all, first post!

I'm working for a company that runs a business management system which uses an old version of Crystal Reports (version 8.5!) for reporting on pretty much anything the system can output.

I don't know how much it differs from the newer versions, but i'm new to the system (two days experience and counting) and I'm after a couple of pointers.

1) I am trying to output stock levels for products which are both in and out of stock. Now, due to some sillyness when the BMS was designed, if a product is out of stock, it has doesn't have a row in the bins_lots table (where stock levels are kept), rather than 0.
Therefore, if I do a report which outputs the stock levels of a product (part, items that are out of stock are missing from the report, rather than having a 0 next to their name.
Is it possible to tell Crystal that if a product exists but doesn't have an entry in bins_lots (where stock amounts are kept) then it should be 0?
I'd find this easy if it were a normal If Statement, but Crystal has to be difficult with its wierd way of doing conditionals.

2) Secondly, again due to the BMS design, if a product is on order, the amount in the order is logged in multiple purchase orders. Producing a query will give me duplicate entries for products. I know I can 'hide duplicates', but it results in a messy report.
Can I make Crystal add all of these numbers together (i.e. where product = 'AD-03', add quantity of due products together) and output the final result without using the subtotal/group functions.

All help appreciated :)1) Left join to the bins_lots table. When the amount column is null then there's no stock.
e.g. a formula to return the stock level would be (assuming your column is called amount)
if isnull({bins_lots.amount}) then 0 else {bins_lots.amount}

2) Well, I don't really know how you're going to add numbers without grouping / total functions. Why is grouping an issue? Why can't you group on the product, hide the detail, and print in the product group footer to get 1 record per product? Nothing messy there.

No comments:

Post a Comment