Home | Sign in | English EN

  • Saving a chart
  • Backup in EMF format
  • Differences between grDestinationEMF and grSaveEMF
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Saves a chart that was drawn beforehand in a file in EMF format.
// Saves the chart named "CHART_MyChart" in the "C:\Charts\Chart.EMF" file
grSaveEMF(CHART_MyChart, "C:\Charts\Chart.EMF")
<Result> = grSaveEMF(<Chart name> , <EMF file name>)
<Result>: Boolean
  • True if the chart was saved,
  • False otherwise.
<Chart name>: Character string (with or without quotes)
Name of chart to use. This name corresponds to:
  • the chart name defined by programming with grCreate.
  • the name of Chart control found in the window editor, page editor or report editor.
<EMF file name>: Character string (with quotes)
Name and full path of the EMF file to create. The file extension is mandatory. This EMF file is created when grSaveEMF is called. The file is overwritten and re-created if it already existed.

Saving a chart

  • To save a chart, the chart must have been drawn beforehand (grDraw). The modifications performed since the last call to grDraw will be ignored.
  • The default size of the image is set to 639 x 479. These dimensions are taken into account if the chart was never drawn or if it is not visible.
  • If the chart was created by grCreate, the dimensions can be specified with grWndSize.

Backup in EMF format

  • This file can be read by a tool that recognizes the EMF format.
  • The size of the file is identical to the size of the destination (size of window size, control or file).
  • We recommend that you preview the chart before it is saved in a file.

Differences between grDestinationEMF and grSaveEMF

  • grDestinationEMF is used to define the destination for the next drawing of the chart. When using grDraw, the chart will be drawn in the specified file and all the modifications performed since the last chart drawing will be taken into account.
  • grSaveEMF is used to save the chart in a file in EMF format. The image saved corresponds to the chart during the last call to grDraw. The modifications performed on the chart since the last call to grDraw will be ignored.
Component: wd260grf.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment