4D v14.3

Generating 4D code

Home

 
4D v14.3
Generating 4D code

Generating 4D code  


 

 

The Quick Report editor allows you to automatically generate the 4D code corresponding to a defined report and paste it in the Clipboard. This function allows manual building of quick report outlines that can be customized using 4D language (commands of the Quick Report theme). This feature is only available in Design mode. 

The button for code generation is located on the last page of the Quick Report Wizard:

Even if you built the quick report manually, you can use this feature by displaying the “Finalization” step of the wizard. 

When you click on this button, a dialog box appears that allows you to set the parameters related to code generation:

The following options are available:

  • Borders: Check this option to specify that you want to include the cell border properties in the generated 4D code.
  • Palettes visibility: Check this option to specify that you want to include the current palettes display status (Standard, Styles, Columns, etc.) in the generated 4D code.
    It is advisable to deselect this option if the code is intended for use in an offscreen area.
  • Text properties: Use this option to specify that you want to include the font style definition of the report (font, style, etc.) in the 4D code. If this option is not checked, the three following options have no effect.
    • Font, Size, Justification: When this option is checked, the generated 4D code includes information regarding font, font size and font justification in the quick report template.
    • Style (Bold, Italic, Underline): When this option is checked, the generated 4D code includes information regarding text styles in the quick report template.
    • Color (Text, Background): When this option is checked, the generated 4D code includes information regarding the text colors in the quick report template.

Once you have defined the options, click on the Build code button to generate the 4D code; the code is then displayed in the Preview area of the dialog box:

You can modify the code options and click again on the Build code button in order to update the preview area. 

If you are satisfied with the code generated, click on the Paste in Clipboard button, then click on the Close button to close the dialog box. 

You can then paste the code in a method or a text file using the standard shortcut Ctrl+V (Windows) or Command+V (Mac OS), or the Paste command in the Edit menu.

 
PROPERTIES 

Product: 4D
Theme: Quick reports

 
ARTICLE USAGE

4D Design Reference ( 4D v14 R2)
4D Design Reference ( 4D v12.4)
4D Design Reference ( 4D v13.4)
4D Design Reference ( 4D v14 R3)
4D Design Reference ( 4D v14.3)
4D Design Reference ( 4D v14 R4)