Print Page | Close Window

[SOLVED] ACCVIO when calling ShowHeaderRows(FALSE)

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19265
Printed Date: 19 May 2024 at 1:33am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] ACCVIO when calling ShowHeaderRows(FALSE)
Posted By: mgampi
Subject: [SOLVED] ACCVIO when calling ShowHeaderRows(FALSE)
Date Posted: 05 December 2011 at 10:59am
Hi;

I created the header records portion of a report control this way:
    Report_.GetHeaderRecords()->RemoveAll();

    CXTPReportRecord* Record=Report_.GetHeaderRecords()->Add(new CXTPReportRecord());

    for (int i=0; i<Report_.GetColumns()->GetCount(); i++) {
        if (i<13) {
            CXTPReportRecordItem* Item=Record->AddItem(new CXTPReportRecordItem());
            Item->SetEditable(FALSE);
        } else {
            CXTPReportRecordItem* Item=Record->AddItem(new CXTPReportRecordItemText());
            Item->SetEditable(TRUE);
        }
    }
   
    Report_.HeaderRowsAllowEdit(TRUE);
    Report_.HeaderRowsEnableSelection(FALSE);


The header row is used to define custom filtering conditions. When the user finished filtering I call this function:
void CCompoundReport::ClearFilter() {
   
    BeginWaitCursor();
   
    Report_.BeginUpdate();
   
    CXTPReportRecord* Record=Report_.GetHeaderRecords()->GetAt(0);
    for (int i=0; i<Report_.GetColumns()->GetCount(); i++) {
        CCompoundReportColumn* Column=reinterpret_cast<CCompoundReportColumn*>(Report_.GetColumns()->GetAt(i));
        if (Column->GetItemData()!=0) {
            CXTPReportRecordItemText* Item=DYNAMIC_DOWNCAST(CXTPReportRecordItemText, Record->GetItem(i));
            if (Item!=0)
                Item->SetValue(_T(""));
        }
    }

    for (int i=0; i<Report_.GetRecords()->GetCount(); i++) {
        Report_.GetRecords()->GetAt(i)->SetVisible(TRUE);
    }

   
    Report_.Populate();
    Report_.ShowHeaderRows(FALSE);
    Report_.EndUpdate();

    IsFiltered_=false;

    EndWaitCursor();
}


As soon as I call ShowHeaderRows(FALSE) I get the ACCVIO below. I tried to put the call elsewhere in code and it ALWAYS crashes. CXTPReportSection *pSection = pRow->GetSection(); in CXTPReportSections::EnsureVisible is a NULL pointer

Call stack:
ToolkitPro1513vc90UD.dll!CXTPReportRow::GetSection()  Zeile 814 + 0x3 Bytes    C++
     ToolkitPro1513vc90UD.dll!CXTPReportSections::EnsureVisible(CDC * pDC=0x0013df88, CXTPReportRow * pRow=0x00000000)  Zeile 86 + 0x8 Bytes    C++
     ToolkitPro1513vc90UD.dll!CXTPReportControl::EnsureVisible(CXTPReportRow * pRow=0x00000000)  Zeile 2031 + 0x23 Bytes    C++
     ToolkitPro1513vc90UD.dll!CXTPReportControl::SetFocusedRow(int bEnsureVisible=0x00000001, CXTPReportRow * pRow=0x00000000, int bShiftKey=0x00000000, int bControlKey=0x00000000)  Zeile 1944    C++
     ToolkitPro1513vc90UD.dll!CXTPReportControl::SetFocusedRow(CXTPReportRow * pRow=0x00000000, int bControlKey=0x00000000)  Zeile 1768    C++
     ToolkitPro1513vc90UD.dll!CXTPReportNavigator::MoveFirstVisibleRow(XTPReportRowType TargetType=xtpRowTypeBody)  Zeile 532    C++
     ToolkitPro1513vc90UD.dll!CXTPReportNavigator::SetCurrentFocusInHeadersRows(int bCurrentFocusInHeadersRows=0x00000000)  Zeile 483    C++
>    ToolkitPro1513vc90UD.dll!CXTPReportControl::ShowHeaderRows(int bShow=0x00000000)  Zeile 139    C++
     XRMiniLIMS.exe!CCompoundReport::ClearFilter()  Zeile 855 + 0x13 Bytes    C++
     XRMiniLIMS.exe!CReportingWnd::ClearFilter()  Zeile 230    C++
     XRMiniLIMS.exe!CMiniLIMSFrameWnd::OnReportingClearFilter()  Zeile 2184    C++


How can I fix this?


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Replies:
Posted By: ABuenger
Date Posted: 05 December 2011 at 7:48pm
This should already be fixed for the next release.



-------------
Codejock support



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