[Emerald]

Brad Pritikin ( (no email) )
Wed, 3 Nov 1999 17:01:00 -0800

I am designing a web-based reporting system that draws information from our
SQL server database. I am having a hard time with one particular report that
I'm trying to generate. I'm trying to get an accurate picture of where my
revenue is coming from. I know my bottom line, but I want an accurate view
of how much revenue each of my services generates. Unfortunately, the
"Payments" table of the database seems to be lacking in information. It
provides a total amount, but is not broken down by service. What I have been
doing is looking at the "InvoiceItems" table and comparing it to "payments."
If a PaymentID exists for an Invoice Item, then I add the amount to the
total revenue that corresponds to the service indicated in the Invoice Item.
For some reason this does not produce accurate results. I do specify a date
range using the Date field in the payments table. I have tested my
application by limiting the date range to a period of 5 days when I know a
payment for $300 was made to a particular service. Then I look at the
results for that service, and it shows $0.

Here are my questions:

1. Does anyone know why this doesn't work? It does show some amounts, but
not others. I can't find a pattern.
2. Has anyone ever implemented a similar solution? I'm even willing to ditch
the web based report and use a Crystal Reports solution.

For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart