Solved

Quick report

Posted on 2002-06-09
7
314 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
Comment Utility
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
Comment Utility
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:
mnasman earned 100 total points
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 2

Assisted Solution

by:NetoMan
NetoMan earned 100 total points
Comment Utility
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
Comment Utility
hussin14 : our coments did help you ?

NetoMan :)
0
 
LVL 1

Expert Comment

by:pnh73
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now