Solved

Quick report

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

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

11 Experts available now in Live!

Get 1:1 Help Now