Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2001, 06:30 AM
natalie natalie is offline
Junior Member
 
Join Date: Feb 2001
Posts: 5
Default Preview report in MDI application

In a MDI application, i try to see my report using a menu.

I have to create my form when the application run (it works).
On my form, i put my report.

the result:
- my form is created
- i can see my report as in design time


I use preview method on the "on creation" event of the form.

the result:
- I see the preview but when i close the report preview, I still see the form

How can I create the form and preview the report ?
How can i close report and form ?
Reply With Quote
  #2  
Old 02-06-2001, 08:27 AM
Scottg Scottg is offline
Senior Member
 
Join Date: Feb 2001
Posts: 109
Default RE: Preview report in MDI application

What report preview component are you using? Quick Reports? How are you closing the print preview?

You might be able to close the form by using the OnExit event on QRPreview1 to close the form by:

procedure TForm1.QRPreview1Exit(Sender: TObject);
begin
self.Close;
end;

Hope this helps!

Scottg
Reply With Quote
  #3  
Old 02-06-2001, 02:54 PM
natalie natalie is offline
Junior Member
 
Join Date: Feb 2001
Posts: 5
Default RE: RE: Preview report in MDI application

I use Quick Reports 2 with Delphi 3.

I use the preview method of the report to see (activate) the report but I don't use preview object.

I close the report with the button on the report when i view it in a preview mode (as with a right click in design mode)

I don't have Exit Even (there is the problem...)

I can't only preview the report with the menu because i have to create the form.
Reply With Quote
  #4  
Old 02-06-2001, 05:25 PM
Scottg Scottg is offline
Senior Member
 
Join Date: Feb 2001
Posts: 109
Default RE: RE: RE: Preview report in MDI application

Although I'm using Delphi 5 with QuickReport3, I'd bet that QuickReports 2 (like QR3) has the AfterPreview event. Use this event to close the form, as follows:

procedure TForm1.FormShow(Sender: TObject);
begin
QuickRep1.Preview;
end;

procedure TForm1.QuickRep1AfterPreview(Sender: TObject);
begin
self.Close;
end;

Lemmeno if this works!

Scottg
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 07:07 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.