Flag to keep the quey in the memory cache area (activated by default)
Calendar view for showing when the calendar is loaded.
Enable month view
Enable week view
Enable day view
Column containing the titles of events.
Column containing the starting dates of events.
Column containing dates ending events.
Indicates that the event duration occupies all day.
Column containing the background colors.
Column containing the color of the letters of the event.
Column containing descriptions of classes.
The SQL statements within the SQLTABLE build the syntax of the query that the system will perform to the database,
in the at runtime from parent to which the SQLTABLE.
The syntax of the sentence can be expressed in XML or in standard SQL, without any limitation of lines, text fragments or instructions. The definition of the statement in XML has several advantages:
Portability . A statement expressed in XML allows the managers run it on databases of different manufacturers (Informix, BD2, Oracle, etc..).
If the sentence is coded in standard SQL then it can be executed successfully for the given language, but it may not be feasible for other languages, and it depends on the functions and commands used in the sentence itself.
Security . If the statement is expressed in XML, the system will analyze if the userexecuting the sentence, has been restricted with a security role for the objects (tables) involved in the clause "FROM" of the statement, ( provided that the 'joins' definition are not of type "OUTER" neither "LEFT JOIN" ). If so, the system automatically inherits the conditions coming from that role 'profile' and adds them to the clause "WHERE" of the statement during its application.
By other hand, we have to take into account a number of important considerations from the own system. Namely:
temporary tables . In the event that it is desired to use temporary tables in the course of the execution SQLTABLE, the name given to the same character must be preceded @ .
Failure to observe this premise, if a user runs the main subject on two consecutive occasions, in the second the system will an error that the temporary table already exists in the database and you can not continue execution. Through this methodology avoids this problem can be run as often as desired object.
Fields main object . Typically a SQLTABLE consists in obtaining information related to a main object registration, hence in clause "WHERE" indicating the restriction by reference to fields the main purpose for which these fields must be preceded by the character # .
Variables query . If the main object has associated query variables, the possibility of be inherited and used in a SQLTABLE.
How to integrate the variables will depend on the type of variable, so see the information about the query variables available on the subject. In any case, irrespective of the nature of it, it will be indicated by the name that has been assigned the character preceded $ .
If the SQL statement would include unregistered and some variable associated with the object, the system will stop execution same warning in such circumstances.
Selection Criteria . When the main object has associated fields input these will be used to formulate user selection criteria at the time of the execution of the object.
There is the possibility to establish a SQLTABLE also inherits and consider the selection criterion introduced by the execution user object.
If the user makes a selection criterion, the system will translate to SQL language and, as a rule, I always added ultimately of the SQL statement in the judgment of SQLTABLE to construct the query to the database.
If the SQL statement itself would contain clauses SQLTABLE the GROUP BY , to add to the selection criteria final SQL statement to build the query, the system would produce a syntax error.
To avoid this situation and consider the object specified selection criteria and the system does not produce error construct the query, is strictly necessary to add to the WHERE clause (prior to GROUP clause BY ) of the SQL statement SQLTABLE, the following condition as it is exposed: AND $ 0 .
With this instruction, the system will replace the $ 0 for the syntax of the selection criteria, which avoid which did not occur because the aforementioned syntax error to build the query.
Furthermore, if the user in question is assigned a security role that pertenenezca the object, then the system the selection criteria for the susitutido $ 0 , will add the terms of the role for object.
Special Columns . The selection can be determined a special column (virtual, not physical table) to display it as an image (an icon). The name of this column must begin with "sqltable_icon" and its value must be the route a local image server, (preceded by 'http://localhost' if it can print the object.
The alias for this column should be in the list of columns to display.
In the special columns ("sqltable_icon") in the case of a local image server, this URL has to go preceded of 'http://localhost' otherwise the image will be displayed on screen but will not print in the paper.
When performing a select type "SELECT LENGTH (a) FROM table" and not get the column name as the name of this following:
oracle: length (a)
Because it is possible to obtain a variable declaration error in the select, as a variable name can not be eg 1.
User that has created the object
In this example, the occupation time of the employees is shown by a calendar.
For this example we will use the table employee_inout, which was created for the graph type SQL-JChart
The data contained in this table are the following:
2.1 Definition of the object
The columns are declared by which you can filter when accessing the calendar.
As in our case all occupancy times occur on the same day, it will be indicated that this day is by default in the filtering box.
2.3 Form Layout
A box of type SQL-CAL is created where the calendar can be displayed.
Parameters of the SQL-CAL box:
It is indicated that only the Month view is shown.
The Cache parameter is unchecked.
In Title event you will have to use the column 'the_name'.
In Start event will be 'time_in'.
The SQL statement is declared.
In Description event, 'the_description' will be set.
In End event will be set 'time_out'.
In all day will be set 'event_allday'.
In class description will be set 'firstname'.
In 'Background color' will be set 'event_color'.
In Class color will be set 'color'.
employee.firstname || ' ' || employee.lastname <alias name='the_name' />,
0 <alias name='event_allday' />,
employee.title <alias name='the_description' />,
CASE WHEN employee_inout.employeeid = 1 THEN 'rgb(248,58,34)'
WHEN employee_inout.employeeid = 2 THEN 'rgb(75,177,82)'
WHEN employee_inout.employeeid = 3 THEN 'rgb(78,129,180)'
WHEN employee_inout.employeeid = 4 THEN 'rgb(153,51,146)'
WHEN employee_inout.employeeid = 5 THEN 'rgb(221,87,33)'
WHEN employee_inout.employeeid = 6 THEN 'rgb(102,0,204)'
WHEN employee_inout.employeeid = 7 THEN 'rgb(153,153,0)'
ELSE 'rgb(0,0,0)' END event_color
<from table='employee_inout' >
<on>employee_inout.employeeid = employee.employeeid</on>
employee_inout.employeeid $employeeid AND
<date>employee_inout.time_in</date> >= $FECINI AND
<date>employee_inout.time_out</date> <= $FECFIN
If you press any of the occupation times that are marked, a window with information will be displayed.