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!

Calculating a function value into another function

Status
Not open for further replies.

airwolf3000

Technical User
Mar 6, 2003
3
US
Hello,

I have a database that is genereated everyday at 2PM. This database includes page counts of all printers in our network. I have the page count for the end of the month, now I need to get the page count difference from the begining of the month. I can't find the right function to do this. Please help.
 
Clearly, you have the current page counts in the database, but it's not clear where you have the page counts from the start of the month.

If you have them in the database, I don't see the problem -- if you don't, you need to create a table to hold these values (or manually load them into static formulas or an array variable).

hth,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Novice at best here. I know that the data is in the database. If I view he whole database by IP don't use any other exclusing that I can see the the value. I need to know what function to use....
 
Describe what tables and columns you have and how you are joining them.

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Several approaches are possible:
If there is only a value for end of each month, use a selection that gets you the first of this month and the previous month.
Day({printers.date})=1

You will need to group your data by Printer
You can write a formula to interrogate the previous records fields

if {printers.name}=Previous({Printers.Name}) then
{Printers.pages} - Previous({Printer.Counter}) else 0

A second approach would be to use a variable to store the page counter on the first of the month, and use that variable in the group footer with the current page counter. Editor and Publisher of Crystal Clear
 
I have three tables (A,B,C). Table "A" contains these columns=IP,QUEUE,MODEL. Table "B" containt=polldate,recordid,macadress,and pagecount.
Table "C" contains=

MACAddress ipAddress ipSort subnetAddr manufacturer sysDescr detailDescr sysObjectID sysName DNSName serialNumber location hrDeviceStatus hrPrinterStatus hrPrinterDetectedErrorState devStatusStringID icon assetTag pageCount discoveryDate lastCommunication lastCommAttempt lastAlertComm firmwareLevel pictureFile subnetSort getCommunityString cust1 cust2 cust3 cust4 cust5 validIP lastKnownIP colorCapable.

Table A is linked to Table C by IP and C is linked to B by MACAdress
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top