4D v16.3

QR GET INFO COLUMN

Home

 
4D v16.3
QR GET INFO COLUMN

QR GET INFO COLUMN 


 

QR GET INFO COLUMN ( area ; colNum ; title ; object ; hide ; size ; repeatedValue ; displayFormat {; resultVar} ) 
Parameter Type   Description
area  Longint in Reference of the area
colNum  Longint in Column number
title  Text in Column title
object  Text in Object assigned for that column
hide  Longint in 0 = displayed, 1 = hidden
size  Longint in Column size
repeatedValue  Longint in 0 = not repeated, 1 = repeated
displayFormat  Text in Display format for the data
resultVar  Text in Name of the formula variable

The QR GET INFO COLUMN command retrieves the parameters of an existing column.

area is the reference of the Quick Report area.

colNum is the number of the column to modify.

title returns the title that will be displayed in the header of the column.

object returns the field name or the formula assigned to the column.

Note: The command does not take into account any virtual structure defined by means of the SET TABLE TITLES and SET FIELD TITLES commands. The actual name of the field is returned in the object parameter.

hide returns whether the column is displayed or hidden:

  • if hide equals 1, the column is hidden;
  • if hide equals 0, the column is displayed.

size returns the size of the column in pixels. If the value returned is negative, the size of the column is automatic.

repeatedValue returns the status for data repetition. For example, if the value for a field or variable does not change from one record to the other, it may or may not be repeated when they do not change:

format returns the display format. Display formats are the 4D formats compatible with the data displayed.

When passed, the optional resultVar parameter returns the name of the variable automatically assigned by the Quick Report editor to the formula column (if any): "C1" for the first formula column, "C2" for the second, and so on. 4D uses this variable to store the results from the last execution of the column's formula when generating the report.

The QR GET INFO COLUMN command retrieves the same parameters but the reference of the areas to which it applies is different and varies depending on the parameter you want to set. First of all, the title, hide, and repeatedValue parameters are meaningless when this command is used in cross-table mode. The value to use for colNum varies depending on whether you want to retrieve the column size or the data source and display format.

  • Column size
    This is a “visual” attribute, therefore columns are numbered from left to right, as depicted below:

The following statement sets the size to automatic for all the columns in a cross-table report and leaves other elements unchanged:

 For($i;1;3)
    QR GET INFO COLUMN(qr_area;$i;$title;$obj;$hide;$size;$rep;$format)
    QR SET INFO COLUMN(qr_area;$i;$title;$obj;$hide;0;$rep;$format)
 End for

You will notice that since you want to alter only the column size, you have to use QR GET INFO COLUMN to retrieve the column properties and pass them to QR SET INFO COLUMN to leave it unchanged, except for the column size.

  • Data source (object) and display format
    In this case, the numbering of columns operates as depicted below:

If you pass an invalid area number, the error -9850 will be generated.
If you pass an invalid ColNum value, the error -9852 will be generated.

Example  

You have designed the following report:

You can write:

 C_TEXT($vTitle;$vObject;$vDisplayFormat;$vResultVar)
 C_LONGINT($area;$vHide;$vSize;$vRepeatedValue)
 QR GET INFO COLUMN($area;3;$vTitle;$vObject;$vHide;$vSize;$vRepeatedValue;$vDisplayFormat;$vResultVar)
  //$vTitle = "Age"
  //$vObject = "[People]Birthdate-Current date"
  //$vHide = 0
  //$vSize = 57
  //$vRepeatedValue = 1
  //$vDisplayFormat = ""
  //$vResultVar = "C1"



See also 

QR Get info row
QR SET INFO COLUMN
QR SET INFO ROW

 
PROPERTIES 

Product: 4D
Theme: Quick Report
Number: 766

This command modifies the Error system variable

 
HISTORY 

Created: 4D 2003
Modified: 4D v15 R3

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)