Visnovok table values ​​in a spreadsheet document.

Antipyretic remedies for children are prescribed by a pediatrician. But there are situations of indispensable help in case of likhomantsi, if the child needs to give faces negligently. Then the fathers take on themselves the resuscitation and zastosovuyut antipyretic preparations. What is allowed to give to children of the chest? How can you lower the temperature in older children? What are the most safe faces?

Good afternoon!

Today, I am preaching to women and panamas from Paris, they are growing up with it, like programmatically managing ceramic forms. How to create a table of values, how to create columns, how to save, how to enter її on the form, how to allow to save a change, how to expand the columns already explicitly on the table form ... Well,

let's go!

Otzhe, unas є form і zapit, the result of which is vivantage in the table. For example, like this:

Request = New request ("SELECT * Z Spravochnіk.Bankі"); Table = Query.Execute(). Vivantage();

We show the table on the kerovan form

Our main task number ONE is to enter the result of the request to Kerovanu form.

For whom we need:

  1. Create props for type "Table of Values".
  2. Create details with the type of value, the appropriate type of the table column, for the skin column, for the table.
  3. Create a form element of type "TableForm" for tables.
  4. Create form elements for columns of the "FieldForm" type.

In this way, our code will be like this:

// add the table: start the table itself, then the column. Details = New Massive; Requisition.Add (New RequisitionForm("TableOnForm", New DescriptionType("TableValue")))); For Dermal ST W Table.Columns Cycle Details.Add (New Form Details (St.Name, St.TypeValue, "TableOnForm")); EndCycle; // add details to the form ІchangeRequisitions (Requisites); // dodamo form element Tab = Element.Add( "TableOnForm", Type("TableForm")); TablePathToDatanim = "TableOnForm"; // let's change the position of the rows and the rows themselves, including the command panel Tab.IchangeLineOrder = Nonsense; Tab.CommandPanelPosition = FormElementCommandPanelPosition.No; For Dermal ST Z Table.Columns Cycle Rec = Elements.Add("Column" + St.Name, Type("FieldForm"), Tab); Rec.Vid = VidFieldForm.FieldInscription; Rec.PathToDatanim = "TableOnForm" + "." + St.Imya; Rec.Title = St.Im; EndCycle; // store the table ValueInRequisitionForm(Table, "TableOnForm");

Here we create details to clean up the table and columns of the table. Dali create the elements and prescribe for them a path to the details of the form. So we are always creating and requisites of the form, which takes the meaning, and the element of the form, which reflects the meaning. Whom has the whole point. If you want to create a group of forms, then you do not need the form details - it is enough to create a form element of the "GroupForm" type, after which in the "Type" field enter the appropriate type of element (Group, Bookmark, ...).

Danish code display the result on the Kerovana form. Albeit, as a result of the request, you will have elements, such as those that cannot be shown on the form, then 1C will be lamented. Before such elements, there are similar values, unique identifiers and, I know how, other table values ​​(so when choosing tabular parts, we blame problems). It is necessary to secure when compiling the details. If so, if the table requisites may be of the "Value Table" type, then for this you will also need to create columns. Torjev Slad Mati in Uvasi, Shaho Iman Elentiva Buta Unіkalnimi, at the Tsomoy IMMA Revіzitіv Repvіv Repvіv Repvіv Repvіv Repvіv Moon Bati Unіkalnі Вистові Висайса Вистків (Tobto Mozda Moznouati DVI Rіznі tables with one-way nimanuumanches of columns, ale in the intelligence of one-selling columns).

Adding a column to a document table

Now let's see how you can expand the form table already.

Let's say we want to add a column to the table of types of advances of the advance payment, something like this:

For whom, we simply write the following axis code in the procedure When creating On the Server:

// dodamo props ArrayRequisites = New Array; ArrayRequisites.Add(New RequisitionForm("Column1", New DescriptionTypes("Row"), "Object.ViewAvansi", "Column 1", Nonsense)); ІchangeRequisites (Array ofRequisites); EPT = Elementy.Add("Column1", Type("FieldForm"), Elementy.VisibilityAdvance); Elt.Vid = VidFieldForm.InputField; Elt.PathToDanim = "Object.VisibilityAvansi.Column1";

Slid, however, mothers on uvazі, scho zapovnyuvat given column to happen at the skin of the document, and save the data for her in a good collection, for example, register records with the document and the row number in the quality of the measurements, and the values ​​​​in the resource.

