Thank you for your guidance, however the problem with this approach is that, the number of elements could vary on each selection. So static line objects will not solve the problem. Also, in the actual implementation i have also used Trellies, so this might not be feasable.
Is there any other workaround to get this functionality? I am currently using version 11.2 SR9.