Print Page | Close Window

Problem with Header & Footer

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=8014
Printed Date: 22 November 2024 at 1:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with Header & Footer
Posted By: zaksoft
Subject: Problem with Header & Footer
Date 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




Replies:
Posted By: zaksoft
Date Posted: 17 September 2007 at 7:03am
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



Posted By: zaksoft
Date Posted: 17 September 2007 at 10:41am

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



Posted By: sserge
Date Posted: 20 September 2007 at 6:03pm

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.

--
WBR,
Serge



Posted By: zaksoft
Date Posted: 21 September 2007 at 12:37am
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



Posted By: zaksoft
Date Posted: 21 September 2007 at 12:41am
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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net