?
Solved

Quick report

Posted on 2002-06-09
7
Medium Priority
?
339 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
6 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 400 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Assisted Solution

by:NetoMan
NetoMan earned 400 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

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!

Question has a verified solution.

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

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

840 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