Way to be primed on vikoristanni object Report Builder- the whole object, which allows, on the basis of the given text, to ask abo dzherela data, and just fix it, take the result and enter yoga into spreadsheet document or a diagram.

description of the method

1. Take away the area of ​​the middle of the spreadsheet document, as it is necessary to place the value in the table. It is necessary to set the region margin in such a way that it would include a row of column headings (div. Malyunok 1), a feature of the work of the Report Builder object.

CellsArea = TabDocument.Area(1, 1, LastRow, LastColumn);


2. On the basis of the region of the middle of the tabular document, we create a description of the dzherel danikh.

DataSource = New DescriptionDataSourceIs(CellsRegion);

3. We create the Report Builder object, indicating that we need to replace the text with the request and wait for the call.



The result of reading the data from the dzherel following the viklik method Viconati () be in power result. Given the power to move an object of the QueryResult type, an object of the same type is rotated when it is requested.

4. Vivantage the result into a value table (div. Figure 2) by calling the vivantage() method of an object of type QueryResult.

TabValue = ReportBuilder.Result.Upload();

Three obvious minuses, the meaning of the columns is of the string type. Since the Report Builder object itself is available only on the server, it is possible to drive a spreadsheet document from the client to the server.

Sub-bag program code

Function ConvertTableDocumentToValueTable(TabDocument)
LastLine = TabDocument.TableHeight;
LastColumn = TabDocument.TableWidth;
CellsArea = TabDocument.Area(1, 1, LastRow, LastColumn);
// We create a description of the dzherel data on the background area in the middle of the spreadsheet document.
DataSource = New DescriptionDataSourceIs(CellsRegion);
// We create an object for intellectual stimulation,
// it's possible to dzherelo danih and vikonuemo to pobudovu zvіtu.
ReportBuilder = New ReportBuilder;
Report Builder.DataSource = DataSource;
Report Builder. Execute ();
// The result is rendered into a value table.
TabValue = ReportBuilder.Result.Upload();
Rotate TabValue
EndFunctions

Processing with implementation given method you can take advantage

Way to be primed on vikoristanni object Report Builder- tse object, which allows, on the basis of the given text, to ask either dzherela danih, and just fix it, take the result and enter it into a spreadsheet document or a diagram.

description of the method

1. Take away the area of ​​the middle of the spreadsheet document, as it is necessary to place the value in the table. It is necessary to set the region margin in such a way that it would include a row of column headings (div. Malyunok 1), a feature of the work of the Report Builder object.

CellsArea = TabDocument.Area(1, 1, LastRow, LastColumn);


2. On the basis of the region of the middle of the tabular document, we create a description of the dzherel danikh.

DataSource = New DescriptionDataSourceIs(CellsRegion);

3. We create the Report Builder object, indicating that we need to replace the text with the request and wait for the call.



The result of reading the data from the dzherel following the viklik method Viconati () be in power result. Given the power to move an object of the QueryResult type, an object of the same type is rotated when it is requested.

4. Vivantage the result into a value table (div. Figure 2) by calling the vivantage() method of an object of type QueryResult.

TabValue = ReportBuilder.Result.Upload();

Three obvious minuses, the meaning of the columns is of the string type. Since the Report Builder object itself is available only on the server, it is possible to drive a spreadsheet document from the client to the server.

Sub-bag program code

Function ConvertTableDocumentToValueTable(TabDocument)
LastLine = TabDocument.TableHeight;
LastColumn = TabDocument.TableWidth;
CellsArea = TabDocument.Area(1, 1, LastRow, LastColumn);
// We create a description of the dzherel data on the background area in the middle of the spreadsheet document.
DataSource = New DescriptionDataSourceIs(CellsRegion);
// We create an object for intellectual stimulation,
// it's possible to dzherelo danih and vikonuemo to pobudovu zvіtu.
ReportBuilder = New ReportBuilder;
Report Builder.DataSource = DataSource;
Report Builder. Execute ();
// The result is rendered into a value table.
TabValue = ReportBuilder.Result.Upload();
Rotate TabValue
EndFunctions

A worksheet with the implementation of this method can be downloaded

Support the project - share your efforts, thank you!
Read also
Sbebrank (also known as Oschadbank) Sbebrank (also known as Oschadbank) Solving license problems with Autocad Chi does not start autocad windows 7 Solving license problems with Autocad Chi does not start autocad windows 7 Instructions for selecting the CryptoPro PIN code, at the hour of signing a number of documents - Instructions - AT Instructions for choosing the CryptoPro PIN code, at the hour of signing a number of documents - Instructions - JSC "PEK-Torg"