![]() |
Auto Numbering |
Post Reply
|
| Author | |||
umair
Groupie
Joined: 30 November 2017 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Topic: Auto NumberingPosted: 01 March 2018 at 1:41am |
||
|
Hello,
How to set Auto Numbering Column to not to sort when sorting other column in Report Control? Please Help. |
|||
![]() |
|||
olebed
Senior Member
Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(1)
Quote Reply
Posted: 06 March 2018 at 1:00am |
||
|
Hello,
You need to set CXTPReportPaintManager::m_bRecOrRowNum to FALSE.
Note that you should do this every time on change theme (set new PaintManager). Regards, Oleksandr Lebed |
|||
![]() |
|||
umair
Groupie
Joined: 30 November 2017 Status: Offline Points: 20 |
Post Options
Thanks(1)
Quote Reply
Posted: 06 March 2018 at 1:32am |
||
|
Its working! Thank You Oleksandr Lebed
Two more think i want to ask. 1) How to start Auto Numbering from 1 (not from zero)? 2)When I Print the report control, it print all data except Auto Numbering column which printing as empty? Please help |
|||
![]() |
|||
olebed
Senior Member
Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(1)
Quote Reply
Posted: 06 March 2018 at 2:40am |
||
|
I have tried with GridSample and it draws AutoNumbering column as expected.
It is not easy to guess what exactly interferes with printing. I can advice to open PrintPreview in your application and then set breakpoint in method CXTPReportRow::Draw() in line ~417
Then in PrintPreview press button Print. First column {#0} on breakpoint should be your AutoNumbering column. Execution should go to line ~530 with DrawRowNumber()
|
|||
![]() |
|||
umair
Groupie
Joined: 30 November 2017 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 March 2018 at 4:00am |
||
|
Thank You Oleksandr Lebed.
I resolved the issue as: if (pColumn->IsAutoNumbering()) { pPaintManager->DrawRowNumber(pDC, rcItem, pRow); } else { int nItemTextWidth = pItem->Draw(&drawArgs); } And also resolved the first issue as: GetPaintManager()->m_iRecOrRowStart = 1; |
|||
![]() |
|||
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |