Solved

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

Posted on 2011-03-03
6
1,601 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
Independent Software Vendors: 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Part One of the two-part Q&A series with MalwareTech.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans
Suggested Courses
Course of the Month9 days, 10 hours left to enroll

624 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