Click here to Skip to main content
15,884,353 members
Articles / Desktop Programming / MFC
Article

Report control - with category

Rate me:
Please Sign up or sign in to vote.
4.66/5 (18 votes)
14 Oct 2005CPOL 102.1K   3.1K   78   19
A report control - with category.

Sample Image

Introduction

Version 3.0.2 supports UNICODE. Thanks John A. Johnson for the hints. This version of report control supports a graphic view for tree and categories. The best way to see all the supported features is to compile the demo and try it.

Background

This code is based on Maarten Hoeben's report control and is compatible with this control.

  • Compile with either VC 6 or VC 7.
  • Supports UNICODE.
  • Supports grouping by categories.
  • Supports graphical tree display.
  • Fixed various scroll problems.
  • Fixed auto sizing the columns.
  • Fixed header match window width.
  • Supports time.
  • Time for category displays Today, Tomorrow etc.
  • Uses a stable sort.
  • Added popup menu to select category.
  • Shift key can be used to resize a column without modifying header size.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Canada Canada
I have been programming since 1960 in many places, in too many environments and languages. Retired and just doing this for a hobby.

Comments and Discussions

 
GeneralNot working with VS 2010 Pin
Member 17562322-Oct-10 14:09
Member 17562322-Oct-10 14:09 
GeneralRe: Not working with VS 2010 Pin
alannx17-Jan-14 21:53
alannx17-Jan-14 21:53 
Generalhelp to add a new control Pin
georgesb317-Jul-10 1:13
georgesb317-Jul-10 1:13 
GeneralBug?: Resizing column with windows-setting "Do not resize window" Pin
Siegmund Frenzel15-May-07 2:20
Siegmund Frenzel15-May-07 2:20 
Hi,
I do not know the name of the english setting: Go to desktop, click right mouse button / settings / effects / deactivate the option which moves the whole window.
If you are resizing a window, only the small borders are resized. You have to release the mouse button to have the window be redrawn.
(Perhaps on a WTS you have the same settings)

With that settings, open the demo and try to resize columns. That does not work. You can see the small vertical bar which indicates the current mouse position. If you release the button, nothing happens.

I haven't researched the reason but found the lines of codes which introduced that bug.

<br />
void CFlatHeaderCtrl::OnLButtonUp(UINT nFlags, CPoint point)<br />
{<br />
...<br />
... <br />
    m_LButtonUp = TRUE;    <br />
    CHeaderCtrl::OnLButtonUp(nFlags, ptClickPoint);<br />
    m_LButtonUp = FALSE;    <br />
    m_bResizing = FALSE;<br />
    m_bFixWidth = FALSE;<br />
}


After removing the bold lines of code, the resizing of columns does work with these settings.

Perhaps that helps
Ciao
Siegmund
AnswerRe: Remote Desktop/WTS Bug Pin
andre arpin5-Apr-07 8:43
andre arpin5-Apr-07 8:43 
GeneralAccessing items GetItemText Pin
andre arpin3-Mar-07 3:04
andre arpin3-Mar-07 3:04 
GeneralRe: Accessing items GetItemText Pin
andre arpin3-Mar-07 3:06
andre arpin3-Mar-07 3:06 
GeneralQuestion. This set of classes used as static library .... Pin
xSoptik30-Oct-05 21:46
xSoptik30-Oct-05 21:46 
GeneralRe: Question. This set of classes used as static library .... Pin
andre arpin31-Oct-05 6:28
andre arpin31-Oct-05 6:28 
GeneralBUG Found Pin
Pandele Florin12-Oct-05 22:14
Pandele Florin12-Oct-05 22:14 
AnswerRe: BUG Found Pin
andre arpin13-Oct-05 4:22
andre arpin13-Oct-05 4:22 
GeneralRe: BUG Found Pin
andre arpin13-Oct-05 12:28
andre arpin13-Oct-05 12:28 
GeneralThanks for the article. Notice about ReportDemo sources. Pin
dido2k12-Oct-05 11:55
dido2k12-Oct-05 11:55 
GeneralRe: Thanks for the article. Notice about ReportDemo sources. Pin
andre arpin13-Oct-05 3:32
andre arpin13-Oct-05 3:32 
GeneralIt's exactly what i am finding! Pin
Angus He14-Jul-05 16:38
Angus He14-Jul-05 16:38 
GeneralUNICODE compile (VC6) Pin
andyj11514-Jul-05 2:27
andyj11514-Jul-05 2:27 
GeneralRe: UNICODE compile (VC6) Pin
andre arpin14-Jul-05 4:25
andre arpin14-Jul-05 4:25 
GeneralGreat job... Pin
Maarten Hoeben13-Jul-05 23:07
Maarten Hoeben13-Jul-05 23:07 
GeneralRe: Great job... Pin
andre arpin14-Jul-05 2:15
andre arpin14-Jul-05 2:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.