mokule
asked on
QuickReport Problem
Hi,
I've got a project written in Delphi 5.
I've got a problem with TQRExpr fields when opened this project in Delphi 7.
When I try to use Expression Wizard, the Select Dataset listbox is empty.
What is the reason and how to solve it?
mokule
I've got a project written in Delphi 5.
I've got a problem with TQRExpr fields when opened this project in Delphi 7.
When I try to use Expression Wizard, the Select Dataset listbox is empty.
What is the reason and how to solve it?
mokule
ASKER
But the problem is that my Datasets located in DataModule are not visible. The Select dataset list box is empty.
When i place some dataset on the same form as report it is visible in this listbox.
But I want to have datasets in data module
mokule
When i place some dataset on the same form as report it is visible in this listbox.
But I want to have datasets in data module
mokule
implementation
uses Unit2; // replace Unit2 with name of your Data Module unit name here....
mokule,
Do you have your data module unit name in implementation of your QuickReport form?
Ashok
uses Unit2; // replace Unit2 with name of your Data Module unit name here....
mokule,
Do you have your data module unit name in implementation of your QuickReport form?
Ashok
ASKER
Yes, I've got this declaration
Datasets are visible for TQRDBText but not for TQRExpr.
Have You got Delphi 7? Can You try the solutions You suggest?
mokule
Datasets are visible for TQRDBText but not for TQRExpr.
Have You got Delphi 7? Can You try the solutions You suggest?
mokule
Here at work, we have Delphi 7, but QuickReport components are not installed.
When I go home, I will try to fix the problem.
Ashok
When I go home, I will try to fix the problem.
Ashok
ASKER
It has nothing to do with my problem
by reading the article, it seems to me that you
do not have to specify Datset for TQRExpr.
Only specify Dataset for TQuickRep component.
I have to try this at home.
Ashok
do not have to specify Datset for TQRExpr.
Only specify Dataset for TQuickRep component.
I have to try this at home.
Ashok
Never mind my previous post.
Ashok
Ashok
you do have a dataset (ADOTable, ADOQuery, etc) on your form or in a datamodule, which is in the uses clause (after Interface)
right?
right?
ASKER
Yes,
I have datasets (ADOTable, ADOQuery, etc) in a datamodule, which is in the uses clause.
I've tried after Interface and implementation with no success.
I'll be grateful for any example using TQREpr with Dataset from other units, in Delphi7
Anybody using QuickReport in D7?
mokule
I have datasets (ADOTable, ADOQuery, etc) in a datamodule, which is in the uses clause.
I've tried after Interface and implementation with no success.
I'll be grateful for any example using TQREpr with Dataset from other units, in Delphi7
Anybody using QuickReport in D7?
mokule
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Missed shot :(
At least it did not cost anything for trying, right?
Ashok
Ashok
ASKER
Not quite, it costs time.
At the moment I think that I resign from using TQRExpr.
I must do the same using ADOQuery, though it costs me quite a lot of work.
Seems there is no choice :(
mokule
At the moment I think that I resign from using TQRExpr.
I must do the same using ADOQuery, though it costs me quite a lot of work.
Seems there is no choice :(
mokule
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
another workaround if you must (not using qrexpr) is to simply use a TQRLabel, and use the band's "beforeprint" event to populate the label. e.g. qrlabel1.caption := unit3.table1PRODUCTNAME.As String;
if it's any consolation, I know there is a way to do QRExpr
does the quickreport have a "datamodule" (no.. not dataset) property or something?
if it's any consolation, I know there is a way to do QRExpr
does the quickreport have a "datamodule" (no.. not dataset) property or something?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
can u not simple type in (instead of select from a combo) like
datamodule1.adoquery1
?
(currently no delphi on hand)
datamodule1.adoquery1
?
(currently no delphi on hand)
ASKER
to kretzschmar
unfortunately it doesn't work
to calinutz
by Your method I can use expressions with fields from only 1 dataset in a report , am i right?
mokule
unfortunately it doesn't work
to calinutz
by Your method I can use expressions with fields from only 1 dataset in a report , am i right?
mokule
mokule
If you give more detail about "what is your expression string?", someone can better help you.
I have never had to use QRExpr so I did not have any problem.
Whatever you are trying to do can be achieved by just using QRLabel.
Just like TheRealLoki suggested.
Have you tried Jacco solution if you want to use QRExpr ? (which is trying to use Datamodule at runtime)
Ashok
If you give more detail about "what is your expression string?", someone can better help you.
I have never had to use QRExpr so I did not have any problem.
Whatever you are trying to do can be achieved by just using QRLabel.
Just like TheRealLoki suggested.
Have you tried Jacco solution if you want to use QRExpr ? (which is trying to use Datamodule at runtime)
Ashok
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
to cula99
can You be so kind and supply an example, what should I write in an Expression?
Suppose my datamodule is DM1 my table is atFirma and fields fir_nazwa1, fir_nazwa2
condition: atFirma IS NOT TQuickRep DataSet
I've tried
Expression := atFirma.fir_nazwa1+atFirma .fir_nazwa 2;
or
Expression := DM1.atFirma.fir_nazwa1+DM1 .atFirma.f ir_nazwa2;
result Unknown function atFirma.fir_nazwa1 or Unknown function DM1.atFirma.fir_nazwa1
mokule
can You be so kind and supply an example, what should I write in an Expression?
Suppose my datamodule is DM1 my table is atFirma and fields fir_nazwa1, fir_nazwa2
condition: atFirma IS NOT TQuickRep DataSet
I've tried
Expression := atFirma.fir_nazwa1+atFirma
or
Expression := DM1.atFirma.fir_nazwa1+DM1
result Unknown function atFirma.fir_nazwa1 or Unknown function DM1.atFirma.fir_nazwa1
mokule
This is when atFirma IS TQuickRep DataSet
QuickReport1.DataSet := DM1.atFirma;
QRExpr1.Expression := atFirma.fir_nazwa1+atFirma .fir_nazwa 2;
but if not try to use CompositeReport where will you assign atFirma to TQuickRep2.DataSet and join it with first
Čula
QuickReport1.DataSet := DM1.atFirma;
QRExpr1.Expression := atFirma.fir_nazwa1+atFirma
but if not try to use CompositeReport where will you assign atFirma to TQuickRep2.DataSet and join it with first
Čula
ASKER
This not what I've expected, but thanks for Your efforts.
mokule
mokule
Can you try this?
Create new project, drop Quickreport, and use TQRExpr.
In Expression Wizard try to Select Dataset....
Ashok