Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Clearing entire contents of ReportGrid with outer columns Collapse All
Subject Author Date
David Skok Nov 3, 2006 - 12:12 PM

Some time ago I asked how to clear out the entire contents of a CExtReportGrid to prepare filling with a new set of data. The code I am using is:

LONG nColCount = ColumnCountGet();
LONG nRowCount = RowCountGet();

if( nRowCount != 0 )
{ SelectionUnset( false, false );
SelectionInsertAt( 0, CRect( 0, 0, nColCount - 1, nRowCount - 1 ), false );
ReportItemUnRegisterSelection(false);
}

//OuterColumnCountLeftSet( 0 );

if( nColCount )
{ ReportColumnUnRegisterCategory( "CategoryName" );
}

I am now using outercolumns in the ReportGrid and the code blows up in the call to ReportColumnUnRegisterCategory. I will also need to clear out ReportGrids with outer rows but haven’t tried that yet.

Here’s a stack dump:
CWnd::accNavigate(long navDir=0x0012f0f8, tagVARIANT varStart={...}, tagVARIANT * pvarEndUpAt=0x0263edd8)
CExtReportGridWnd::ReportColumnGetNext(__POSITION * & pos=0x00000000, const char * strCategoryName=0x004c3fb8, bool
bIncludeActive=true, bool bIncludeInactive=true)
CExtReportGridWnd::ReportColumnGetContent(const char * strCategoryName=0x004c3fb8, CTypedPtrArray<CPtrArray,CExtReportGridColumn *> & arrCategoryColumns={...}, bool bIncludeActive=true, bool bIncludeInactive=true)
CExtReportGridWnd::ReportColumnUnRegisterCategory(const char * strCategoryName=0x004c3fb8, bool bRedraw=true)

I experimented with using OuterColumnCountLeftSet( 0 ); but this doesn’t help.

Technical Support Nov 7, 2006 - 4:56 AM

We designed the CExtReportGridWnd report grid window to be similar to the super grid window in Microsoft Outlook which is used for displaying the contents of main folders. There are no outer cell areas in it at all. The CExtReportGridWnd class manages its cell areas in a special way and it is not possible to initialize outer cell areas in it using methods of the CExtGridWnd class.