Solved

need a qreport expert urgently

Posted on 2001-08-11
12
279 Views
Last Modified: 2010-04-06
Hi experts, I need some one who is an expert in qreport, what I need to do is how can I have the qreport arrange my report in month order: example if I were to select from my program from jan 99 to dec 99, I want it to show all of the details from the database(paradox) in months
eg.
    05/01/99  abc
    27/01/99  fff
--------
    02/02/99  def
    05/02/99  gjkfd
--------
    31/03/99  ddd
---------
    01/12/99  dfff
    12/12/99  hjlkfd

is there anyway that I could do this ???
your earliest help will be very much appreciated
0
Comment
Question by:vpr_ali
  • 9
  • 3
12 Comments
 

Author Comment

by:vpr_ali
ID: 6375316
oh I forgot mention that user must be able to customise the from to date... if qreport is too troublesome is there any other way ???
thanks
0
 

Author Comment

by:vpr_ali
ID: 6375323
oh I forgot mention that user must be able to customise the from to date... if qreport is too troublesome is there any other way ???
thanks
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6375325
Hi vpr_ali,

do you mean that you need separator line between different monthes?
And how do you plan to allow users customize period? Is it should be specail TForm to select period?

------
Igor
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 

Author Comment

by:vpr_ali
ID: 6375345
how do user customise is they select the month "from to" edit box from the TForm1 and when they press process, the qreport should be able to show all the data from the months selected separated by months...
by the way the database tables in paradox is done in this way :
DebtorID, Year, Month, Amount

I want to to be able to select from to month from a particular year at it should show all records from that the selected date.
0
 

Author Comment

by:vpr_ali
ID: 6375348
and yes I do need the months to be separated

thanks
vpr_ali
0
 

Author Comment

by:vpr_ali
ID: 6375351
and yes I do need the months to be separated

thanks
vpr_ali
0
 

Author Comment

by:vpr_ali
ID: 6375353
what's wrong with ee today ??? keep posting my msg twice...
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6375362
Hi vpr_ali,

let suppose you have two editboxes "EFrom" and "ETo" and one editbox "EYear".

your Query1.SQL statement would be:

select * from TheTable
where Year = :y
and Month >= :mf
and Month <= :mt
order by Month

once user pressed "process" you need to assign parameters to Query1:

ReportName.Query1.ParamByName('y').AsString := EYear.Text;
ReportName.Query1.ParamByName('mf').AsString := EFrom.Text;
ReportName.Query1.ParamByName('mt').AsString := ETo.Text;


Next step is about QuickReport.
Drop TQRGroup there and set "Expression" property = "Month", then drop normal details band. In group header you can show  current month, in detail band rest of details.

------
Igor.

PS: About EE today. Do not press  "reload" button just after you post some message :-)
0
 

Author Comment

by:vpr_ali
ID: 6376821
ITugay, I had some changes in the db structure, what it actually is to sort by the date in the date format eg. from : 01/01/1999  to 12/31/1999 (month day year)
and it works if I were to do this:

select *
from Orders
where OrderDate >= '01/31/1999'
and OrderDate <= '12/31/1999'
order by OrderDate;

but not when I do this:

select *
from Orders
where OrderDate >= :dt
and OrderDate <= :df
order by OrderDate;

which I wanted so that user could select their own date selection

I keep have this error message when I try to set the SqlQuery to active:
'Type mismatch in expression'

btw this this is the code:

  SystemData.Query1.ParamByName('df').AsString := DFrom.Text;

  SystemData.Query1.ParamByName('dt').AsString := DTo.Text;

where DFrom.Text := '01/01/1999'
and DTo.Text     := '12/31/1999'

is there anyway that I could have them by day month year format ???

if you don't mind, could you please reply me on my e-mail vpr_ali@hotmail.com so that I could give you the source code...

---
vpr_ali




0
 

Author Comment

by:vpr_ali
ID: 6376826
oops correction on the sql command:

select *
from Orders
where OrderDate >= :df
and OrderDate <= :dt
order by OrderDate;
0
 

Author Comment

by:vpr_ali
ID: 6376844
ITugay, I manage to sort it out, it was actually not:
Query1.ParamByName,
but it works with :
Query1.Params[0].Value := DFrom.Text;

anyway, I had to rush at the moment, I will finalise this question before I assign the points as yet, (I still have another questions on QReport)

thanks for your help

--
vpr_ali
0
 
LVL 9

Accepted Solution

by:
ITugay earned 100 total points
ID: 6376918
hi,

Delphi help:

TQuery.ParamByName
.....
Call ParamByName to set or use parameter information for a specific parameter based on its name.

Value is the name of the parameter for which to retrieve information.

ParamByName is primarily used to set an parameter?s value at runtime. For example, the following statement retrieves the current value of a parameter called ?Contact? into an edit box:

Edit1.Text := Query1.ParamByName('Contact').AsString;
.....

you can send me source code to "igor@ns.kz"
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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 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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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