Solved

Quick report

Posted on 2002-06-09
7
320 Views
Last Modified: 2011-09-20

dear expert

how can i use and pass the parameter to the Database(Oracle),to get areport using the component(Qreport).
0
Comment
Question by:hussin14
7 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 7065178
This is general use of QReport with any database:

In your database application do the following:

- Click file/New/Quick Report
- In QuickReport form set DataSet properrty to the Table or Query that contains your report data
- From QReport components palette drop qqrBand
- Make sure that BandType property of qrrBand is set to Title
- In this band (Title) you can drop qrLaabel which represent report title
- Drop another qrBand and set it's BandTType to Column Header
- You can drop qrLabels in this new bandd to write record headers (Field names)
- Drop third qrBand and set it's BandTyppe to Detail
- In this Detail band you can drop qrDBTText which has DataSource and DataField properties
- In this qrdbText you will display repoort information
- To view this report write:

QuickReport1.Preview;


Motaz
0
 

Author Comment

by:hussin14
ID: 7065449
dear expert

i test your solution and i know how can imake quick report
,but i do not need to reported all the data in the table i just pass the parameter ,that mean i make rport for example
no>10 ,please explain to me how can i pass limited parameter to get a limited report.

thanks
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 100 total points
ID: 7065806
Hello

  if you are using Table components, change the filter property to the Table before you preview the report

  Table1.Filter := 'No > 10';
  Table1.Filtered := True;
  QuickRep1.PreView;

if you are using the query components, write sql statement to accomplish ur query
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 2

Assisted Solution

by:NetoMan
NetoMan earned 100 total points
ID: 7068551
with a TQUERY component you can use :

Select * from myTable  -- 10 or less rows
where rownum <= 10

or

Select * from myTable  -- all records that match criteria
where myColumnId <= 10

if you want to pass parameters to the query (TQUERY) that is asociated to the qreport (TQUICKREP), use this :


   Begin
     //in this example    
     //Edit1 conatains a valid parameter to your column
     MyQuery.Sql.Clear;
     MyQuery.Sql.Add('Select * from myTable');
     MyQuery.Sql.Add(' where myColumnId = '+edit1.text);
     MyQuery.Open;
     //link the query whit your report
     QuickRep1.Dataset := MyQuery;
     QuickRep1.preview;
   End;

NetoMan:)
0
 
LVL 2

Expert Comment

by:NetoMan
ID: 7092763
hussin14 : our coments did help you ?

NetoMan :)
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010490
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between mnasman and NetoMan

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
indy Tmemory stream non latin charcter issue 2 121
Run video youtube webbrowse 10 65
enhance the following code 3 37
How to save the image in the .cds File ClientDataSet? 1 22
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 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