HTML Word-Wrap in Richtext Field
Hello All,
I am having problem with html, i am saving subforms data in richtext field and then printing in the record template. While the data in subforms field may have large amount of data and it need word wraping in those fields data which apparently i am failing to do so.
Following is the code i have used:
- if(Outward_Type == "Fabric")
- {
- table_String = "";
- table_String = table_String + "<html><head><style>table {font-size: 12px;vertical-align: top;font-family: arial, sans-serif;border-collapse: collapse;width:2;}td, th {word-wrap:break-word;border: 1px solid #dddddd;border: 1px solid black;text-align: left;width:1px;padding: 8px;}tr:nth-child(even) {background-color: #dddddd;}</style></head><table><tr><th>Fabric Type</th><th>Design No.</th><th>Shade No.</th><th>Bale No.</th><th>Quantity</th><th>Total Quantity</th></tr>";
- for each rec in Fabric
- {
- table_String = table_String + "<tr><td>" + rec.Fabric_Type + "</td><td>" + rec.Design_No.Design_No + "</td><td>" + rec.Shade_No.Shade_No + "</td><td>" + rec.Bale_No + "</td><td>" + rec.Quantity + "</td><td>" + rec.Total_Quantity + "</td></tr>";
- }
- table_String = table_String + "</table>";
- input.Record_Status1 = table_String;
- }
And the result i got is in the attachment
PFA