Solved

need a qreport expert urgently

Posted on 2001-08-11
12
285 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
[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
  • 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
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!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 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