Click here to Skip to main content
Click here to Skip to main content

Report control - with category

By , 14 Oct 2005
 

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)

About the Author

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

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralNot working with VS 2010memberMember 17562322 Oct '10 - 14:09 
Generalhelp to add a new controlmembergeorgesb317 Jul '10 - 1:13 
GeneralBug?: Resizing column with windows-setting "Do not resize window"memberSiegmund Frenzel15 May '07 - 2:20 
AnswerRe: Remote Desktop/WTS Bugmemberandre arpin5 Apr '07 - 8:43 
GeneralAccessing items GetItemTextmemberandre arpin3 Mar '07 - 3:04 
GeneralRe: Accessing items GetItemTextmemberandre arpin3 Mar '07 - 3:06 
GeneralQuestion. This set of classes used as static library ....memberxSoptik30 Oct '05 - 21:46 
Hello, I try to use this class as a static library but there is a lot of unsolved warnings. Can you help me what I do bad? Because there is no error in your samle code.
 
Thanks. xSoptik
 

------ Build started: Project: clReportCtrl, Configuration: Debug Win32 ------
 
Deleting intermediate files and output files for project 'clReportCtrl', configuration 'Debug|Win32'.
Compiling...
stdafx.cpp
WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
Compiling...
ReportOptionsCtrl.cpp
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(433) : warning C4311: 'type cast' : pointer truncation from 'CRuntimeClass *' to 'DWORD'
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(451) : warning C4311: 'type cast' : pointer truncation from 'CRuntimeClass *' to 'DWORD'
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(500) : warning C4312: 'type cast' : conversion from 'DWORD' to 'CRuntimeClass *' of greater size
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(754) : warning C4244: '=' : conversion from 'LRESULT' to 'BOOL', possible loss of data
ReportCtrl.cpp
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(446) : warning C4267: '=' : conversion from 'size_t' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(902) : warning C4244: 'return' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1060) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1090) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1111) : warning C4244: 'return' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1116) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1367) : warning C4267: 'return' : conversion from 'size_t' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1434) : warning C4244: 'return' : conversion from 'LPARAM' to 'DWORD', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1537) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1602) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1612) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1723) : warning C4244: 'return' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1844) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1882) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1898) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2061) : warning C4312: 'type cast' : conversion from 'UINT' to 'LPCTSTR' of greater size
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2243) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2244) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2351) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2373) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2388) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2407) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2450) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2465) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2484) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2490) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2494) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2597) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2642) : warning C4244: '=' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2862) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2950) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2977) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3101) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3267) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3432) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3566) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3644) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3700) : warning C4244: 'return' : conversion from 'LRESULT' to 'BOOL', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3866) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3900) : warning C4311: 'type cast' : pointer truncation from 'CReportCtrl::LPTREEITEM' to 'ULONG'
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3986) : warning C4244: 'argument' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3998) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4048) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4070) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4139) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4249) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4276) : warning C4244: 'return' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4291) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4334) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4942) : warning C4244: '=' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(5008) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(5246) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(5298) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(6749) : warning C4244: '=' : conversion from '__w64 int' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7097) : warning C4244: 'argument' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7125) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7282) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7295) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7334) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7432) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7478) : warning C4244: 'argument' : conversion from 'ULONG_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7537) : warning C4244: '=' : conversion from 'DWORD_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7580) : warning C4244: '=' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7842) : warning C4244: '=' : conversion from 'WPARAM' to 'UINT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7948) : warning C4244: '=' : conversion from 'WPARAM' to 'UINT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8047) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8334) : warning C4244: 'initializing' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8532) : warning C4244: 'initializing' : conversion from 'ULONG_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8550) : warning C4244: 'initializing' : conversion from 'ULONG_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8610) : warning C4312: 'type cast' : conversion from 'INT' to 'LPCTSTR' of greater size
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8650) : warning C4244: 'argument' : conversion from 'WPARAM' to 'INT', possible loss of data
FlatHeaderCtrl.cpp
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1118) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1124) : warning C4244: '=' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1212) : warning C4244: 'initializing' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1378) : warning C4244: '=' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1394) : warning C4244: 'argument' : conversion from '__w64 int' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1706) : warning C4244: 'initializing' : conversion from 'LRESULT' to 'INT', possible loss of data
Generating Code...
Creating library...
 
Build log was saved at "file://d:\DevCom\Projects\lib\clReportCtrl\Debug\BuildLog.htm"
clReportCtrl - 0 error(s), 81 warning(s)
 

---------------------- Done ----------------------
 
Build: 1 succeeded, 0 failed, 0 skipped

GeneralRe: Question. This set of classes used as static library ....memberandre arpin31 Oct '05 - 6:28 
GeneralBUG FoundmemberPandele Florin12 Oct '05 - 22:14 
AnswerRe: BUG Foundmemberandre arpin13 Oct '05 - 4:22 
GeneralRe: BUG Foundmemberandre arpin13 Oct '05 - 12:28 
GeneralThanks for the article. Notice about ReportDemo sources.memberdido2k12 Oct '05 - 11:55 
GeneralRe: Thanks for the article. Notice about ReportDemo sources.memberandre arpin13 Oct '05 - 3:32 
GeneralIt's exactly what i am finding!memberAngus He14 Jul '05 - 16:38 
GeneralUNICODE compile (VC6)memberJohn A. Johnson14 Jul '05 - 2:27 
GeneralRe: UNICODE compile (VC6)memberandre arpin14 Jul '05 - 4:25 
GeneralGreat job...memberMaarten Hoeben13 Jul '05 - 23:07 
GeneralRe: Great job...memberandre arpin14 Jul '05 - 2:15 

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

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 14 Oct 2005
Article Copyright 2005 by andre arpin
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid