Solved

Using the QuickReport TQRExpr Component?

Posted on 2004-08-23
6
1,044 Views
Last Modified: 2013-11-22
I am trying to use the QuickReport TQRExpr Component, to sum a Calculated field column in my dataset on my report.

I have a "Qty" field and a "Price" field, which is multiplied and stored in a calculated field "TotalPrice", using the table's OnCalcField event.

I now want to sum all those TotalPrice's into a GrandTotal using the TQRExpr.

Anybody know what I need. I tried using the expression

  SUM(TotalPrice)

however, it seems it is only summing the first record .

Shane
0
Comment
Question by:shaneholmes
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 11878208
all you need is a groupband and placed the TQRExpr in the groupfooter
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 11878391
btw. welcome back, shane
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 11878406
SUM(DataSet.TotalPrice)
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 12

Accepted Solution

by:
esoftbg earned 125 total points
ID: 11878412
or
SUM(DataSet.Qty*DataSet.Price)
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 11880645
Kretzschmar -  I do not know how to use the groupband and group footer.

I have the following bands in order:
 PageHeader (Company Logo & Address)
 Title (Report Title)
 ColumnHeader (Field Descriptions)
 Detail (Master Table)
 SunDetail (Child Table)
 Summary   (Company Shipping Information)
 PageFooter (Page Numbering)

At the top of the Summary band is where I currently have the TQRExpr component.

ESOFTBG - I have tried your suggestions , SUM(Options.TotalPrice) AND SUM(Options.QTY * Options.Price)  , and I get nothing in return.

Shane
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 11887474
Oh well.... because of a Time Constraint, I used a Query

 Select SUM(Qty * Price) as TotalPrice from Options

Which works

Im giving ESOFTBG the points beause his suggestion action pointed me towards the SUM(Options.QTY * Options.Price)  which ultimately led me to my Query indirectly.


Shane
0

Featured Post

Highfive Gives IT Their Time Back

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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 this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

15 Experts available now in Live!

Get 1:1 Help Now