Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old December 22nd, 2017, 12:03 PM
Kim Kim is offline
Regular Contributor
 
Join Date: Sep 2008
Posts: 69
Default My First Table - help!

Hi everyone,

So I know it's right before Christmas and the last thing anyone is going to do is look at this board, but maybe Dan or Ste or somebody is out there?? ;-)

I'm attempting my first table with multi-line record use. I've got a letter that's going to include a section with a report of dates and amounts in columns. There will be varying numbers of dates and amounts for each letter.

I've worked out the easy part of telling Fusion I've got multi-line and telling it to change based on the Company name field. And I've got the basics of a table set.

What I am trying to figure out is can I make it flow the data into columns...
My letter layout allows 6 columns (so 3 groups of Date Amount columns).
One company may have 25 lines of dates and amounts while another has 6 or 10, etc.

Can Fusion flow that info into columns, or will I have to massage the data into columns?

I'm attaching a screen grab to illustrate what I need and here's the start of my table code: (since I don't know how to flow the info, it's just repeating the same info in each column group right now - but I wanted to give you what I've got so far...)

Code:
var table = new FPTable();
table.AddColumns(7200,8500,7200,8500,7200,8500);

var data = FusionPro.GetMultiLineRecords();
for (var rec = 1; rec <= data.recordCount; rec++)
{
function ExField(str) 
{ return TaggedTextFromRaw(data.GetFieldValue(rec, str)); }


var content = ["Date","Amount","Date","Amount","Date","Amount"].map(ExField);

var row = table.AddRow();

row.SetContents.apply(row, content);

// row.Cells[0].Margins = row.Cells[1].Margins = { Top:0, Bottom:0, Left:0, Right:0 };

}


return table.MakeTags();
Thanks!
Kim
Attached Images
File Type: jpg TableSample.jpg (36.4 KB, 24 views)
__________________
Fusion Pro Desktop 10.0.16 & Server • Acrobat Pro DC • Mac OSX 10.12
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.