Solved

Quick report

Posted on 2002-06-09
7
321 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 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
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 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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