Jump to content

External Data File and OnCopyfit


Maria

Recommended Posts

I have created a template using information I found here on External Data Files. I have clicked the box for do not break on copyfit for each variable field and clicked the adjust text to fit button for the text frame. My data is pulled successfully from my spreadsheet, but lines of text are breaking and not shrinking to fit. How can I get shrink to fit to work?

 

Here is a part of my external data rule.

It is the address field that is breaking into 2 lines:

 

if (externalDF.GetFieldValue(recordWalker, 'Store Name') == Field("Choose your Location"))

{

//Check to see if this is a TAX item. If it is, let's format it differently

if (externalDF.GetFieldValue(recordWalker, 'Product-Purchased') == 'Tax')

{

returnStr += '<br><b>Total Tax - ' + externalDF.GetFieldValue(recordWalker, 'Price') + '</b>';

 

}

else //OK - so this is a normal product - not a Tax item

{

returnStr += externalDF.GetFieldValue(recordWalker, 'Address')+'<br>'

returnStr += externalDF.GetFieldValue(recordWalker, 'City, ST Zip')+'<br>'

returnStr += ("Telephone: ") + externalDF.GetFieldValue(recordWalker, 'Work Phone')+'<br>'

returnStr += ("Email: ") + externalDF.GetFieldValue(recordWalker, 'Store Email');

 

}

}

}

 

return returnStr;

 

Thanks for your help

Maria

Link to comment
Share on other sites

You have <br> tags in the text you're returning from your rule. These always cause a line break. Do you want line breaks between the address, city/state/ZIP, and phone number lines? If so, you should turn off the "do not break on copyfit" setting. Of course, either way, the copyfitting can't shrink the text to make fewer lines. So you may need to change the copyfitting type, the minimum size, or the magnification factor in MagnifyAttributes object in the OnCopyfit callback rule so that it can do something else to make the text fit.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...