#49544 - 10/01/14 02:19 PM
Line break in data field question
|
OL Toddler
Registered: 07/24/14
Posts: 49
|
I have an issue with a data field breaking to the next line when there is plenty of space in the field.
This first example is what appears to be working(staying to the same field):
abc123-abc123
Now this example seems to be breaking to the next line:
abc123 abc123
returns on the document as
abc123 abc123
So basically when it is a single string, I don't have any problems. But for some reason these specific fields break and I don't know why. I have other columns that are like example 2 and they don't break.
I could post code but, without proper context on what it is supposed to do it may not be much help. If needed however, I can provide.
Thanks OLforum
|
Top
|
|
|
|
#49547 - 10/01/14 03:14 PM
Re: Line break in data field question
[Re: Kels]
|
OL Toddler
Registered: 07/24/14
Posts: 49
|
Hey Jim,
It's a data selection sourced from an xml file. You are also correct that there is a crlf set at .15. However, that should still leave plenty of room as I adjusted this number rather high but am still seeing the same results.
Do you think it is the data itself? I find it odd that I have other cases where I have strings that have spaces and appear to be fine.
|
Top
|
|
|
|
#49557 - 10/02/14 12:26 PM
Re: Line break in data field question
[Re: Kels]
|
OL Toddler
Registered: 07/24/14
Posts: 49
|
Well, the code itself is pretty lengthy. But here is the specific block. Again, I think it may be missing some context: MoveTo(&fltTestPrintOffset + &gvDetailTable_flt_Col1Width,&gv_Y)
BeginParagraph(&fltTestPrintOffset + &gvDetailTable_flt_Col1Width + 0.08,&fltTestPrintOffset + &gvDetailTable_flt_Col1Width ,0.0000,'left',0.1667,False)
SetStyle(&styleAN7)
define(&Lv2, string, XmlGet('/one_show[1]/lineitems[1]/lineitem['+inttostr(¤titeration)+']/product_number[1]'))%product_number /rights_holder
if(NE(&Lv2, ''))
search(&Lv2,'\\n')
crlf(0.15) %strange as this should be sufficient
endsearch()
show(&Lv2)
endif()
EndParagraph()
if(gt(&gv_Y + &Current.Y,&fltRowHeight))
&fltRowHeight := &gv_Y + &Current.Y
endif()
|
Top
|
|
|
|
#49580 - 10/03/14 12:21 PM
Re: Line break in data field question
[Re: Kels]
|
OL Toddler
Registered: 07/24/14
Posts: 49
|
The column data that populates the fields via press talk. The data positioning is from a press talk object.
I tried everything. Moving the guides don't seem to do much either i'm afraid as I thought those were the original culprit.
|
Top
|
|
|
|
#49587 - 10/06/14 02:46 PM
Re: Line break in data field question
[Re: Kels]
|
OL Toddler
Registered: 07/24/14
Posts: 49
|
Actually I resolved the issue in that I recognize what is causing the issue. I am drawing columns next to each other. For example these 3 blocks are the columns. Notice that coordinates for each are right next to eachother. With longer strings (22 characters) it tends to kick over. So I essentially commented out those sections that were creating invisible borders: %-----column 1-------------------------
MoveTo(&fltTestPrintOffset,&gv_Y)
BeginParagraph(&fltTestPrintOffset + 0.08,&fltTestPrintOffset + &gvDetailTable_flt_Col1Width,0.0000,'left',0.1667,False)
SetStyle(&styleAN7)
define(&Lv1, string, XmlGet('/one_show[1]/lineitems[1]/lineitem['+inttostr(¤titeration)+']/format_name[1]'))
if(NE(&Lv1, ''))
search(&Lv1,'\\n')
crlf(0.15)
endsearch()
show(&Lv1)
endif()
EndParagraph()
if(gt(&gv_Y + &Current.Y,&fltRowHeight))
&fltRowHeight := &gv_Y + &Current.Y
endif()
%-----column 2-------------------------
%MoveTo(&fltTestPrintOffset + &gvDetailTable_flt_Col1Width,&gv_Y)
%BeginParagraph(&fltTestPrintOffset + &gvDetailTable_flt_Col1Width + 0.08,&fltTestPrintOffset + &gvDetailTable_flt_Col1Width ,0.0000,'left',0.1667,False)
% SetStyle(&styleAN7)
% define(&Lv2, string, XmlGet('/one_show[1]/lineitems[1]/lineitem['+inttostr(¤titeration)+']/rights_holder[1]'))
% if(NE(&Lv2, ''))
% search(&Lv2,'\\n')
% crlf(0.15)
% endsearch()
% show(&Lv2)
% endif()
%EndParagraph()
%if(gt(&gv_Y + &Current.Y,&fltRowHeight))
% &fltRowHeight := &gv_Y + &Current.Y
%endif()
%-----column 3--------------------------
MoveTo(&fltTestPrintOffset + &gvDetailTable_flt_Col1Width ,&gv_Y)
BeginParagraph(&fltTestPrintOffset + &gvDetailTable_flt_Col1Width + 0.08,&fltTestPrintOffset + &gvDetailTable_flt_Col1Width +&gvDetailTable_flt_Col3Width,0.0000,'right',0.1667,False)
SetStyle(&styleAN7)
define(&Lv3, string, XmlGet('/one_show[1]/lineitems[1]/lineitem['+inttostr(¤titeration)+']/product_number[1]')+ ' ')
if(NE(&Lv3, ''))
search(&Lv3,'\\n')
crlf(0.15)
endsearch()
show(&Lv3)
else()
show(&Lv3)
endif()
EndParagraph()
if(gt(&gv_Y + &Current.Y,&fltRowHeight))
&fltRowHeight := &gv_Y + &Current.Y
endif()
|
Top
|
|
|
|
#49590 - 10/06/14 03:36 PM
Re: Line break in data field question
[Re: Kels]
|
OL Toddler
Registered: 07/24/14
Posts: 49
|
Would there be a way that I could just replace the displayed data with something like (....) once a break is triggered? For example:
abc123 abc123
to
'abc123...'
|
Top
|
|
|
|
|
|