Solved

Quick report

Posted on 2002-03-12
2
150 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
2 Comments
 
LVL 3

Accepted Solution

by:
marcoszorrilla earned 100 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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