Solved

QuickReports Question

Posted on 2000-02-16
2
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
simonet earned 200 total points
ID: 2526616
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
ID: 2526650
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Using idhttp to login to instagram 2 118
Run video youtube webbrowse 10 73
How to renew a Delphi rad-studio licence? 5 75
LAN or WAN ? 11 105
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…

735 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