Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-03
6
Medium Priority
?
1,663 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Accepted Solution

by:
Orionizer earned 1500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Starting up a Project
Loops Section Overview

782 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