?
Solved

Quick report

Posted on 2002-06-09
7
Medium Priority
?
334 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
[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 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
Independent Software Vendors: 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 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
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

764 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