BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

QuickReport TQRExpr problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
graham
Guest





PostPosted: Mon Oct 25, 2004 4:50 pm    Post subject: QuickReport TQRExpr problem Reply with quote



I have a QuickReport form, with 3 TQRDBText successfully connected to an
ADOQuery. The QuickReport1 has its Dataset selected too. But if I drop a
TQRExpr onto same form, I get no Datasets showing in the Expression Builder
(Delphi 6), So I tried entering into Object Inspector directly with:

Forename+ ' ' +Surname

which didnae work.

and my attempts in code with FormCreate failed:

fmCustPhoneQR.qrContact.DataField := DataMod.ADOQueryCustForename.Value
+ DataMod.ADOQuerySurname.Value;


I have tried brackets, but I can find no info on the correct syntax for the
Expression that help me here.

I ran the sample Quick Report ine Delphi6Demos, and the expression builder
works fine. That form has a DataSource component, which I understood
QuickReport did not use ?

Hope you can advise thankyou.

Graham.




Back to top
Joe Griffin
Guest





PostPosted: Mon Oct 25, 2004 7:18 pm    Post subject: Re: QuickReport TQRExpr problem Reply with quote



Graham wrote:
Quote:
I get no Datasets showing in the Expression Builder

It's a shortcoming with QR; even though the report "uses" the
datamodule, it can't access the datasets and thus their fields.

These days, I generally know what I want to put into the expression, so
I just type it in. The alternative is to copy the dataset from the
datamodule and drop it onto the form. That allows it to be picked up
by the Expression builder. Then once the report has been designed,
delete the dataset so that the one in the datamodule is accessed by the
report.

Hope that helps,
... Joe
Member of the UK Borland User Group


Back to top
graham
Guest





PostPosted: Sat Oct 30, 2004 10:01 am    Post subject: Re: QuickReport TQRExpr problem Reply with quote



Thanks for the help.

Oddly, with the Quick Report form unit having DataModule in it uses section,
I can type in the Expression field in Object Inspector:

ADOQueryCust.Forename +' ' + ADOQueryCust.Surname

anad it works fine; but if I add DataModule before the ADOQuery, it produces
"UNKNOWN FUNCTION" in the Preview.

Having an ADOQuery on the QR Form itself also allows me to get the records
ordered by a particular field in the report, which may be different from the
DBGrid linked to the DataModule.

Graham.

Joe Griffin
Quote:
Graham wrote:
I get no Datasets showing in the Expression Builder

It's a shortcoming with QR; even though the report "uses" the
datamodule, it can't access the datasets and thus their fields.

These days, I generally know what I want to put into the expression, so
I just type it in. The alternative is to copy the dataset from the
datamodule and drop it onto the form. That allows it to be picked up
by the Expression builder. Then once the report has been designed,
delete the dataset so that the one in the datamodule is accessed by the
report.

Hope that helps,
... Joe
Member of the UK Borland User Group




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.