BI Publisher Media Object Sizing

Mike Mackinnon

Well Known Member
I have a word document (RTF) where I am inserting a media object into a table cell. The problem I am having is that I would like to only output the first 3 lines of the media object text or basically limit the size of the table row/cell to be a specific height. I have tried using the "Row height is exactly:" feature and some other formatting tricks but cannot seem to get this right.

What is happening is that it works fine for media object text attachments with a 3 or less lines but anything over causes the form to push the other information down the page and onto a second page (which is unacceptable).

I would also be accepting of the possibility of loading the media object attachment line-by-line in the associated E1 UBE but do not think this is possible because of the way the media object is stored (like a data blob). Media object is from F4801A.

Has anyone run into this issue or seen this before? Thanks.

Mike MacKinnon
IMP Group International
MS Word 2010
BI Desktop Publisher 11.1.1.6
EnterpriseOne tools RL 9.1, Application RL 9.0
 

johndanter

Legendary Poster
Hi Mike

I am not sure how to do it in the template itself, but could you not limit the MO text in the actual UBE that generates the XML values anyway?
Use substr or just move the MO text into a field of a certain length.
That way the UBE is looking after it for you and will ensure it never exceeds what you want

If you need to get clever and stop the text in a space not mid word, you can do that too

Plus....

There is a BSFN that may help B76H3B40 MODULES GetFirstMediaObjTextLine GetNextMediaObjTextLine should help
In fact there are a few that do the same kind of thing
B7430040
B76A0470

I am not sure if the GT is hardcoded or not though
 
Last edited:

Mike Mackinnon

Well Known Member
Thanks John!

I agree the best to attack this is to try and fix prior to getting to the loading of the template in Word.

I will give some things you said a try possibly starting with the BSFN as I would like to output the lines instead of possibly truncating something that might be important to the user.
It is easier to say "3 lines" are available instead of "240 characters" not that I have anything against twitter :)
 

Mike Mackinnon

Well Known Member
This seems to work (no C code):

=======================================================================
SECTION: Work Order Master File - GROUP [GROUP SECTION] (S4)
=======================================================================
OBJECT: SECTION
EVENT: Do Section
-----------------------------------------------------------------------
evt_ControlCharacter_PCHR
OPT: Using Defaults
0001 RV Media Object - Line 1 = ""
0002 RV Media Object - Line 2 = ""
0003 RV Media Object - Line 3 = ""
0004 //
0005 Media Objects(GT4801A, <Get Text>, RV Media Object - FULL, BC Document (Order No, Invoice, etc.) (F4801)(DOCO))
0006 //
0007 Get New Line Character
VA evt_ControlCharacter_PCHR <- BF cNewLineCharacter
0008 Parse Delimited String
RV Media Object - FULL -> BF szInputObjectID
RV Media Object - Line 1 <- BF szOutputObjectSegment
<Blank> -> BF mnSegmentNumber
VA evt_ControlCharacter_PCHR -> BF cDelimiter
0009 Parse Delimited String
RV Media Object - FULL -> BF szInputObjectID
RV Media Object - Line 2 <- BF szOutputObjectSegment
"1.00" -> BF mnSegmentNumber
VA evt_ControlCharacter_PCHR -> BF cDelimiter
0010 Parse Delimited String
RV Media Object - FULL -> BF szInputObjectID
RV Media Object - Line 3 <- BF szOutputObjectSegment
"2.00" -> BF mnSegmentNumber
VA evt_ControlCharacter_PCHR -> BF cDelimiter
0011 //
0012 // TEST - Put ONLY THREE Media Object Lines Back Together!!!
0013 RV ReConstituted Media Object = concat([RV Media Object - Line 1],[RV Media Object - Line 2])
0014 RV ReConstituted Media Object = concat([RV ReConstituted Media Object],[RV Media Object - Line 3])
 
Call Orchestrations From Excel – The Easy Way to Make the Orchestrator Work for You.

jileto

Well Known Member
People tend to forget that the BIP template builder is a plugin to Word. One way to look at the problem is to treat it as a RTF/Word Doc problem.

If you want to restrict the Media Object text to a fixed size cell, then do just that. Make the cell fixed size. How to do this...

On table properties (TP) Tables/Options, uncheck the "Automatically resize to fit contents" option.

On TP Row specify a fixed height row. For example, specify that the height is exactly 3 millimeters (that's 1 line if using MS Arial Unicode 9pt).

On TP Column set preferred width for the column, as preferred.

On TP Cell, set preferred width of the cell, as preferred. More importantly, click on cell options and uncheck the text wrap and fit text options.

What you'll end up with is box that will not resize and will only display as much text as will fit. No need to manipulate the data in the UBE if you don't mind BIP truncating the text.
 
Top