Focal Point
Building a table in a DEFINE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1231009331

September 29, 2005, 03:09 PM
Stan
Building a table in a DEFINE
could someone please post the proper way to to define the following line:
<table border="2" cellpadding="2" cellspacing="2">

When I try to do a define that equals this, I'm not getting it to recognize the cellpadding/border, etc.

DEFINE FILE CAR
TBL_OP/A71 = ??? Please help with this line...
TD_OP/A4 = '<td>';
TD_CL/A5 = '</td>';
TBL_EN/A7 = '</table>';
END

Thanks,
Stan
September 29, 2005, 03:48 PM
Francis Mariani
First, you need <tr> tags in a <table>.

Second, be aware that each cell in an HTML report is in its own <td> tag and that the report row is in its own <tr> tag. So when you define fields with HMTL tags and print them, they themselves will be within <tr> and <td> tags which may result in messy <table> code.

This works, but does result in messy HTML code:

DEFINE FILE CAR
TBL_OP/A71 = '<table border="2" cellpadding="2" cellspacing="2">';
TR_OP/A4 = '<tr>';
TD_OP/A4 = '<td>';
TD_CL/A5 = '</td>';
TR_CL/A5 = '</tr>';
TBL_EN/A8 = '</table>';
END
TABLE FILE CAR
PRINT
TBL_OP
TR_OP
TD_OP
COUNTRY
TD_CL
TR_CL
TBL_EN
END