Report: integer dataitem

Hi all,

I would like to know whats the purpose of Integer Data Item in Report?
When do we use them?

Any setup required?(eg: In their report properities, link, views etc etc)

Search this site is available at top right…

I understand, how would be the keyword like?

As I dont want to get mistaken for data type- integer.

The “Integer” DataItems are a kind of FOR-NEXT construct where you know upfront the number of iterations in the loop, but you do not want to/or cannot link this directly to a physical table in your database.

Example:

You want to generate three copies of your invoice. So you implement a dataItem “CopyLoop” based on Integer and set a filter to Number 1…3.

This forces the system to run through the more indented dataitems the number of times you defined in the “CopyLoop” and therefore create 3 copies.

In reports it is often used as a dummy DataItem, whenever you need to print something which can’t be directly related to a real DataItem.

to prevent an infinite loop, the records in a DataItem based on Integer must be filtered into a finite range before the DataItem starts to be processed. That can be done with a filter in the DataItemTableView property, when you know in advance how many times the triggers and sections on the DataItem must be executed or in the OnPreDataItem trigger.

Hi Thomas/ Mohana,

But I see some Report with multiple integer Data Item
Eg: Report 106: Customer Detailed Aging

How is this possible, I mean to achieve printing of invoice copies using 1 Integer Data Item, I can understand but if its numerous indented integer item thats a little complexing though.

Integer table data items are also used to print temporary tables in reports. The use of temporary tables in report depends a lot on your specific requirements but they are usually used to convert records from one table to another or inserting additional records to print. Another use of the integer table is to print a certain information exactly n-times, like number of copies of special footer or header sections.
Report 205 is a good example that combines these 2 issues. The CopyLoop Dataitem refers the number of copies + orginal you want to print, RoundLoop prints in fact the sales lines, that have been prepared beforehand in a teomporary variable SalesLines.

mohana,

-thanks for fast response, more or less i get what u mean on the concept of integer, its just a temporary generic purpose table, that is used for temporary tables.

-however may i check in the coding i have 2 record variable temp_table, perm_table. temp_table set its properties to temporary. both are the record variable for customer.

-how different when i set it explicitly in temp_table properties as temporary=YES and let perm_table as default value=NO

" to convert records from one table to another**"**

-i dont get what u mean from one table to another table, is it similar to datatype where we convert the value from string to date?

integer table consist of 1 field which is number only?

-what kind of data type is the Number?

-Can we modify/ add/ delete the field(s) in integer?

To copy/Insert records from one table to another table based on some conditions at runtime.

No converting from table- to table is a process where (usually) so called Buffer tables are involved.

Imagine you want ot o summarize information of two tables and display in one line in the report -

or you want to do a special sorting (like the top ten items), then you need to “preprocess” the records in one dataitem and build up a temporary table, then you use the integer dataitem in order to print the records from the temporary table.

Number is a Integer data type.

and we cannot modify as it is a virtual table

It is not possible to insert/delete in that table, all you can do is filter,

Integer is (as the name of the table already tells) of the type integer

This “table” is not a real table but a system generated list which bahves like a table.

thomas/ mohana:

based on what both have said:

u take multiple tables, extract certain records/fields from each one, combine and insert into integer?

but integer does have only single field- number only.

insert into buffer tables or temp tables…and loop the data using integer dataitem

mohana,

does integer data item only consist of a number field?

yes…only one field

You need something like the follwing in your “OnAfterGetRecord” of the Integer dataItem:

IF Number = 1 THEN
TempBuffer.FINDSET
ELSE
IF TempBuffer.NEXT = 0 THEN
CurrReport.BREAK;

Then you can access the fields of the TempBuffer record variable in the sections.

what is the use of dimension loop data item in reports

What is the use of Dimension Loop data item in Reports