How to get value of each cell of each tabular section?

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Oct 25, 2012
Company: Care Small Animal Hospital

Aho, friends!

I'm trying to build a debug report which will display all rows and columns of all tabular sections for a specific object. Please tell me how to make loops for that?

 
#2
People who like this:0Yes/0No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

maybe next script help to you (there you can use loops for getting data from all tabular sections of object)

Code
lObject = Object.Attribute1;
meta = Object.Attribute1.Metadata();
   
StructureOfObject = New Structure;
   
For Each tabSection In meta.TabularSections DO
   table = New ValueTable;
      
   For Each tabAttr In tabSection.Attributes DO
      table.Columns.Add(tabAttr.Name);
   EndDO;
      
   For Each row In lObject[tabSection.Name] DO
      newRow = table.Add();
         
      For Each tabAttr In tabSection.Attributes DO
         newRow[tabAttr.Name] = row[tabAttr.Name];
      EndDO;
   EndDO;
      
   StructureOfObject.Insert(tabSection.Name, table)
EndDO;

// StructureOfObject - contains data of tabular sections

Edited: ivan avdonin - Feb 14, 2013 06:06 PM
 
#3
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Oct 25, 2012
Company: Care Small Animal Hospital

Thank you, Ivan!

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.