Print Page | Close Window

CXTPReportControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1546
Printed Date: 30 June 2025 at 10:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPReportControl
Posted By: dennisV
Subject: CXTPReportControl
Date 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)



Replies:
Posted By: SuperMario
Date 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.


Posted By: dennisV
Date 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)


Posted By: ICBM
Date 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.

 



Posted By: dennisV
Date 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)


Posted By: Oleg
Date 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


Posted By: dennisV
Date 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



-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)


Posted By: Oleg
Date 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


Posted By: dennisV
Date 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)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net