Hi Richa,
I am new adobe form, but the same scenario in case smart form i solve.
Take that many line type and fill your internal table and in driver program identify condition i.e no of column will display & select row type and display.
Demo Code.
row = 8
condition in line type if row = 8