Home All Groups Group Topic Archive Search About

CallByName - Trying to understand.

Author
3 Apr 2006 1:42 PM
Fredrik Melin
Hi,

We had real bad problems with reports being printed wrong (active reports
..net 2.0), which we tracked down to being because before we printed the
report we used CallByName to READ properties from the Business Object that
the report was based on.

When I replaced the old CallByName's call with a small Reflection code
instead, the problem went away.

Now Im just curious what caused it, It seems that if you use CallByName
(even if its just Get) it changes the object somehow, not "visiable" but
enough for the report to go bad.

It was actually depending of how much time elaped between the CallByName
call and the report printing, if you let enough time go by (above 10
seconds) there was no problem.

Anyone seen this behavior before?
(Please note that we already found the fix for it, im just curious why it
happens)

Author
3 Apr 2006 3:26 PM
Branco Medeiros
Fredrik Melin wrote:
<snip>
> We had real bad problems with reports being printed wrong (active reports
> .net 2.0), which we tracked down to being because before we printed the
> report we used CallByName to READ properties from the Business Object that
> the report was based on.
>
> When I replaced the old CallByName's call with a small Reflection code
> instead, the problem went away.
>
<snip>
> Anyone seen this behavior before?
> (Please note that we already found the fix for it, im just curious why it
> happens)

it would help if you posted the code that was giving you wrong results
and the new code that corrected the issue.

Regards,

Branco.