ScriptCase can create Custom Grids/Reports (billets, invoices, business cards, etc). You can create a HTML file using your own layout, but following some rules.
It should be a HTML file. We can stipulate where Scriptcase fields will be displayed on the HTML file using “curly brackets” {variable}. As you can see below:
HTML Code
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="247" height="96" align="left" valign="center">
<font face="verdana" style="font-size:11px">
<b>{Name}</b><br>{Address}<br>{City}- {State}<br>
{ZIP}
</font>
</td>
</tr>
</table>
Running the HTML code above.
{Name}
{Address}
{City}-{State}
{ZIP}
In the Template we can define a Loop feature using a flag (see in red):
C?digo HTML
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- BEGIN bl2 -->
<td width="247" height="96" align="left" valign="center">
<font face="verdana" style="font-size:11px">
<b>{Name}</b><br>{Address}<br>{City}- {State}<br>
{ZIP}
</font>
</td>
<!-- END bl2 -->
</tr>
</table>
The red parts define where the loop will start and finish. The iterations amount is defined by “Columns per Page” of the Grid.
eg: If “Columns per Page” is 3 so it will display the following result.
HTML code
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="247" height="96" align="left" valign="center">
<font face="verdana" style="font-size:11px">
<b>{Name}</b><br>{Address}<br>{City}- {State}<br>
{ZIP}
</font>
</td>
<td width="247" height="96" align="left" valign="center">
<font face="verdana" style="font-size:11px">
<b>{Name}</b><br>{Address}<br>{City}- {State}<br>
{ZIP}
</font>
</td>
<td width="247" height="96" align="left" valign="center">
<font face="verdana" style="font-size:11px">
<b>{Name}</b><br>{Address}<br>{City}- {State}<br>
{ZIP}
</font>
</td>
</tr>
</table>
Running the HTML Code above
[table][tr][td]{Name}
{Address}
{City}-{State}
{ZIP}[/td][td]{Name}
{Address}
{City}-{State}
{ZIP}[/td][td]{Name}
{Address}
{City}-{State}
{ZIP}[/td][/tr][/table]
After done the “.html” file we should include it in Scriptcase accessing “Tools>>Layout>>Templates”.
Select “Free Format” and Upload the file.
Then Create a new Grid application and select “User Defined” Option in “Orienation” setting.
Access “Grid>>Layout>>Settings” and select the “Body Template”.
Now we should associate the template variables with the Grid fields. (Grid>>Select Fields)
Format the fields and Run. It is done.
V?tor Jamil