Problem with Header & Footer |
Post Reply |
Author | |
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
Posted: 15 September 2007 at 7:39am |
Just open your ReportControl.ReportSample and insert both align and newline in Header and/or footer...
You can try this (space before and after control bytes to enhance reading - some result without)
Header: >>>
Row1 Left &b Row1 Center &b Row1 Right \n Row2 Left &b Row2 Center &b Row2 Right \n Row3 Left &b Row3 Center &b Row3 Right
<<< Footer: >>>
Footer 1 Left \n Footer 2 Left &b Footer 2 Center \n This is third line
<<<
|
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
|
Simpler example:
insert into header:
Row1\n&bRow2
Hope this help to solve the problem-
|
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
|
The core of the solution is _SplitFormatLCR() on xtpdrawhelpers.cpp. The solution is to write R1 C1\nR2 C1\nR3 C1&bR1C2\n\nR3C2&bR1C3; pratically instead of inserting from left to right and from top to bottom the function split only column dividers ( &b) and the renderer leaves newlines.... You have to insert from top to bottom and then repeat for each column- I think this must be adjusted in future release, at present I've made my own function to split in the usual way. |
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi, Your
logic looks strange for me. You call this as a usual way, but where is it
usual? Our
logic is following: -
Using &b tag you can divide string for 3 parts: left, center, right. - Each part is processed separately. EXAMPLE: Row1
Left \n
Row2 Left \n Row3 Left &b Row1 Center \n Row2 Center \n Row3 Center &b Row1 Right \n Row2 Right \n Row3 Right This
logic looks easy and I don’t want to change it at least for compatibility
reasons. But I can add some
notification from CXTPPrintPageHeaderFooter::FormatTexts to allow customizing of this behavior. I
mean in this event you will get string in format which you like and convert it
to format which I like . This looks like a more universal solution. Somebody may support custom parameters using
this mechanism. |
|
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
|
In all program if you set both column breakers and line breakers you can mix them, in many program I use I set ( as I read and write)
Row1 Left &b Row1 Center &b Row1 Right \n Row2 Left \n &b Row2 Center &b Row2 Right \n Row3 Left &b Row3 Center &b Row3 Right \n &b &b Row4 Right
I can of course change as I did the format function, but if
_SplitFormatLCR() simply take in account both &b and \n ( now only &b are interpreted) will be a great enhancement and a simpler approach for the user that can enter as above in a PageSetup procedure like the one you oprovide in example.
Thanks,
|
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
|
Sorry for the wrong string, of course after Row2 Left there is no line break, the correct one (an more user friendly) is
Row1 Left &b Row1 Center &b Row1 Right \n Row2 Left &b Row2 Center &b Row2 Right \n Row3 Left &b Row3 Center &b Row3 Right \n &b &b Row4 Right
Thanks again for your support. |
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
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 |