Close the Second Preview Form

Stimulsoft Ultimate discussion
Post Reply
Brainstorm
Posts: 31
Joined: Thu Feb 17, 2011 1:54 pm
Location: Cuiaba, Brazil

Close the Second Preview Form

Post by Brainstorm »

When i create a dot-matrix report, first it opens a Preview window, then i have the option to open a second Preview window when i click the dot-matrix button on the toolstrip menu.
However, when i use the StiReport.CompiledReport.Printed event to automatically close the preview window after the report was printed, this second window is not closed.

Is there anything i can do to fix that?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Close the Second Preview Form

Post by HighAley »

Hello.

Sorry for delay with answer. We need some additional time to chack the issue.
We will be able to answer faster if you send as a sample project that reproduces the issue.

Thank you.
Brainstorm
Posts: 31
Joined: Thu Feb 17, 2011 1:54 pm
Location: Cuiaba, Brazil

Re: Close the Second Preview Form

Post by Brainstorm »

It's not difficult to reproduce really, you dont need a special report.
Open the print preview window, then click the Dot-Matrix Button at the top, it will open a new window.
If the button doesn't show up, open the designer and set the Preview Mode report property to "Standard and Dot-Matrix".
Attachments
preview_mode.png
preview_mode.png (18.85 KiB) Viewed 3821 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Close the Second Preview Form

Post by HighAley »

Hello.

Thank you for the additional information.
We have reproduced the issue.
We can make this windows as Dialog. Is it right for you?

Thank you.
Brainstorm
Posts: 31
Joined: Thu Feb 17, 2011 1:54 pm
Location: Cuiaba, Brazil

Re: Close the Second Preview Form

Post by Brainstorm »

My problem is that i set the window to auto-close after the report is printed (code bellow), but the dot-matrix preview window remains open, we need it closed when the preview window is closed.

Thanks.

Code: Select all

rptImpressao.RegData(this.DstImpressao);
rptImpressao.Load(StmcIcon);
rptImpressao.Compile();
rptImpressao.CompiledReport.Printed += new EventHandler(report_Printing);
rptImpressao.Render();

rptView.Report = rptImpressao;                
rptView.ShowDialog();

and the Printing event to close the preview form after the report was printed:

Code: Select all

private void report_Printing(object sender, EventArgs e)
{
      rptView.Close();
}
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Close the Second Preview Form

Post by HighAley »

Hello.

We will make an improvement and let you know about results.

Thank you.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Close the Second Preview Form

Post by Ivan »

Hello,

We made some improvements in that direction.
Please check the next release when it will be available on the next week and let us know about the result.

Thank you.
Post Reply