Preview Icon
Can anyone help me with this?
I drop a TppReport onto a form and set its icon property to, say, one of
those provided with Delphi.
When the program runs and I choose to preview the report, the built-in
preview form still has the yellow 'R' icon.
I've tried a variety of icons and none works.
I'm trying to get the preview to match the 'house style' of the rest of the
app.
What am I doing wrong?
-Pete
I drop a TppReport onto a form and set its icon property to, say, one of
those provided with Delphi.
When the program runs and I choose to preview the report, the built-in
preview form still has the yellow 'R' icon.
I've tried a variety of icons and none works.
I'm trying to get the preview to match the 'house style' of the rest of the
app.
What am I doing wrong?
-Pete
This discussion has been closed.
Comments
example:
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
TppReport(Sender).PreviewForm.Icon.LoadFromFile('C:\FH40\gallery\globe1.ico'
);
end;
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
But why doesn't it work as expected using the published property?
-Pete
"Alexander Kramnik (Digital Metaphors)" wrote
in D6. Which version of Delphi and RB are you using? I'll look into why this
could be hapenning.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Here's another 'funny'.
I have a very simple test app which loads one of two reports. The reports
take the form of binary templates.
I have a couple of lines in the TppReport's OnPreviewFormCreate event to do
with setting up the size and zoom of the previewer (the default previewer).
Within this test app I have something like this:
...
if FurnaceType = 0 then
SummaryRpt.Template.FileName := 'Foo.rtm'
else
SummaryRpt.Template.FileName := 'Bar.rtm';
SummaryRpt.Template.LoadFromFile;
...
..depending on what the user selects.
Here's the anomaly: if he selects 'Foo' the OnPreviewFormCreate never fires.
If he selects 'Bar', it does!
-Pete
"Alexander Kramnik (Digital Metaphors)" wrote
you have to re-assign the event after you loaded the report. No anomaly, the
one report was saved having the event assigned, the other one not.
HTH,
Chris Ueberall;
Thanks, Chris.
I should have been aware of that: I've fallen foul of the template business
before - and I still can't get it through my thick head that loading a
template can (and does) wipe out a load of design time settings.
-Pete