Solved

QuickReports Question

Posted on 2000-02-16
2
146 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 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

16 Experts available now in Live!

Get 1:1 Help Now