Board index » delphi » OI Links

OI Links


2003-12-10 01:52:17 AM
delphi33
Hi,
I recently have been some problems regarding to the Object Inspector
proporties links. For example, if I open a report, the dataset propertie is
empty
(blank) and if I rebuild my application I will get an AV when printing the
report, of course.
The solution to this is to open the report a second time, i.e., close it and
open it again or open the form that contains the dataset component linked to
the report
before open the report.
Is this a bug? If so, is there a solution? This is a serious problem because
some of my applications start to raize AV if I save this reports without
seeing if the dataset proportie of the report is empty or not.
Regards,
--
Carlos Matos
Comograma - Programação Informática, Lda.
Morada / Address: Urb.Vale Verde Lote 34 - Loja - 3040 Coimbra
Telefone / Phone: +351 239 802 340-8, Fax: +351 293 802 349
Web: www.comograma.pt
 
 

Re:OI Links

You are asking for trouble with this scenario, particularly in terms
of maintenance. Stick the datasources in a common module would be my
preferred solution or you could get away with hard coding the
datasosoucre property in the owning forms oncreate event. However if
they are on separate forms you will get another AV if the form with the
datasource hasn't been created at the time you try to refreence it..
An auto created data module is n't going to cost you that much unless
you've got lots of reports and it will save you buckets of hassle if
you make sure it is created before anything that might use it is.
 

Re:OI Links

Quote
Hi,
Greetings.
Quote
I recently have been some problems regarding to the Object Inspector
proporties links. For example, if I open a report,
What sort of report? ReportBuilder? QuickReport? Rave?
Quote
The solution to this is to open the report a second time, i.e., close it and
open it again or open the form that contains the dataset component linked to
the report
before open the report.
Is this a bug?
Sounds like it.
Quote
If so, is there a solution?
Given enough time and money there is always a solution.
Unfortunately without more details (e.g. which reporting compoents) it's
rather difficult to provide more help.
- Brian
 

Re:OI Links

Hi Brian,
Quote
What sort of report? ReportBuilder? QuickReport? Rave?
Unfortunately without more details (e.g. which reporting compoents) it's
rather difficult to provide more help.
The report was just an example but ok, I use QuickReport. This happens on
any other situation. For example if I have a TDatamodule an a TIBDatabase
(IBX components) on it,
and if I open a form that has components that are linked to that TIBDatabase
that beelongs to that TDatamodule, the result is the same. The links
properties are empty unless that I open the TDatamodule first.
Quote
Given enough time and money there is always a solution.
Can you explain this to me, please. I don't know what this has to do about
my problem.
Thanks,
Best Regards,
Carlos Matos
 

Re:OI Links

Designtime linking is usable only if you create exactly one instance of link
source and it is created before linked modules.
Link source *must* be included in project. If not, you have to open it
manually before opening any dependent modules, because IDE does not know
where to get it from, so it can not load it, so it can not resolve links, so
they are cleared. :)
BTW, these are not OI links, OI is just a tool to view/modify them.
--
Robert Cerny
DelphiShaman
"Carlos Matos" <XXXX@XXXXX.COM>writes
Quote
Hi,
I recently have been some problems regarding to the Object Inspector
proporties links. For example, if I open a report, the dataset propertie
is
empty
(blank) and if I rebuild my application I will get an AV when printing the
report, of course.
The solution to this is to open the report a second time, i.e., close it
and
open it again or open the form that contains the dataset component linked
to
the report
before open the report.
Is this a bug? If so, is there a solution? This is a serious problem
because
some of my applications start to raize AV if I save this reports without
seeing if the dataset proportie of the report is empty or not.

Regards,

--
Carlos Matos

Comograma - Programação Informática, Lda.
Morada / Address: Urb.Vale Verde Lote 34 - Loja - 3040 Coimbra
Telefone / Phone: +351 239 802 340-8, Fax: +351 293 802 349
Web: www.comograma.pt



 

Re:OI Links

The only time I have seen something similar is when I forgot to add the
datamodule to my project. It seems that when the designer is loading
your form, it is blanking the datasource because it can not find the
TDataModule which contains them. When you open it are you using File
Open or View Units ?
 

Re:OI Links

Quote
Hi Brian,
Greetings.
Quote
>What sort of report? ReportBuilder? QuickReport? Rave?
>Unfortunately without more details (e.g. which reporting compoents) it's
>rather difficult to provide more help.

The report was just an example but ok, I use QuickReport. This happens on
any other situation. For example if I have a TDatamodule an a TIBDatabase
(IBX components) on it,
and if I open a form that has components that are linked to that TIBDatabase
that beelongs to that TDatamodule, the result is the same. The links
properties are empty unless that I open the TDatamodule first.
I personally have never had this problem (I've read of many who have) so
I probably won't be able offer much help.
Are all the units included in the project? If you press Ctrl+F12, are
the the units containing the linked-to and linked-from components in the
list?
Quote
>Given enough time and money there is always a solution.

Can you explain this to me, please. I don't know what this has to do about
my problem.
It's a smart-assed remark. I apologize.
- Brian
 

Re:OI Links

Hi Robert,
Quote
Designtime linking is usable only if you create exactly one instance of
link
source and it is created before linked modules.

Link source *must* be included in project. If not, you have to open it
manually before opening any dependent modules, because IDE does not know
where to get it from, so it can not load it, so it can not resolve links, so
they are cleared. :)
Yes, but all my link source are included in my projects. This just starts to
happen, and I am not exactly sure about this, after I start to add some
frames to my projects.
Do you think that there is any relationship on this?
Quote
BTW, these are not OI links, OI is just a tool to view/modify them.
Yes, I know that, maybe not the correct words used.
Regards,
Carlos Matos
Comograma - Programação Informática, Lda.
Morada / Address: Urb.Vale Verde Lote 34 - Loja - 3040 Coimbra
Telefone / Phone: +351 239 802 340-8, Fax: +351 293 802 349
Web: www.comograma.pt
 

Re:OI Links

Hi Brian,
Quote
I personally have never had this problem (I've read of many who have) so
I probably won't be able offer much help.
Well, this is good because I am not alone on this.
Quote
Are all the units included in the project? If you press Ctrl+F12, are
the the units containing the linked-to and linked-from components in the
list?
Yes, they are.
Thanks anyway.
Cheers,
Carlos Matos
 

Re:OI Links

On Fri, 12 Dec 2003 10:36:38 -0000, "Carlos Matos"
<XXXX@XXXXX.COM>writes:
Quote
Hi Brian,

>I personally have never had this problem (I've read of many who have) so
>I probably won't be able offer much help.

Well, this is good because I am not alone on this.

>Are all the units included in the project? If you press Ctrl+F12, are
>the the units containing the linked-to and linked-from components in the
>list?

Yes, they are.

Stranger and stranger. Seeing as you can repeat the problem at will
have you looked at the dfm files, while linked and outside of the ide
when you know they are going to fail to load ?
Another thought, these wouldn't be inherited forms would they, I've
had problems before where in 'converting an existing form to a parent
to inherite from, I have inadvertantly messed up top of the dfm file
resulting in all sorts of strange behaviours.
Given that all your uses clauses, units in the project and creation
order are correct, the suspicion has got to fall on the reading or
writing of the component to and from the dfm.