Solved

QuickReports Question

Posted on 2000-02-16
2
145 Views
Last Modified: 2013-11-22
I have a table with a similar structure to this:

Index - AutoInc field
UserId - integer
Amount - integer
Date
Time

This is an audit type report where each UserID will have more than one record. I need to produce a report showing totals per UserID with the UserID with the highest total appearing frst in the report and then decsending to the dude with the lowest.

Is this possible WITHOUT having to pre-process the data ?
0
Comment
Question by:RLancaster
2 Comments
 
LVL 15

Accepted Solution

by:
simonet earned 200 total points
Comment Utility
Yes, just build a query (SQL) that already arranges the data the way you want. Then use that query as the datasource for the QuickReport.

On the query below, I assumed that you want to show the totals, that is, the sum of all the amounts for a specific UserID.

SELECT USERID, SUM(AMOUNT) AS TOTAL FROM MYTABLE
GROUP BY USERID
ORDER BY TOTAL DESC

That has been tested against a Paradox table with a strutucture similar to yours and works.

Now just add a TQuery to the form, w/ the SQL above, link it to the TQuickRep component and QRBands, QRDBText, etc, and you're all set.

Yours,

Alex
0
 
LVL 1

Author Comment

by:RLancaster
Comment Utility
thanks dude !!!
i just managed to get it working all on my own but because of your prompt and accurate response I am giving you the points any way :) ... and an excellent rating
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now