Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Column Data

Status
Not open for further replies.

sbirkenkamp

Programmer
Jan 24, 2006
12
US
In my CR I have the report formatted into three columns. Does anyone know if it is possible to have for example on hte last row if there is only two columns filled in, to have the data be in column 1 & 3? and if there is only 1 column with data that it prints in column 2?

xxx xxx xxx
xxx xxx xxx
xxx xxx

or

xxx xxx xxx
xxx xxx xxx
xxx
 
If you use formulas for each field, you can do whatever you like:

formula1
if recordnumber >= totalrecordcount-3) then
(
if isnull({table.fld2}) and isnull({table.field3}) then
""
else
{table.fld1}
)

formula2
if recordnumber >= totalrecordcount-3) then
(
if isnull({table.fld2})
and
(
isnull({table.field3})
and
not(isnull({table.field1}))
)
then
{table.fld1}
else
if isnull({table.fld2})
and
(
isnull({table.field1})
and
not(isnull({table.field3}))
)
then
{table.fld3}
)
)

formula3
if recordnumber >= totalrecordcount-3) then
(
if isnull({table.fld2}) and isnull({table.field1}) then
""
else
{table.fld3}
)


Didn't test, but you should understand the theory, and that it isn't real easy, but doable...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top