CXTPReportControl and CFormView |
Post Reply |
Author | |
tjohnson
Newbie Joined: 20 July 2005 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 22 July 2005 at 11:05am |
In an attempt to learn about the CXTPReportControl, I've been trying to use it as a control within a CFormView. I've set up a Visual Studio project with the main view class being CFormView. Then, using the resource editor, I've added a custom control to the form. In the properties box, I assign "CXTPReportControl" to the class property and rename the control IDC_REPORT. I then right click on the control and choose "Add variable ...". In this dialog, I specify the CXTPReportControl again and choose XTToolkitPro.h/.cpp for the header/cpp files. I then code OnInitialUpdate as follows:
When I compile and run my project, I get a message box that says "Failed to create empty document" and the program exits. If I remove the CXTPReportControl from the form and replace it with any other control, the message box goes away and the program displays an empty form (well empty other than whatever control I put on it). I've also experimented with just using a CDialog instead of CFormView (taking cues from the VirtualList example). I get the same "empty document" message box. The only way I've been successful in using the CXTPReportControl is by using the CXTPReportView class. I see from your samples, however, that I should be able to just embed the control itself on another form and get it to work. What am I missing? |
|
~Travis
|
|
tjohnson
Newbie Joined: 20 July 2005 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Just in case anyone else ever needs to know this, the solution was that I should have used the value "XTPReport" for the class property of the control.
|
|
~Travis
|
|
yannick
Newbie Joined: 07 September 2005 Location: France Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Hello,
I have the same problem, can you give me the solution? Thank you!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Write "XTPReport" for the class property of the control.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
yannick
Newbie Joined: 07 September 2005 Location: France Status: Offline Points: 6 |
Post Options
Thanks(0)
|
hi, Yes I have already set this property. My problem is that I cannot edit the Item like in the CodeJock Sample. If I use this control with a CDialog, it work fine, I can edit and modify item. But I need to use a CXTResizeFormView and with that one It's very difficult to edit the items....(I must click several times at the begening of the item text,if I click in the middle of the item area, I can't edit it...) Do you know something about this problem? Is Codejock Team can Help Me?
Thanks a lot Edited by yannick |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
2005-09-08_070153_SimpleReport.zip I tried to reproduce problem, but without success. Try attached sample, do you see your problem with it? |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
yannick
Newbie Joined: 07 September 2005 Location: France Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Hello, Thank you for you help! But I have to search again, because I have different view chart: I have the MainView (a CView). The MainView have a CXTPTabControl, and each Tabs contain a CXTResizeFormView. So I think there is a problem with the windows communications (Bad Messages Handling or a bad property or something like this....). If you have time for make me a sample with this view chart it will be very nice. I'am searching too about this problem. Thank you very very much, and congratulation for the codejock team & products. Regards.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, ok, try to modify attached sample to make same chart and attach here, I will show what you must change. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
yannick
Newbie Joined: 07 September 2005 Location: France Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Hello, I have modified your sample, the prolem is that it's difficult to edit an item on the report control. you can dowload it on : http://ik180.ikexpress.com/~fred/dl/SimpleReport.zip Thank you for your help. Best Regards, Yannick. Edited by yannick |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi As in TabbedView sample you must catch MouseActivate message and don't call base class. Also I added some clipping styles to prevent flickers. See Result: 2005-09-09_133649_SimpleReport.zip
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |