Solved

Quick report - 2 SQL queries

Posted on 1998-05-01
7
638 Views
Last Modified: 2010-04-06
Hello,

I want to make a quick report in Delfi 3. In this quick report
there should come a line from one query followed by one or more lines from another query.

I am new to Delfi, but have much experience with other programming platforms.

I have to use queries because the data is in several tables.

However to simplify the problem consider it to be :

Query 1 : select name from customers
Query 2 : select amount from order

I would of course want the two queries to be linked, thus query 2 should be something like
select amount from order where customId = customers.customid.

How do I excatly set up the bands (title band, detail band,...) in order to accomplish this.

Is there a good description of the quick reports available?

Thanks
0
Comment
Question by:pwillems
[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
7 Comments
 
LVL 1

Expert Comment

by:Greedy
ID: 1340265
What exactly do you want to do.  Do you know what the different bands do.  One detail band will be printed for each record in the table that you have selected as the reports dataset.  Oh it's is also important that you go get the Quick Reports 2.0j it is the latest one out for non registered useres of the delphi version of quick reports (2.0k if regestered)  You actualy have many ways to do this but what I would probably do is set the dataset proporty of the report to the table that you want each band to print and then use a QRLabel to output the text that you want.  The text to put into the QRLabel will be caculated in the Before print event of the detail band.  so you can do something like this
QRLAbel1.Caption := MyFattyAssQuery.Result
or the equivalent :)
alternatly you could not put a DataSet in for the report and then make your own custom OnNeedData Event for the form...this is a bit more complictadted for a "first timer"
just ask another question if you have a problem.

0
 

Author Comment

by:pwillems
ID: 1340266
Hello,

I did buy Delfi 3 10 days ago. I suppose I have the latest version
of the quick report. If not, how can I obtain it (legally).

I think the answer you give does not suit my needs. I do not use
QRlabels for the results of a query but I get the data in automatically while the report prints. However, I get a correct detail band but under it always the same (and thus except for the first) wrong subdetail band.

It is the linking between detail band and subdetail band which gives me trouble.

Another point which gives me trouble is that I can not find the manual for the quick report.

Thanks

Paul
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1340267
Pwillems,

Look at the demo's QR itself gave about subdetail bands ...

Regards, ZIF.

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 1

Expert Comment

by:Greedy
ID: 1340268
The manual for Quick reports is on the CD callled Qrpt2man.doc in the \Runimage\DELPHI30\QUICKRPT directory
get the latest copy of quick reports from www.qusoft.com
You most likely have 2.0g you will want 2.0j the way to tell what you have it to right click on the TQuickRep component on the form...not on a band do it outside the margins the popup menu that comes up will tell you the version you can click on it and it brings you to an about box that has the URL that you can click on then go to the download section and pick the one for the delphi users and you'll be fine.  Subdetail band listing isn't too bad once you've seen one work they have a new sample program there too.


0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1340269
pwillems

What you can try is select the option you dropped on the report e.g. QrCustomerDBText
then under data set choose one of the Sql Q... you dropped on the form...

Then under the Sql query type the query you wish to run
SELECT 'Customer' from cust.db etc................

Previewbutton.click..........
execute the query and when you call the report qreport1.preview; then the Sql will be run

Later
BoRiS

0
 

Author Comment

by:pwillems
ID: 1340270
I was able to do the requested report with the two queries.
It was the comments of Greedy who showed the way I did it.
So, I would like Greedy to answer, so that I can valuate the comments.
0
 
LVL 1

Accepted Solution

by:
Greedy earned 50 total points
ID: 1340271
Ok glad it helped.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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 brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

632 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