Parameter list not found?? Preview prob
Hi,
two problems: whenever I copy a report comp I get some errors in the Delphi
IDE. (using D6, W2K and RB 7.02). Then I get an 'empty' comp in my module
and an error like 'parameter list' not found. When I delete the 'empty' comp
every thing is fine. Is it not allowed to copy and paste a TppReport comp?
Then I simply wanted to disable the print button in the standard preview
form and found the tutorial (Create a customized print preview form). I
tried it, but it does not match the facts I found. The ppPrvDlg e.g. is
nearly empty and there is no panel to color aqua. So how can I simply
disable the print button in the standard preview? This would help a lot...
Thank you for an answer!
Gerhard
two problems: whenever I copy a report comp I get some errors in the Delphi
IDE. (using D6, W2K and RB 7.02). Then I get an 'empty' comp in my module
and an error like 'parameter list' not found. When I delete the 'empty' comp
every thing is fine. Is it not allowed to copy and paste a TppReport comp?
Then I simply wanted to disable the print button in the standard preview
form and found the tutorial (Create a customized print preview form). I
tried it, but it does not match the facts I found. The ppPrvDlg e.g. is
nearly empty and there is no panel to color aqua. So how can I simply
disable the print button in the standard preview? This would help a lot...
Thank you for an answer!
Gerhard
This discussion has been closed.
Comments
1. In my testing with Delphi 6 and RB 7.04, I was able to copy a Report
component and paste it successfully on a form or data module. Though this
is not a known issue, please try upgrading to the latest version of RB and
see if that helps.
2 The archetecture of the report preview has been changed since that example
was created. See the article and example below for information and help on
creating a custom preview window.
-----------------------------------------
Article: Creating a Preview Plugin
-----------------------------------------
Q: I've followed the tutorials and registered a Preview Form replacement but
that did not affect the TppDesigner's Preview workspace.
A: Do not use the form replacement, but rather, there is a different
architecture built into the preview form that is registered by default.
You will need to register a TppPreview descendent. The class you register
is used to create the preview controls inside the standard print preview
form and the designer preview workspace.
Here is an example of creating a simple custom preview that access the
viewer its been assigned in order to change the page color. You can also do
more advanced operations such as adding and removing buttons and change the
behavior of the preview form. Access the inherited controls via. protected
properties and override the virtual methods in order to customize behavior.
Open ppPreview.pas and view the TppPreview class as a guide to create a
custom preview descendent.
unit MyPreviewPlugin;
interface
uses
ppPreview;
type
TMyPreviewPlugin = class(TppPreview)
public
procedure BeforePreview; override;
end;
implementation
uses
Graphics;
procedure TMyPreviewPlugin.BeforePreview;
begin
inherited BeforePreview;
Viewer.PageColor := clRed;
end;
initialization
TppPreviewPlugIn.Register(TMyPreviewPlugin);
finalization
TppPreviewPlugIn.UnRegister(TMyPreviewPlugin);
end.
Example of hiding the print button...
http://www.digital-metaphors.com/tips/PreviewerHidePrintButton.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com