Solved

need a qreport expert urgently

Posted on 2001-08-11
12
266 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

22 Experts available now in Live!

Get 1:1 Help Now