Formatting text is really tricky in Crystal. If the font is not proportional, it will be easier as you can give a max count on the number of characters that will fit in a column. You will need to think about looking for the last space that is before this limit to keep whole words together.
I think that you could use 1 formula to drive your 2 text boxes. For each new detail line (long text) I would reset the variable to 0. The formula itself would parse the string to be displayed and update the variable to where it is in the text.
I am think that this will work, because I think that Crystal processes report objects from left to right and top to bottom...I could be wrong in this.
Some sample code:
In the group header or a 'dummy' detail section above the detail to be displayed I would put a formula like:
shared numbervar lastchar := 1;
"" //list will effective hide the value of the formula from display
in the detail section there would be 2 instances of this formula:
shared numbervar lastChar;
local numbervar lastSpace;
local stringvar displayMe := substring({table.field}, lastChar, lastChar + 1000);//just made up the 1000 as limit to be displayed
lastSpace := instrrev(displayMe, " "); // find the last space
displayMe := LEFT(displayMe, lastSpace - 1);
lastChar := lastChar + lastSpace; //update the counter
displayMe //show the text
At least that would be my first attempt.
HTH
d
|