Solved

Quick report

Posted on 2002-03-12
2
155 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 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

617 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