RB6.01 Access violations,..
After installing RB6 professional edition, all of my DADE reports gave
access violations when running.
I upgraded to RB6.01... still the same access violations.
Now, I opened on of these reports in design mode : the data tab, design tab,
and even preview seem to look correct.
But when saving the form (that contains the report), I get these 2 error
messages :
Field .ppMasterFieldLink2 does not have a corresponding component.
Remove the declaration ?
Field .ppMasterFieldLink1 does not have a corresponding component.
Remove the declaration ?
From now on, I got other compiler errors in this unit :
The notations pipeLine['myFieldName'] give 'undeclared identifier' errors
on the pipeLine identifier
Any idea ?
(PS everything worked well in Delphi 5, RB 5.56)
access violations when running.
I upgraded to RB6.01... still the same access violations.
Now, I opened on of these reports in design mode : the data tab, design tab,
and even preview seem to look correct.
But when saving the form (that contains the report), I get these 2 error
messages :
Field .ppMasterFieldLink2 does not have a corresponding component.
Remove the declaration ?
Field .ppMasterFieldLink1 does not have a corresponding component.
Remove the declaration ?
From now on, I got other compiler errors in this unit :
The notations pipeLine['myFieldName'] give 'undeclared identifier' errors
on the pipeLine identifier
Any idea ?
(PS everything worked well in Delphi 5, RB 5.56)
This discussion has been closed.
Comments
the datapiplines. You can't access the pipelines in the form unit like you
used to be able to do, since the form doesn't own the pipelines anymore.
You'll want to get at the pipeline for the report using Report.Datapipeline.
The masterfieldlink objects are from an older version of RB. In RB6, they
shouldn't be declared on the form, since they aren't going to be owned by
the form either. You should be able to remove the declarations.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
in code.
Example :
My form has 2 dataviews.
This is the form class definition :
type
TFormReportsFinancialType10 = class(TForm)
ppReport1: TppReport;
daDataModule1: TdaDataModule;
daBDEQueryDataView1: TdaBDEQueryDataView;
daBDEQueryDataView2: TdaBDEQueryDataView;
...
In the data tab of the report designer, the first dataview is called
'faPrest', the second one 'clProdAv'.
How can I access the field 'description' of my second dataview ?
In RB5.56, I did this with the following code :
myValue := clProdAv['description'] ;
In RB6.01, the next code seems to do the thing, but is probably not the best
way :
myValue := daBDEQueryDataView2.dataPipeLines[0].fieldValues['description'];
You suggested to use the syntax
myValue := ppReport1.dataPipeLine ['description'];
But what if both dataviews have a field named 'description' ? How can I be
sure to get the field of my second dataview?
Thanks
DADE thread which describes how to access this object.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I know how to extract the SQL object, and to modify it (adding criteria,
etc..).
This is not my problem.
My problem is how to access the table fields in event code during the
generation of the report.
Do I need the SQL object for that ?
Regards
Herman
(like they used to be) then the way to get at the fields are by extracting
the SQL object. However, the dataviews are visible in RAP, and they can be
referenced by their name just like before: lsText := plCustomer['Company'];
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com