Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - removing items off a GroupBy area
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

removing items off a GroupBy area

 Post Reply Post Reply
Author
Message
Russ View Drop Down
Groupie
Groupie
Avatar

Joined: 21 September 2003
Location: Russian Federation
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Russ Quote  Post ReplyReply Direct Link To This Post Topic: removing items off a GroupBy area
    Posted: 04 January 2006 at 3:58am
Hi,

I like the way removing off of items is done in the ReportSample. But I cannot achieve the same result in my view class inherited from CXTPReportView. And I cannot find any specific code in the sample that enables this functionality:

1. A black cross shown over the column's label when user drags and moves the label out of the GroupBy area.
2. removed column returns back to the control

I tried adding m_wndReport.ShowGroupBy() into sample's CTaskListView::OnCreate method. When I open Task Report sample it behaves exactly what I see in my own report view, i.e. it does not remove column's label off the groupBy area.

So what is the trick?

Thank you.
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: 04 January 2006 at 10:12am
Rouslan,

Please ensure you call Populate() method after changing GroupBy structure.

Following piece of code inserted into the end of CTaskListView::OnCreate method works fine for me:

wndReport.ShowGroupBy();
CXTPReportColumn* pCol = wndReport.GetColumns()->Find(COLUMN_STATUS);
wndReport.GetColumns()->GetGroupsOrder()->Clear();
wndReport.GetColumns()->GetGroupsOrder()->Add(pCol);
wndReport.Populate();


--
HTH,
Serge
Back to Top
Russ View Drop Down
Groupie
Groupie
Avatar

Joined: 21 September 2003
Location: Russian Federation
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Russ Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2006 at 10:36am
I did try that but no luck. but I also tried to use this

m_wndReport.GetReportHeader()->AllowColumnRemove(TRUE);

this solved the first half of the problem. Now i can see the black cross when move the label outside of the GroupBy area..

Is there any way to have the removed column header to go back to the control. Maybe I could intercept something somewhere :) and add the column being removed back to the report control.


Thank you

PS: I am using xtp 9.51.
PSS: Сергей, что есть "НТН"? :)
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: 04 January 2006 at 1:05pm
Wow, sorry, you should have started from the version you're using...

1) This option had an inverse default value previously :)

2) Little bit more details please if possible. Which action causes a removed column return?

pps: HTH = Hope that helps  ;-)

--
WBR ,
Serge
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.187 seconds.