Solved

Using the QuickReport TQRExpr Component?

Posted on 2004-08-23
6
1,080 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
[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
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb download file link ? 1 184
Delphi Mdi application Child forms get behind control 7 359
Microsoft Access 97 and Delphi XE2 9 85
QuickReport, Delphi, Shape 12 47
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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