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

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old February 11th, 2019, 02:07 PM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 31
Default Suppressing empty rows in a Table

I have created a Table as follows. My question is how do I suppress the rows if the data is empty so that the last line moves up under the last record with data. I have a total of 12 possible rows with a total row at the last. The table looks great now but need to purge the empty rows for each record.



new FPTable;
var table = new FPTable;
table.AddColumns(13500,1800,5400);
table.AddRows(13);

table.Rows[0].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[0].Cells[0].HAlign = "Left";
table.Rows[0].Cells[0].Content=Field("Designation_1");
table.Rows[0].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[0].Cells[1].HAlign = "Center";
table.Rows[0].Cells[1].Content=Field("GC1");
table.Rows[0].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[0].Cells[2].Content=Field("Amount_1");

table.Rows[1].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[1].Cells[0].HAlign = "Left";
table.Rows[1].Cells[0].Content=Field("Designation_2");
table.Rows[1].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[1].Cells[1].HAlign = "Center";
table.Rows[1].Cells[1].Content=Field("GC2");
table.Rows[1].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[1].Cells[2].Content=Field("Amount_2");

table.Rows[2].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[2].Cells[0].HAlign = "Left";
table.Rows[2].Cells[0].Content=Field("Designation_3");
table.Rows[2].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[2].Cells[1].HAlign = "Center";
table.Rows[2].Cells[1].Content=Field("GC3");
table.Rows[2].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[2].Cells[2].Content=Field("Amount_3");

table.Rows[3].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[3].Cells[0].HAlign = "Left";
table.Rows[3].Cells[0].Content=Field("Designation_4");
table.Rows[3].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[3].Cells[1].HAlign = "Center";
table.Rows[3].Cells[1].Content=Field("GC4");
table.Rows[3].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[3].Cells[2].Content=Field("Amount_4");

table.Rows[4].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[4].Cells[0].HAlign = "Left";
table.Rows[4].Cells[0].Content=Field("Designation_5");
table.Rows[4].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[4].Cells[1].HAlign = "Center";
table.Rows[4].Cells[1].Content=Field("GC5");
table.Rows[4].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[4].Cells[2].Content=Field("Amount_5");

table.Rows[5].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[5].Cells[0].HAlign = "Left";
table.Rows[5].Cells[0].Content=Field("Designation_6");
table.Rows[5].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[5].Cells[1].HAlign = "Center";
table.Rows[5].Cells[1].Content=Field("GC6");
table.Rows[5].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[5].Cells[2].Content=Field("Amount_6");

table.Rows[6].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[6].Cells[0].HAlign = "Left";
table.Rows[6].Cells[0].Content=Field("Designation_7");
table.Rows[6].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[6].Cells[1].HAlign = "Center";
table.Rows[6].Cells[1].Content=Field("GC7");
table.Rows[6].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[6].Cells[2].Content=Field("Amount_7");

table.Rows[7].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[7].Cells[0].HAlign = "Left";
table.Rows[7].Cells[0].Content=Field("Designation_8");
table.Rows[7].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[7].Cells[1].HAlign = "Center";
table.Rows[7].Cells[1].Content=Field("GC8");
table.Rows[7].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[7].Cells[2].Content=Field("Amount_8");

table.Rows[8].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[8].Cells[0].HAlign = "Left";
table.Rows[8].Cells[0].Content=Field("Designation_9");
table.Rows[8].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[8].Cells[1].HAlign = "Center";
table.Rows[8].Cells[1].Content=Field("GC9");
table.Rows[8].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[8].Cells[2].Content=Field("Amount_9");

table.Rows[9].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[9].Cells[0].HAlign = "Left";
table.Rows[9].Cells[0].Content=Field("Designation_10");
table.Rows[9].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[9].Cells[1].HAlign = "Center";
table.Rows[9].Cells[1].Content=Field("GC10");
table.Rows[9].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[9].Cells[2].Content=Field("Amount_10");

table.Rows[10].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[10].Cells[0].HAlign = "Left";
table.Rows[10].Cells[0].Content=Field("Designation_11");
table.Rows[10].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[10].Cells[1].HAlign = "Center";
table.Rows[10].Cells[1].Content=Field("GC11");
table.Rows[10].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[10].Cells[2].Content=Field("Amount_11");

table.Rows[11].Cells[0].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[11].Cells[0].HAlign = "Left";
table.Rows[11].Cells[0].Content=Field("Designation_12");
table.Rows[11].Cells[1].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[11].Cells[1].HAlign = "Center";
table.Rows[11].Cells[1].Content=Field("GC12");
table.Rows[11].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[11].Cells[2].Content=Field("Amount_12");

table.Rows[12].Cells[0].Margins = {Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[12].Cells[0].HAlign = "Left";
table.Rows[12].Cells[0].Font = "Brandon Grotesque Bold";
table.Rows[12].Cells[0].Content="TOTAL 2018 TAX-DEDUCTIBLE GIVING:";
table.Rows[12].Cells[2].Margins = { Top:0, Bottom:68, Left:0, Right:0 };
table.Rows[12].Cells[2].HAlign = "Center";
table.Rows[12].Cells[2].Font = "Brandon Grotesque Bold";
table.Rows[12].Cells[2].Content=Field("CAL18_TTL");

return table.MakeTags();
Reply With Quote
 

Tags
empty, suppress, variable table

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:28 PM.


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