Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Tables & Charts

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 7th, 2013, 06:52 AM
BBE BBE is offline
Forum n00b
 
Join Date: Aug 2011
Posts: 8
Default Creating a Table

I have no experience creating tables and am in some need of direction. I have a customer who wants a variable letter with a table that can have any where from 2 rows to as much as 29 rows.(see attached pdf for a visual) There is static information below this table that needs to "move" with the table. If the table has more than 7 rows, part of the chart and the static information will run onto the next page. Is there any way to accomplish this?

I am using Acrobat X Vers 10.1.8, FP VDP 9.1.0
Attached Files
File Type: pdf USF Admin.pdf (46.9 KB, 56 views)
Reply With Quote
  #2  
Old November 7th, 2013, 07:19 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Creating a Table

You can create a text rule to return the table and then include that rule in the text frame that the rest of your content is in. That will allow the text beneath it to flow with the table. You can set up your template with an "overflow page" in order to have your text frame run onto the next page.

As far as the table creation goes, here is a good place to start.
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old November 7th, 2013, 07:27 AM
BBE BBE is offline
Forum n00b
 
Join Date: Aug 2011
Posts: 8
Default Re: Creating a Table

thank you for the response. I had found that post that you suggested earlier today and read over it, it just didn't make a whole lot of sense to me. I'll have to dig into it a little further and see if I can get it figured out. It's good to know what I need to figure out is possible.
Reply With Quote
  #4  
Old November 7th, 2013, 07:40 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Creating a Table

Where are you pulling the data from in order to populate your table?

If you could provide us with more information or perhaps upload your template with some sample data, someone could probably help you out with generating your table.
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #5  
Old November 7th, 2013, 08:08 AM
BBE BBE is offline
Forum n00b
 
Join Date: Aug 2011
Posts: 8
Default Re: Creating a Table

Sure. Attached is the data file and my collected files. I tried to insert what I needed from the post about tables. The table needs static headers as seen in the first post and then variable information below them. The static information below the table also contains a signature...do not know how to get that into a text frame or how to get it to move with the table...or how to get the copy to move to a 2nd page if there is too much information. I have done many variable things in the past, but nothing this complicated.
Attached Files
File Type: zip TEST2.zip (9.26 MB, 20 views)
File Type: zip DataFile.zip (803 Bytes, 24 views)
Reply With Quote
  #6  
Old November 7th, 2013, 08:31 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Creating a Table

I guess I don't understand how 1 record can produce more than 1 row in the table. You sent two data files. Are you supposed to reference one in order to populate the table?

As far as getting the verbiage to move with the table, you can either typeset the text below the table and create a rule to return the signature as an inline graphic like so:
Code:
<<TableRule>>

Eventis will continue...

Sincerely, 
<<Signature rule>>
Kari Juni
Signature rule (with "treat returned strings as tagged text" checked):
Code:
return '<graphic file="signature.jpg">';
Or you can make an image out of the bottom part of the letter and return that at the end of the table rule. The former solution will probably allow for better flow when an overflow page is needed.
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn

Last edited by step; November 7th, 2013 at 09:42 AM..
Reply With Quote
  #7  
Old November 7th, 2013, 08:52 AM
BBE BBE is offline
Forum n00b
 
Join Date: Aug 2011
Posts: 8
Default Re: Creating a Table

I'm struggling to figure out how else to explain it. attached is a pdf showing what the example the customer sent (top) and the database information (bottom). 1 database will be used and the fields in that database will feed information into the variable text field (or in this case the table) yes, the database will be referenced in order to populate the table..in the screen shot Columns D, E, and F will need to be put together as one field before it can be referenced
Attached Files
File Type: pdf chart example.pdf (793.1 KB, 43 views)
Reply With Quote
  #8  
Old November 7th, 2013, 09:56 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Creating a Table

Okay, I'm assuming you want every record in your data file to appear in the table. These are the steps to doing that:

1. FusionPro > Manage Pages > Page Usage: Edit the second page, name it "Back" and set the type to "Overflow"

