Calculated fields in group footers => what about image fields / controls?
Hi!
I??m calculating some summary values for a group footer in some calculated
fields. I remember, that this was no easy task when I had to to this for
the first time:
http://delphi.newswhat.com/geoxml/forumhistorythread?groupname=digital-metaphors.public.reportbuilder.general&messageid=461de1cf$1@mail.
Well, meanwhile the summaries are calculated correctly in calculated
fields, but now the problem gets even a bit more compicated:
One of the correctly calculated and displayed values is visualized with an
image. The image is therefore set one line under the value of the
displayed value in the OnCalc event of the value. But this leads to my old
known problem described in the thread above: If I scroll through the pages
of my report preview one after another the displayed image matches the
displayed value correctly. If I jump to a specific page in my report
preview an incorrect image is displayed there...
The solution would be some kind of 'calculated' image control I guess. Do
you have any suggestions how to handle this problem?
Regrads!
Ralf
--- posted by geoForum on http://delphi.newswhat.com
I??m calculating some summary values for a group footer in some calculated
fields. I remember, that this was no easy task when I had to to this for
the first time:
http://delphi.newswhat.com/geoxml/forumhistorythread?groupname=digital-metaphors.public.reportbuilder.general&messageid=461de1cf$1@mail.
Well, meanwhile the summaries are calculated correctly in calculated
fields, but now the problem gets even a bit more compicated:
One of the correctly calculated and displayed values is visualized with an
image. The image is therefore set one line under the value of the
displayed value in the OnCalc event of the value. But this leads to my old
known problem described in the thread above: If I scroll through the pages
of my report preview one after another the displayed image matches the
displayed value correctly. If I jump to a specific page in my report
preview an incorrect image is displayed there...
The solution would be some kind of 'calculated' image control I guess. Do
you have any suggestions how to handle this problem?
Regrads!
Ralf
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
For future reference, please post using your real name in the "from" field.
How and where are you loading your images from? If you place a break point
inside the OnCalc event where the image is being loaded, are you able to see
why the wrong image is displaying? Have you tried using a two pass report
and loading the images during the first pass?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
==>>I hope I have solved the problem by changing the fake-email field in
the 'Your Data' section of newswhat.com.
==>>The image is set by passing the imagefield to the dll that runs my
report builder. There the image is drawn (its a very simple graph) and
assigned.
I don??t guess the problem is here, because it works fine if I go through
the pages of the preview one after another. Also the problem can be
reproduced by simply assinging the value to a simple text label. Only
calculated fields that fetch the correct value in their OnCalc event seem
to avoid this problem.
being loaded, are you able to see why the wrong image is displaying?
I??m using ReportBuilder Vers.9.03 EnterpriseEdition and Delphi 7.
Unfortunately I??m not able to debug my dll with Delhi because of some
other components/dlls in my main application (Strange thing - I know....
And I guess I can??t set any breakpoints in the RAP of my Report.
Therefore I only use the Messageboxes to debug. These MSGBoxes tell me
that in the first pass everythins is calculated and set correctly. In the
second pass false values are calculated, but although the 'Value' is set
to the false value the calculated field doesn??t take it at all - only the
image field is set to the false ones and keeps it...
first pass?
Yes the report??s passsetting is set to twopass. By now I didn??t react on
this setting in the OnCalc, what means the image was set in first and then
again in second pass. When I use somethins like this:
If Not Report.SecondPass Then
{Set image}
End;
Then the function that sets the image is only called in the first pass.
Sounds correct but strange is that in this case all group footers now have
the same image (with the value of the last group footer). ?!? I remember
that this problem already occured in my last thread of this problem...
Much text and hard to explain - I only hope you can follow my explanations :-)
Regards
Ralf Appenzeller
BIZERBA GmbH & Co. KG
--- posted by geoForum on http://delphi.newswhat.com
What we would really like is for you to change "RAp" to "Ralf Appenzeller"
Have you tried recreating this behavior with a simple app that you can debug
(using delphi code and the delphi debugger). This would be the next step to
take. Perhaps isolating the problem in a simple app will help us figure out
the main issue and give us clues on how to solve it with your main app.
Feel free to send this example of the issue to support@digital-metaphors.com
in .zip format and I'll take a look at it for you as well.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for your efforts:
Although your suggestion of using a TStringList to keep the correct values
is a bit pedestrian it really solves the problem.
Once again you saved my day! ;-)
Big thanks!!!
Regards
Ralf
--- posted by geoForum on http://delphi.newswhat.com