Page 1 of 1

multiline text object not working in page footer

PostPosted: Tue Sep 11, 2018 7:28 am
by alf1976
Hi
I have a field which runs on a textarea control which can contain multiple lines of text.
i want this information to appear on the report in the page footer

The field control on the report displays the mulitple lines of text but only if the field is the detail section.
It does not show the multiple lines when it is in the page footer.

Andrew

report.png
report.png (92.39 KiB) Viewed 854 times

Re: multiline text object not working in page footer

PostPosted: Wed Sep 12, 2018 10:57 am
by admin
Andrew,

Page Headers and Footers can't grow - if they did they may become longer than the page and lock up.

Steven

Re: multiline text object not working in page footer

PostPosted: Fri Sep 14, 2018 7:59 am
by alf1976
Ok. i worked out a way to split the field into five separate lines using the following sql code. So now i have 5 field obejcts in the page footer to display the text. Its a long winded fudge but it does the trick. Hopefully the user will not use more than five lines of text

Code: Select all
SELECT

SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',1),'\n',-1) as line1,

IF(STRCMP(SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',1),'\n',-1),
           SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',2),'\n',-1)),
   SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',2),'\n',-1),'') as line2,
   
IF(STRCMP(SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',2),'\n',-1),
           SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',3),'\n',-1)),
   SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',3),'\n',-1),'') as Line3,

IF(STRCMP(SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',3),'\n',-1),
           SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',4),'\n',-1)),
   SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',4),'\n',-1),'') as Line4,

IF(STRCMP(SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',4),'\n',-1),
           SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',5),'\n',-1)),
   SUBSTRING_INDEX(SUBSTRING_INDEX(DeliverySpecialInstructions,'\n',5),'\n',-1),'') as Line5
FROM `Delivery` WHERE DeliveryID ='#RECORD_ID#'

Re: multiline text object not working in page footer

PostPosted: Fri Sep 14, 2018 1:33 pm
by admin
Andrew,

I think that is the way to go.

Steven