2. Draw a second text frame on the second page and select "Overflow To" in the text frame editor

3. Name the text frame on the first page "content"

4. Create an OnJobStart Callback rule and put this as the contents:
Code:
FusionPro.Composition.composeAllRecords = false;
FusionPro.Composition.endRecordNumber = 1;
5. Create an OnRecordStart Callback rule and put this as the contents:
Code:
var signature = "/path/to/signature.jpg";
var data = new ExternalDataFileEx(FusionPro.Composition.inputFileName,',');
var recs = data.recordCount;

// in inches
var BPIDWidth = 1.625; 
var typeWidth = 1.625;
var addressWidth = 1.625;
var idWidth = 1.625;

var myTable = new FPTable;
myTable.AddColumns(7200 * BPIDWidth, 7200 * typeWidth, 7200 * addressWidth, 7200 * idWidth);
myTable.AddRows(recs+1); // Plus 1 for header row
myTable.Rows[0].Cells[0].Font="Helvetica";
myTable.Rows[0].Cells[0].TextColor="Black";
myTable.Rows[0].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left");
myTable.Rows[0].CopyCells(0,1,2,3);

// Header Row
myTable.Rows[0].Cells[0].Content = "BPID";
myTable.Rows[0].Cells[1].Content = "Service Type";
myTable.Rows[0].Cells[2].Content = "Service Address";
myTable.Rows[0].Cells[3].Content = "Circuit ID";

// Populate table with data file records
for (var i=1; i<=recs; i++){
    myTable.Rows[i].Cells[0].Font="Arial";
    myTable.Rows[i].Cells[0].TextColor="Black";
    myTable.Rows[i].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left");
    myTable.Rows[i].CopyCells(0,1,2,3);
    myTable.Rows[i].SetContents(data.GetFieldValue(i,"Billing_Point"), data.GetFieldValue(i,"Charge_Name"), data.GetFieldValue(i,"SP_Address"), data.GetFieldValue(i,"Alternate_ID"));
}   

// Add table to text frame
FindTextFrame("content").content = myTable.MakeTags().replace(/^\<table/, "<table alignment=center");

var verbiage = "<br>" +
               "Eventis will continue to make every effor to recover these costs in a fair and equitable manner.<br>" +
               "If you have any questions regarding this notification, please contact our Business Customer Care Center at<br>" +
               "855-ENVENTIS (855-368-3684).<br><br>" +
               "Sincerely,<br>" +
               '<graphic file="' + signature + '"><br>' +
               "Kari Juni<br>" +
               "Director of Customer Operations";
               
// Add verbiage to text frame
FindTextFrame("content").content += verbiage;
6. Create a graphic of the signature and put the path to that graphic in the 1st line of the OnRecordStart Callback

I'm attaching the template as I edited it for reference. Note that you'll only be able to preview the first record in the table, but once you compose the job, the rest of the table's contents should fill in.
Attached Files
File Type: zip revised.zip (139.3 KB, 42 views)
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #9  
Old November 8th, 2013, 05:01 AM
BBE BBE is offline
Forum n00b
 
Join Date: Aug 2011
Posts: 8
Default Re: Creating a Table

thank you! most of this seems to be working great!
the one thing I noticed is that when I compose it, I only see one record. the database has 21 records. I made sure I also, the 1 record I do see shows 3 pages, the 3rd one being blank. I do have the record range set to "all"
Reply With Quote
  #10  
Old November 8th, 2013, 05:33 AM
BBE BBE is offline
Forum n00b
 
Join Date: Aug 2011
Posts: 8
Default Re: Creating a Table

another fly in the ointment. here is the 2nd version .... it has static information on it on the far right of the table. how would I get that static information into the rule that is existing and have it repeat down the column depending on how many rows are being used for each file?
Attached Files
File Type: pdf Jurisdiction.pdf (28.4 KB, 29 views)
Reply With Quote
Reply

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 04:52 AM.


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