Using A ppMemo
I am using RB7 and D7 and cannot seem to update a ppMemo in a report at run
time. Information is getting into the ppMemo (Memo1.Lines.Add('stuff')) ok,
but when the memo is displayed in the report, nothing shows up. I am using
the OnPrint event of the memo without success. The ppMemo is located within
a region. If I preload the memo with text, the preloaded text will show up.
Any thoughts as to what it is I'm not doing correctly?
Jeff Kreider
time. Information is getting into the ppMemo (Memo1.Lines.Add('stuff')) ok,
but when the memo is displayed in the report, nothing shows up. I am using
the OnPrint event of the memo without success. The ppMemo is located within
a region. If I preload the memo with text, the preloaded text will show up.
Any thoughts as to what it is I'm not doing correctly?
Jeff Kreider
This discussion has been closed.
Comments
fixed height in the designer. When you add a line, you need to increase the
memo's height if it is static height, or set its Stretch proeprty to true.
It works in our tests here.
If all else fails, send us a simple working project that we can run and
we'll take a look at it. Send it to support@digital-metaphors.com
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
In creating a simple project I also was able to get it to work correctly.
However, I am still having problems getting my not so simple project to do
the report correctly. Some how, some where, something is overwriting the
ppMemo and I don't have another place that I am writing to it. Just before
it leaves the procedure that writes the information into the ppMemo, the
ppMemo has the new text. But when the report is displayed, the ppMemo is
blank. I am also using WinXP that has been severly locked down. I guess
they are afraid I'm going to delete my Windows and Program Files folders and
just about every other folder on my computer.
Thanks for your assistance.
Jeff
goes away. That is one way you can isolate where the problem is coming from.
The other way is to reconstruct the report from scratch in the main
application if you can't isolate it otherwise. It does sound like there is
an event handler or template being loaded which would override the changes
you've made. Is there eanythign different with the report you made which
works outside your app versus the repor tinside your app? Perhaps it is a
two pass report that is causing the problem, where the second time the event
handler fires it has different data?
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
problem or yours. I'm hoping its mine.
I am using 2 report files (ReportA, ReportB) with a single report (Report1).
ReportA has 6 subreports (PrintBehavious = pbSection) all are invisilble as
only one is used when the report is generated based on the user's selection.
This works perfectly. ReportB has 3 subreports (PrintBehaviour = sbChild).
This report has the problem and except for the ppMemo or ppRichText works
perfectly. Rather than displaying the reports printing in a new window, I
am having these reports print within my form via a built-in viewer. This
works perfectly. The report file is loaded on the fly via the LoadFromFile
procedure. The ppRichText contained the info in its RichText property after
the Report1.PrintToDevices is called, but when the report is displayed, the
info is again.
I also did figure out a fix. If I create a second report (Report2) and
change the Viewer to this report and call Report2.PrintToDevices, then
everything works. Until I did this, I took everything out of the program
with no success.
Jeff Kreider
assignment. Try reconnecting the event handler to the memo after the
template is loaded.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com