Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - multi row header feature
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

multi row header feature

 Post Reply Post Reply
Author
Message
brucerain View Drop Down
Newbie
Newbie


Joined: 13 March 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote brucerain Quote  Post ReplyReply Direct Link To This Post Topic: multi row header feature
    Posted: 07 October 2007 at 10:12pm
Will Codejock support multi-row header feature?

Thanks!
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 09 October 2007 at 2:10pm
Multiline text is supported for the header in the same way as for cells.
Set FixedRowHeight to FALSE and add WordBreak flag to Alignment.
Also you may use ‘\n’ char in the header text.

--
WBR,
Serge
Back to Top
johnlewe View Drop Down
Newbie
Newbie
Avatar

Joined: 26 October 2007
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnlewe Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2007 at 10:38am
I did try this and it works to a point, however, if some header columns have 3 lines of text and some just have 1 line of text, the column header with the 1 line of text is centered vertically in the column header which looks bad and is not the standard display arrangement for column headings that have a mixture of 1,2, and 3 line column headings.

ReportControl:

----------------------
Vendor
Part      Quantity
Number
----------------------

Display Standard:

----------------------
Vendor
Part
Number    Quantity
----------------------

In other words, they column heading text should start vertically from the bottom, so if only 1 line of text it is on the bottom line, if 2 lines of text then it is on the bottom 2 lines, etc.
John Lewe
Orlando, FL
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2007 at 3:12pm
To adjust, add newlines before or after your text as many you need to adjust at top, center or bottom.
Back to Top
johnlewe View Drop Down
Newbie
Newbie
Avatar

Joined: 26 October 2007
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnlewe Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2007 at 10:03am
Thanks, that is definately a work-around (although tedious), but other controls do this for you automatically. The purpose for 3rd party controls is to take the drudgery out of the equation.
John Lewe
Orlando, FL
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2008 at 4:39am
I believe this feature request is similar to mine. I want to add a row just below the header, with filtering options. This row must not be movable!
 
|----------------------------------------|
| Date |  Folder       | Description |
|----------------------------------------|
| DATE | COMBO \/  | EDIT           | <--- filtering using different controls!
|----------------------------------------|
|Row 1...                                     |
|Row 2                                        |
|Row n...                                     |
|----------------------------------------|
 
Is this possible with the current implementation?
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2008 at 6:40am
Hi;
I did it this way:
 
GetHeaderRecords()->Add(new CStateReportRecord());
HeaderRowsAllowEdit(TRUE);
ShowHeaderRows(TRUE);
 
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
zaksoft View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2003
Location: Italy
Status: Offline
Points: 162
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaksoft Quote  Post ReplyReply Direct Link To This Post Posted: 29 February 2008 at 12:16am
I'm also interested in this, but where CStateReportRecord() comes from ? Any sample code to show how it is derived from CXTPReportRecord ?
 
TIA
VS2022 - MFC MBCS Statically linked

XTP 23.1 Static Link

---------------------------------------------------------

Davide Zaccanti - ZakSoft - www.zaksoft.com

Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 29 February 2008 at 2:44am
zaksoft, you could use any record class. See CMessageRecord in ReportSample.
Back to Top
Kurisu View Drop Down
Newbie
Newbie


Joined: 28 February 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kurisu Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2008 at 4:14pm
Just reading the tips here... I have a question regarding the Multiline Headers.

When Alignment is combined with the break line flag I can only seem to get it to respect my alignment flag for cells and not the header itself.

i.e.

nAlign = m_bMultilineSample ? (xtpColumnTextCenter | DT_WORDBREAK) : (nAlign & (~DT_WORDBREAK));

 pColumn->SetAlignment(nAlign); <--- Is Centered.. Works!
 pColumn->SetHeaderAlignment(nAlign); <--- Always left Aligned?

Is there a way to get CENTERED multiline headers?
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2008 at 2:54am
If you ask me, the header/footer rows are quite buggy. I think I have posted like 5 buts regarding them...
 
Hence, if you suspect a bug, post it. With a bit of luck, they will be fixed in v12 :)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.