I have a 1 page report that has about 40 fields in it. I select the original data from various tables and create #dataTable#. Since I have to use some logic to manipulate the data in #dataTable# before using it in the report, I have added many of these 40 fields to #dataTable# and have created corresponding variables for those 40 fields.
As I read the rows in #dataTable#, I check to see if the column has data. If it has data, I copy the data to the variable. If the column is empty, I want to fill the variable with underscores so it shows as an underline in the report wherever there is no data. I have tried the following code, which works fine:
Code: Select all
if (!empty($row->peo_company))
$own_company = $row->peo_company;
else
$own_company = '_____________________________';
The only other option I could find was to fill the variable with underscores using LPAD or RPAD. I tried the following code but there must be something wrong with it because, it will no longer create the report.
Code: Select all
if (!empty($row->peo_company))
$own_company = $row->peo_company;
else
$own_company = RPAD('_', 25, '_');
Thanks,
John