Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPReportControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportControl

 Post Reply Post Reply
Author
Message
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportControl
    Posted: 17 December 2004 at 6:43am

I tried searching, but didn't find any info on this - perhaps I missed it, but...

When I remove all columns from the report control by dragging them off it, how do I get them back? I mean, when there isn't a single column in the control, there's nothing for other columns to dock on upon dragging them from the field chooser. So, once all columns are removed, the only solution is to delete the registry key (I store control state there). But there must be some way to restore columns - please help

// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2004 at 7:41am
If all columns are removed you can't drag and drop a column from the field chooser?  I just tried this with no problems.
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2004 at 7:48am

Doesn't work for me  Perhaps I'm missing some important line of code, but I don't really know which.

Just compared what it looks like with the original CodeJock sample and I don't have the gray line in which all columns actually are supposed to be. My control is totally white, without the top light-gray line. Where did it go?

// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
ICBM View Drop Down
Groupie
Groupie


Joined: 15 January 2004
Location: New Zealand
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote ICBM Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2004 at 4:14pm

I get this broken behaviour too. Problem is that, with no columns displayed, the context menu (needed to access the field chooser) does not appear when you right click the header, which is blank.

It also brings up a secondary issue with the sample code - the field chooser is implemented as a dialog bar, which is no good if you are using the report control (note: control, not view) with an application whose main window is a dialog box.

 

Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2004 at 11:36pm

Originally posted by ICBM ICBM wrote:

I get this broken behaviour too. Problem is that, with no columns displayed, the context menu (needed to access the field chooser) does not appear when you right click the header, which is blank.

It also brings up a secondary issue with the sample code - the field chooser is implemented as a dialog bar, which is no good if you are using the report control (note: control, not view) with an application whose main window is a dialog box.

 

It works fine if you have auto-sizing turned on, but it doesn't work (the grey area doesn't appear) with auto-sizing off. Could the support please clarify if it's possible to have auto-sizing turned off and still have the grey bar at the top of the report control?

Thanks,

// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2004 at 3:44am

Thank you. Fixed.

 

To fix it in your source, please add in void CXTPReportHeader::AdjustColumnsWidth(int nTotalWidth, int nFirstIndex):

 

if (m_nHeaderWidth == 0)
  {
   m_nHeaderWidth = nTotalWidth;   
  }

 

 

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2004 at 4:00am
Originally posted by oleg oleg wrote:

Thank you. Fixed.

 

To fix it in your source, please add in void CXTPReportHeader::AdjustColumnsWidth(int nTotalWidth, int nFirstIndex):

 

if (m_nHeaderWidth == 0)
  {
   m_nHeaderWidth = nTotalWidth;   
  }

Sorry, it doesn't seem to work  It now shows the gray bar and that's great, but it also now shows empty rows (grid lines) when there're no columns present. A screenshot is attached :

Thanks



Edited by dennisV
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2004 at 3:48am

...

void CXTPReportControl::DrawRows(CDC* pDC, CRect& rcClient)
{
 if (m_pColumns->GetReportHeader()->GetNextVisibleColumn(- 1, 1) == NULL)
  return;

...

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2004 at 3:53am
Originally posted by oleg oleg wrote:

...

void CXTPReportControl::DrawRows(CDC* pDC, CRect& rcClient)
{
 if (m_pColumns->GetReportHeader()->GetNextVisibleColumn(- 1, 1) == NULL)
  return;

...

Yes, that did the trick  Will this fix be in the next release, so that I (and others) won't have to repeat it again?

And also, when is the next update due?

Thanks.

// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.