473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

grouping in reports

i got problem with creating reports and would appreciate if someone
would point me out to some good tutorials on the topic, or simply
explain where should i start and what should i do.. i'm quite in hurry
and having checked the net i'm still stuck so you guys are my only hope
;) lets say i'm having on only one table with four columns:

date sid payment agent
11/02/2003 1234 500 abc
... ... ... ..

and so on..

my report has to look sth. like that:

sid january february march april ......
1234 800 300 700 1000
so every person with "sid" i paying certain amount and those payments
are stored in database, every one o them with unique date. on report i
need to display sid number, and how much that particular person with
sid had paid in each month (dosent matter what year). i'm sorry if
explanation is not very clear but i did the best i could, if any more
information will be necessary please let me know and i'll try to
clarify my problem. thank you very much for any help as such would be
MUCH appreciated :)

Nov 13 '05 #1
2 1180
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use a cross-tab query as the report's data source. Create the report
based on the query (IOW, create the query first).

Query:

TRANSFORM Sum(payment) As theValue;
SELECT sid, Sum(Payment) As Total
FROM table_name
GROUP BY sid
PIVOT Format([date], "mmm") IN ("Jan", "Feb", "Mar", "Apr", "May",
"Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")

I used the IN () subclause so you'd always have the month names - just
in case there aren't any payments for one, or more, months.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQcE/VoechKqOuFEgEQIiYQCdHi6uyrIPJhaFsvF4S3E+9QSOTtcAoL E+
5aR1GOcKvpDNHmBq7y1x5QBq
=A2rU
-----END PGP SIGNATURE-----
sp********@hotmail.com wrote:
i got problem with creating reports and would appreciate if someone
would point me out to some good tutorials on the topic, or simply
explain where should i start and what should i do.. i'm quite in hurry
and having checked the net i'm still stuck so you guys are my only hope
;) lets say i'm having on only one table with four columns:

date sid payment agent
11/02/2003 1234 500 abc
.. ... ... ..

and so on..

my report has to look sth. like that:

sid january february march april ......
1234 800 300 700 1000
so every person with "sid" i paying certain amount and those payments
are stored in database, every one o them with unique date. on report i
need to display sid number, and how much that particular person with
sid had paid in each month (dosent matter what year). i'm sorry if
explanation is not very clear but i did the best i could, if any more
information will be necessary please let me know and i'll try to
clarify my problem. thank you very much for any help as such would be
MUCH appreciated :)

Nov 13 '05 #2
thank you very much :) query works perfectly in "queries" but somehow
couldnt get it working in "reports" cause getting error saying that
query contains syntax error or function is not available in Access. it
also says that if syntax is ok i should go into registry, do some
changes and then reinstall acces, but you reckon it might be the case?
i had office xp installed before, than i uninstalled it and without
restarting (very clever of me ;) i installed office 2000 so maybe
registry got messed up and thats the reason why it gives me problems
even with query you provided. anyway once again thank you very much for
your help, i really appreciate it

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: thefirstwml | last post by:
I am using Visual Studio.NET 2002 Professional and am attempting to create a report on Crystal Reports for .NET. I know that Crystal Reports can group on anything, and when I add multiple...
1
by: amber | last post by:
Hello, I have a report in VB.NET/Crystal Reports. I have a criteria form that users select between 2 different types of grouping (group by category or group by year). Can I programmatically...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
1
by: Megan | last post by:
quick summary: i'm having problems trying to group fields in a report in order to calculate percentages. to calculate percentages, i'm comparing the results from my grouped fields to the totals....
3
by: Bob | last post by:
I wish to group data on a report by week, month and year. Crystal reports has this ability as a built in function. Is there a quick way to do this in Access97/2000 VBA reports ? Thank you in...
4
by: ian_gendreau | last post by:
I am writing a database for sales forecasting. All of my entries are in a table, each entry has a Projecting Booking Date. I need to write a report with 4 groupings: 0-30 Days Out 31-60 Days...
0
by: diego | last post by:
hi all, i have encountered a problem when using crystal reports (bundled with vs2003). i'm using .ttx file to build the report in the designer. then in my code i set the datasource to a...
1
by: gozzer101 | last post by:
Hello! I have a small problem with grouping data on reports. The situation is that I have an PersonIDnumber, PersonName, NoPurchases and ProductNumbersAllocated. The person ID is just any number,...
0
by: slawek86 | last post by:
Hi, I use Crystal Reports for Visual Studio 2005 (v 10.2) and hierarchical grouping. I want to do summary of child rows in parent's footer, but it set itself above child rows. How can I do, to child...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.