Show Default Preview Form in a frame
Hello
I am trying to show default Preview Form in a frame
Everything is working fine but I am not able to press any button
procedure TReportEdFrm.frxReportPreview(Sender: TObject);
begin
inherited;
JvPageControl1.ActivePageIndex:=1;
TfrxPreviewForm(frxReport.PreviewForm).parent:=TabSheet2;
TfrxPreviewForm(frxReport.PreviewForm).BorderStyle:=bsNone;
TfrxPreviewForm(frxReport.PreviewForm).WindowState:=wsMaximized;
TfrxPreviewForm(frxReport.PreviewForm).FormStyle:=fsNormal;
TfrxPreviewForm(frxReport.PreviewForm).Enabled:=True;
Application.ProcessMessages;
end;
Mike
Data Transformation tools,
www.etl-tools.com
I am trying to show default Preview Form in a frame
Everything is working fine but I am not able to press any button
procedure TReportEdFrm.frxReportPreview(Sender: TObject);
begin
inherited;
JvPageControl1.ActivePageIndex:=1;
TfrxPreviewForm(frxReport.PreviewForm).parent:=TabSheet2;
TfrxPreviewForm(frxReport.PreviewForm).BorderStyle:=bsNone;
TfrxPreviewForm(frxReport.PreviewForm).WindowState:=wsMaximized;
TfrxPreviewForm(frxReport.PreviewForm).FormStyle:=fsNormal;
TfrxPreviewForm(frxReport.PreviewForm).Enabled:=True;
Application.ProcessMessages;
end;
Mike
Data Transformation tools,
www.etl-tools.com
Comments
If you use TfrxPreview you must create your own toolbar and add all the buttons and then hook them to the appropriate functions
This functions should be called by each button:
procedure TReportEdFrm.frxReportPreview(Sender: TObject);
var EL: TJvEmbeddedFormLink;
begin
TfrxPreviewForm(frxReport.PreviewForm).CancelB.visible:=false;
TfrxPreviewForm(frxReport.PreviewForm).FullScreenBtn.visible:=false;
EL:= TJvEmbeddedFormLink.create(frxReport.PreviewForm);
emfp.FormLink:=EL;
inherited;
end
Mike
Data Transformation tools,
www.etl-tools.com