Kal Posted June 12, 2013 Share Posted June 12, 2013 I have 50 text files which I put into FusionPro as Formatted Text resources. Now I created a rule called "VarText" that will pull in the text based on the data. I want to put this "Rule" into a table, how do I go about it? myTable.Rows[0].Cells[0].Content = "VarFormatted text here"; new FPTable; var myTable = new FPTable; myTable.AddColumns(29600); myTable.AddRows(1); myTable.Rows[0].Cells[0].Font="Times New Roman"; myTable.Rows[0].Cells[0].TextColor="Red"; myTable.Rows[0].Cells[0].SetBorders("Thick", "Green", "Right"); myTable.Rows[0].CopyCells(0); myTable.Rows[0].Cells[0].Content = "VarFormatted text here"; return myTable.MakeTags(); Quote Link to comment Share on other sites More sharing options...
esmith Posted June 13, 2013 Share Posted June 13, 2013 Would this work? myTable.Rows[0].Cells[0].Content = Rule("VarText"); Quote Link to comment Share on other sites More sharing options...
Kal Posted June 13, 2013 Author Share Posted June 13, 2013 I had tried that and it didn't pull in the "Formatted Text" from the resource files when it's in the table but if I call the RULE outside the table it works fine... ?????????? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 13, 2013 Share Posted June 13, 2013 I had tried that and it didn't pull in the "Formatted Text" from the resource files when it's in the table but if I call the RULE outside the table it works fine... ?????????? What does the Rule "VarText" look like? If it's returning a resource, you'll need to call the .content property. Quote Link to comment Share on other sites More sharing options...
Kal Posted June 13, 2013 Author Share Posted June 13, 2013 Rule snapshot attached. ------------------------------- new FPTable; var myTable = new FPTable; myTable.AddColumns(29600); myTable.AddRows(1); myTable.Rows[0].Cells[0].Font="Times New Roman"; myTable.Rows[0].Cells[0].TextColor="Red"; myTable.Rows[0].Cells[0].SetBorders("Thick", "Green", "Right"); myTable.Rows[0].CopyCells(0); myTable.Rows[0].Cells[0].Content = Rule("ParaPull_RULE"); return myTable.MakeTags(); Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 13, 2013 Share Posted June 13, 2013 Change the next-to-last line to this: myTable.Rows[0].Cells[0].Content = Rule("ParaPull_RULE").content; Quote Link to comment Share on other sites More sharing options...
Kal Posted June 13, 2013 Author Share Posted June 13, 2013 That was the missing link... it's working now. Thanks Dan. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.