IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Page 1 of 2 1 2 >
Topic Options
#49544 - 10/01/14 02:19 PM Line break in data field question
Kels Offline
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
#49545 - 10/01/14 02:29 PM Re: Line break in data field question [Re: Kels]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 316
Loc: London, UK
You will have to post the code - there must be a CRLF in the data or code somewhere.

Is this a custom data selection or a standard one where you select the lines and columns?

NB: Clearly it should be mentioned that if you are using a text box as opposed to a data selection it could be a simple issue involving the width of the text box.


Edited by jim3108 (10/01/14 02:37 PM)

Top
#49547 - 10/01/14 03:14 PM Re: Line break in data field question [Re: Kels]
Kels Offline
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
#49549 - 10/02/14 04:10 AM Re: Line break in data field question [Re: Kels]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 316
Loc: London, UK
If you could post the data, I could diagnose for sure but yes - I suspect the crlf is causing the text to wrap.

Top
#49557 - 10/02/14 12:26 PM Re: Line break in data field question [Re: Kels]
Kels Offline
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:

Code:
      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(&currentiteration)+']/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
#49570 - 10/03/14 06:02 AM Re: Line break in data field question [Re: Kels]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 316
Loc: London, UK
Is this a user-defined emulation in the data or a press talk object on the page?

Top
#49580 - 10/03/14 12:21 PM Re: Line break in data field question [Re: Kels]
Kels Offline
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
#49586 - 10/06/14 02:21 PM Re: Line break in data field question [Re: Kels]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 316
Loc: London, UK
Ok - without some context in which to test this it is going to be difficult to diagnose the problem in my imagination.

Can you perhaps link to the data and the PP7 or better still email me and I'll have a quick look?

Best regards,

Top
#49587 - 10/06/14 02:46 PM Re: Line break in data field question [Re: Kels]
Kels Offline
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:

Code:
  %-----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(&currentiteration)+']/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(&currentiteration)+']/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(&currentiteration)+']/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]
Kels Offline
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
Page 1 of 2 1 2 >