I've looked through forums and can't find a solution to the exact problem I am having so here goes.
We have a database which holds asset data for each PC we own. The fields I'm using are Business(We are split into 5 businesses), Site(We have over 20 sites) and Operating System of the PC's.
I have 3 Groups
Group 1 - Business
Group 2 - Site
Group 3 - Operating System
I have 1 Summary which summarises the number of each OS per site
So far it works.
I have 6 formulas for the various operating systems
BusinessWindows95
BusinessWindows98
BusinessWindowsME
BusinessWindowsNT
BusinessWindows2000
BusinessWindowsXP
And they all look like this(Except for the variable name which changes to reflect the OS I'm counting)
WhilePrintingRecords;
Global NumberVar BusinessWindows2000;
IF {Hdw_DOS.Host_Operating_System} = 'Microsoft Windows 2000' THEN BusinessWindows2000 := BusinessWindows2000 + 1 ELSE BusinessWindows2000;
Each variable also has a corresponding reset formula which looks like this
WhilePrintingRecords;
Global NumberVar BusinessWindows2000 := 0;
I have placed the reset formulas in the Business group header
I have placed the BusinessWindows2000 etc. formulas in the details section.
And I display the results in the Business Footer.
So what I have so far is a Summary which shows OS's by Site - Works Fine.
I then have the variables which shows the OS's by Business - I have pasted some live data below so you can see the problem.
Rotterdam
Microsoft Windows XP 2 <- My Summary
Windows 95 1
Windows 98 49
Windows NT 3
Sint Niklaas
Windows 98 8 My Formulas
Windows NT 1 !
V
Total number of Windows 95 PC's for the Business is 1.00
Total number of Windows NT PC's for the business is 5.00
Total number of Windows 98 PC's for the Business is 57.00
Total number of Windows 2000 PC's for the business is 0.00
Total number of Windows ME PC's for the business is 0.00
Total number of Windows XP PC's for the business is 2.00
As you can see Windows NT is actually 1 more than it should be. All the rest are correct. What's happening is that because the last OS Group is Windows NT it counts it twice. If I look further down my data it's not always Windows NT, it could be Windows 98 but it's always the last one listed in the group.
Everything else works i.e. variable resets it's just this one thing and it's driving me nuts.
Can anybody help. I apologise for the long post but I thought more detail rather than less would be better.
Thanks in advance
Michael
We have a database which holds asset data for each PC we own. The fields I'm using are Business(We are split into 5 businesses), Site(We have over 20 sites) and Operating System of the PC's.
I have 3 Groups
Group 1 - Business
Group 2 - Site
Group 3 - Operating System
I have 1 Summary which summarises the number of each OS per site
So far it works.
I have 6 formulas for the various operating systems
BusinessWindows95
BusinessWindows98
BusinessWindowsME
BusinessWindowsNT
BusinessWindows2000
BusinessWindowsXP
And they all look like this(Except for the variable name which changes to reflect the OS I'm counting)
WhilePrintingRecords;
Global NumberVar BusinessWindows2000;
IF {Hdw_DOS.Host_Operating_System} = 'Microsoft Windows 2000' THEN BusinessWindows2000 := BusinessWindows2000 + 1 ELSE BusinessWindows2000;
Each variable also has a corresponding reset formula which looks like this
WhilePrintingRecords;
Global NumberVar BusinessWindows2000 := 0;
I have placed the reset formulas in the Business group header
I have placed the BusinessWindows2000 etc. formulas in the details section.
And I display the results in the Business Footer.
So what I have so far is a Summary which shows OS's by Site - Works Fine.
I then have the variables which shows the OS's by Business - I have pasted some live data below so you can see the problem.
Rotterdam
Microsoft Windows XP 2 <- My Summary
Windows 95 1
Windows 98 49
Windows NT 3
Sint Niklaas
Windows 98 8 My Formulas
Windows NT 1 !
V
Total number of Windows 95 PC's for the Business is 1.00
Total number of Windows NT PC's for the business is 5.00
Total number of Windows 98 PC's for the Business is 57.00
Total number of Windows 2000 PC's for the business is 0.00
Total number of Windows ME PC's for the business is 0.00
Total number of Windows XP PC's for the business is 2.00
As you can see Windows NT is actually 1 more than it should be. All the rest are correct. What's happening is that because the last OS Group is Windows NT it counts it twice. If I look further down my data it's not always Windows NT, it could be Windows 98 but it's always the last one listed in the group.
Everything else works i.e. variable resets it's just this one thing and it's driving me nuts.
Can anybody help. I apologise for the long post but I thought more detail rather than less would be better.
Thanks in advance
Michael