Viewer Tutorial General topics 1 2 3 4 5

6 Data dependent display

7 Continue

There are two methods for data dependent display with GuiXT viewer:
1 Using GuiXT variables as file names (html, rtf, jpg, gif, bmp files).   
2
Using template files (html or rtf) with GuiXT variables within the files.

1 You use GuiXT variables as file name.

Example:
view (0,0) (20,100) "&F[material].rtf"
The view command displays rtf files that refer to the material number of the actual R/3 screen.

The names of the corresponding rtf files consist of material numbers:

CP_5001.rtf
CP_5002.rtf
CP_5003.rtf
TFJ_100.rtf
...

2 You use  rtf or html files as a template.

Example:

view (0,0) (20,100) "template=material.html"

In your template file you use GuiXT variables with R/3 fieldnames or coordinates (row, column).
vte06-mm03-01-htmltemplate.gif (2291 bytes)

In the same way you can integrate image-, video- or audiofiles using GuiXT variables as filenames.

html code:
img src="c:\guixt\scripts\&[Material].jpg

The corresponding imagefiles are named by materialnumbers.
CP_5001.jpg
...

In this example we have used both methods of data dependent display.

In the upper window we used an html template to display some data and an image of the  material, the cookies.
In the lower window an rtf file with variable name is used to display external data which is not contained in the R/3 database.

vte06-mm03-02-html_und_rtf.gif (31233 bytes)

The GuiXT script is simple:

view (0,90) (12,140) "template=Material.html"
view (12.2,90) (19,140) "c:\guixt\escripts\&[material].rtf"

The following three files were used for the example above:
material.html vte06-mm03-03-htmltemplate2.gif (3412 bytes)
CP_5001.jpg CP_5001.jpg (6879 bytes)
CP_5001.rtf Chocolate Chip Cookies

Ingredients:
Wheat flour, butter, eggs, sugar, hazelnuts, chocolate

Speciality from Cornwall
Keep in dark cool place

à Do not eat more than 10 cookies per day!

 Continue