This topic contains 3 replies, has 0 voices, and was last updated by GAJ 8 years, 9 months ago.

  • Author
    Posts
  • #2905

    mharrington

    I have scripted a search to a Rich Text Field (see attachment) – everything looks perfect except for the formatting. Each column is aligned to the left – is there any way to right align columns? I have tried to use the WYSIWYG editor to right align and also used the source code but this Rich Text Field is resistant to format in any way. I am 95% of the way completed on this, but the formatting is a problem.

    I tried using an inline HTML field instead of the Rich Text… the script does not save the results to this field because the store value is automatically unchecked on inline HTML fields.

    Any ideas? If a RTF cannot be formatted, is there any way to summarize items within the Source Code of Advanced PDF so I can format columns? Extra simple – two columns: item and amount with items grouped and amounts summed.

    Thanks in advance,

    Mike Harrington

    Attached Files

    Rich Text Item Summary.txt

    (992 Bytes, 1 view)
    This is a cached copy. Click here to see the original post.

  • #2906

    Nelliott

    Not really addressing your question directly but is there a reason you don’t do this directly in the template?

    I’m thinking something like this (I appreciate this is items on the record currently in scope and may not be what you’re looking for):

    Code:
    0)>

    ${item.item.label} ${item.quantity.label} ${item.units.label} ${item.description.label} ${item.amount.label}
    ${item.item.text} ${item.quantity} ${item.units!} ${item.description} ${item.amount}
  • #2907

    mharrington

    Netelliott,

    I need two sections on my invoice: one is a list of detailed lines for each work order we bill and a summarized section at the top that totals all items supplying the amount. I am already using one table for the detail that looks exactly like what you suggested. I scripted the summary into a Rich Text field and it works, just have the left-align formatting issue.

    I thought about using additional lines (in the line item section) for the summary(so both detail and summary lines would be in line item section), but not sure how to filter summary lines in one section and detail in another. Thank you for suggesting this though.

    MH

  • #2908

    GAJ

    I had a similar problem. May be something in this you can use.

    I started with two columns in a PDF/HTML Template, the item number then the item description.

    The description often varied, and over-filled the width of the

    cell.

    PDF always justified it left-to-right, even separating the letters in the words.

    HTML rendered it correctly, i.e. left justified, while with the PDF version, no matter what CSS attributes I added, always rendered a justified version.

    My solution was to display the description beneath the item number and use:

    Code:

    align=”left” style=”width: 25%; white-space: nowrap;>${item.item}
    ${item.description}

    The important point here is the white-space: nowrap and that the right adjacent column was a one-line value.

    The description display could extend beneath it.

    In another template report, the right adjacent column was the item image, i.e. not a one-line value.

    I just placed it to the left of the Item/Item Description column.

    Twas a hard fought battle.

    Hope this helps.

You must be logged in to reply to this topic.