Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Quick report

Posted on 2002-03-12
2
Medium Priority
?
156 Views
Last Modified: 2010-04-05
I want to create a report using a query whose SQL property will be specified at runtime. What should i specify in the datafield properties of the qrdbtext fields at design time. Or should I assign the properties at runtime, and if so, how do I link the data fields and the query fields?
0
Comment
Question by:gi7mhl
[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 3

Accepted Solution

by:
marcoszorrilla earned 300 total points
ID: 6856291
If you know the name of the fields that will be used but not the condition Where.

You create a persistent fields clicking right button over the Tquery componenent and then Add All fields, now you connect the QuickReport with the query and all the fields are availables.(The Query will be Active = True) for this purpose.

The Tquery component must have text in the strings property for example:
Select MyField1, Myfield2...
From MyTable;


In order to have the fields for your report.

Then this string will be override after your Where condition.

something like this:
Tquery1.Sql.Clear;
Tquery1.Sql.Add('Select x,x,x,x where xxxx from xxxx');
Tqyery1.Open;

cheers.
0
 

Author Comment

by:gi7mhl
ID: 6864562
Hi marcoszorrilla
In my query's sql statement i want to include the 'sum' function, together with other fields, The sum is from a seperate table from the table with the other fields. But I am getting the error "You tried to execute a query that does not include the expression 'field name' as part of an aggregate function" where field name is one of the fields, when i try to add the fields in the query's fields editor. Please help
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

704 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