Programmatically getting Total Number of items in a form [message #161302] |
Fri, 03 March 2006 03:11 |
nirmalnarayan
Messages: 261 Registered: April 2005 Location: India
|
Senior Member |
|
|
How to get the total number of items in a form programmatically. I want to generate a Excel report based on a form, for this i need to get the total number of items and based on that i have to generate the columns in Excel output of the form.
I am able to generate the Excel report but now i am hardcoding the total number of columns, i want to make it dynamic based on the total number of items in the form.
Any one have any idea ?
Thanks and Regards,
Nirmal
|
|
|
|
Re: Programmatically getting Total Number of items in a form [message #161903 is a reply to message #161302] |
Tue, 07 March 2006 17:03 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Sorry about my last answer, I was thinking "Number of items referenced in a form" which included procedure code usage versus "Number of items defined in a form".
Use the Get_Form_Property ('frm',first_block) then loop through the blocks by using Get_Block_Property ('blk',nextblock) until Null is returned. Loop through items by starting at Get_Block_Property ('blk',first_item) and then using Get_Item_Property ('itm',nextitem) until it returns null.
David
|
|
|