Error with custom registered graphic type in upgrade from RBP.04 to RBP14.08
I just (finally) upgraded from RBP7.04 to RBP14.08.
Running with D7 Enterprise, under old Win2K VMWare vm.
I built and ran code prior to update, and everything ran flawlessly.
However, after update, a custom registered graphic type now longer
works. When run, I get:
"Error reading TppDrawImage.Picture.Data: Stream read error."
I'm looking for suggestions as to how to resolve this...
In DetailBand1BeforePrint, I do:
fName:=
ppImage1.DirectDraw:=True;
ppImage1.Picture.LoadFromFile(fName);
----------------------------------
My custom registered graphic type is:
unit ppsgDXF;
interface
{$I ppIfDef.pas}
uses
ppCtrls, DXFImage;
implementation
{***********************************************************************
*******
*
** I N I T I A L I Z A T I O N / F I N A L I Z A T I O N
*
{***********************************************************************
*******}
initialization
ppRegisterGraphicClass('DXF', TsgDXFImage);
ppRegisterGraphicClass('DWG', TsgDXFImage);
finalization
ppUnRegisterGraphicClass(TsgDXFImage);
end.
-----------------------------------
In DXFImage.pas, TsgDXFImage is declared as:
TsgDXFImage = class(TGraphic)
...
-------------------------------
I haven't changed the DXFImage library at all.
I know this is a big jump - 7.04 to 14.08, and so far this looks like
the only issue I have with the transition, but it's a big problem - and
any suggestions would be appreciated.
Thanks.
--
EdB
This discussion has been closed.
Comments
Please use your full name when posting to the newsgroups. Please use either
support@ or the newsgroups, but not both. Thanks in advance.
This question was sent to support@ and has been answered there. Here is a
copy of my response..
Try a simple test without RB. Create a new project and place a TImage on the
form. In a Button OnClick event, call Image.Picture.LodFromFile. Does that
work? If so then it should work in ReportBulder. Try running the RB example
in the debugger - add RBuilder\Source to the Delphi library path and also
include the Delphi lib debug .dcu's. Run the project, then the exception
occurs, check the call stack - perhaps that will provide a clue.
Registering a graphic type with RB should still work, but that is only used
for TppDBImage - for a database blob stored in a database. For files, since
you are call TppImage.Picture.LoadFromFile that uses Delphi's
TPicture.LoadFromFile.
Best regards,
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
SOLVED in direct email support.
For anyone else interested - "Nard for the save" once again:
Changing Report.PreviewFormSettings.SinglePageOnly to true solved my
problem.
Quoting from direct email:
"RB 14 introduces a new scrollable page preview, which generates pages
in a background thread. . You can set
Report.PreviewFormSettings.SinglePageOnly to True to use the old single
page preview."
EdB