| voidCReportPaneViewView::OnInitialUpdate()  { CXTPReportView::OnInitialUpdate(); CString columnStr;for (int i = 0; i < COL_NUMBER; i++) { columnStr.Format("Column %d",i); CXTPReportColumn* pCol = GetReportCtrl().AddColumn(new CXTPReportColumn(i, columnStr, 60, FALSE,XTP_REPORT_NOICON,TRUE)); pCol->EnableResize(TRUE); }for (int j = 0; j < ROW_NUMBER; j++)  GetReportCtrl().AddRecord(new CReportViewRecord(j)); GetReportCtrl().Populate(); GetReportCtrl().GetReportHeader()->SetAutoColumnSizing(FALSE); GetReportCtrl().GetPaintManager()->SetColumnStyle(xtpReportColumnOffice2007); GetReportCtrl().GetPaintManager()->SetDrawGridForEmptySpace(TRUE); GetReportCtrl().GetPaintManager()->SetGridStyle(0, xtpReportGridSolid); GetReportCtrl().GetPaintManager()->SetGridStyle(1, xtpReportGridSolid); GetReportCtrl().GetPaintManager()->SetHeaderRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->SetFooterRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->m_clrHeaderRowsDivider = RGB(255,0,0); GetReportCtrl().GetPaintManager()->m_clrFooterRowsDivider = RGB(0,0,255); GetReportCtrl().AssignIconViewPropNumAndIconNum(-1, -1, TRUE, 20); GetReportCtrl().GetPaintManager()->SetLastColumnWidthWYSIWYG(TRUE); GetReportCtrl().GetPaintManager()->SetColumnWidthWYSIWYG(TRUE); m_pPrintOptions->GetPageHeader()->m_strFormatString = "Header text: &p from &P"; m_pPrintOptions->GetPageFooter()->m_strFormatString = "Footer text: &D"; GetReportCtrl().m_bForcePagination = TRUE; GetReportCtrl().AllowEdit(TRUE); GetReportCtrl().EnableDragDrop(_T("ReportPaneView"), xtpReportAllowDragMove | xtpReportAllowDragCopy | xtpReportAllowDrop); GetReportCtrl().GetPaintManager()->SetHeaderRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->SetFooterRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->SetDrawGridForEmptySpace(TRUE); GetReportCtrl().GetPaintManager()->SetFreezeColsDividerStyle(xtpReportFreezeColsDividerThin | xtpReportFreezeColsDividerShowAlways); GetReportCtrl().GetColumns()->GetFirstVisibleColumn()->SetAutoSize(FALSE); GetReportCtrl().m_bDesktopTrackerMode = FALSE; GetReportCtrl().RedrawControl(); } 
 -------------
 Mark Doubson, Ph.D.
 |