Print Page | Close Window

After group by date, the value is differe

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12247
Printed Date: 30 March 2026 at 9:50pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: After group by date, the value is differe
Posted By: ngaisteve1
Subject: After group by date, the value is differe
Date Posted: 20 October 2004 at 5:10am
Hi! I have a complicated problem here. So, I think it is better if you can login to take a look of my problem. User ID and password is tester

http://portfolio.findingsteve.net/production_system/member_login.asp - http://portfolio.findingsteve.net/production_system/member_l ogin.asp

There are 2 sample sales report inside. The focus is DK No 0826 which is in page no 7 in sales report 2 and date 22-05-2004 in sales report 1.

How come after group together in one date, the value change?

My code is in

http://portfolio.findingsteve.net/production_system/sample_sales_report_code.zip - http://portfolio.findingsteve.net/production_system/sample_s ales_report_code.zip

I have put necessary code there. I zip it because I don't how to display my length code. Thanks.



Replies:
Posted By: michael
Date Posted: 20 October 2004 at 10:00am
Did not take a look at your code but when you do a group by date it is very likely that other values change, this is by design generally and is up to you to say how you want other fields to be displayed, meaning what aggregate function they are applied to like AVG or SUM. Unfortunately your description is not very descriptive as I could not find the dk826 in report 1 (maybe I am just blind) and do not know what value you are talking about as there are a bunch.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: ngaisteve1
Date Posted: 21 October 2004 at 12:39am

First of all, thanks because that really takes up time. Actually, you can't see dk no 0826 because it is group by date. When you go to sales report 2, you will be able to see that there are 5 dk no under the same date, 22-05-2004. Since sales report 1 is group by date, we will be able to see only one of the dk no.

Actually the right amount is 2716 and not 3122. I have deep calculation inside but the difference is 3122 is the gross while 2712 is the net (after minus the discount).




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net