Solved

DevExpress Printing System to Printing System 4: Undeclared identifier: 'Close'

Posted on 2011-03-03
6
1,586 Views
Last Modified: 2012-05-11
The exact code where the error occurs:
dxComponentPrinter1.PreviewWindow.Close;

Component name:
TdxComponentPrinter

The Error:
[Error] z_BuyOut.pas(3819): Undeclared identifier: 'Close'

Thoughts:
Again, I can't simply comment out the line, I need to fix it.. And apparently there's no 'Close' in the PreviewWindow property list, any solution?

Thanks.
0
Comment
Question by:John86a
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:Orionizer
ID: 35030625
The dxComponentPrinter should have an event called OnAfterPreview.

Hope this helps!
0
 

Author Comment

by:John86a
ID: 35030688
What's the usage of that event? I just wanna make the preview window close.
0
 
LVL 1

Expert Comment

by:Orionizer
ID: 35030744
Oh, I'm sorry - I misunderstood your question.  I thought you were trying to trigger something when the preview window closed, not trying to close the preview window itself.

Is there a reason you're calling the preview in the first place (ie, do you not want a preview at all)?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
Orionizer earned 500 total points
ID: 35030820
After researching a bit, you should be able to use the following:

dxComponentPrinter1.PreviewWindow.Release;

Be SURE when calling the Preview, to NOT call it as modal (after the release, it doesn't return focus back to your main form).  In other words, use the following to call the preview:

dxComponentPrinter1.Preview(False);

Hope this helps!
0
 

Author Closing Comment

by:John86a
ID: 35031423
Thanks!
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35031436
You can try it this way:

TCustomdxPSPreviewWindow(dxComponentPrinter1.PreviewWindow).Close;
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn different types of Android Layout and some basics of an Android App.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question