Solved

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

Posted on 2011-03-03
6
1,550 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
Comment Utility
The dxComponentPrinter should have an event called OnAfterPreview.

Hope this helps!
0
 

Author Comment

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

Expert Comment

by:Orionizer
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Accepted Solution

by:
Orionizer earned 500 total points
Comment Utility
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
Comment Utility
Thanks!
0
 
LVL 24

Expert Comment

by:jimyX
Comment Utility
You can try it this way:

TCustomdxPSPreviewWindow(dxComponentPrinter1.PreviewWindow).Close;
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short article about a problem I had getting the GPS LocationListener working.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now