3.Handling

The program start


After the start of R2EdiViewer, the graphical user interface appears.

  • File→Open is the classic way to open an EDI file
  • One or more EDI files can be opened with drag and drop
  • <STRG>+V displays the contents of the clipboard
  • If R2EdiViewer is already running, the content of the clipboard can be displayed from
    any Windows application using the hotkey combination <STRG>+C and then the two <SHIFT> keys,
    which can be changed in the standard settings.
    An optional Groovy script can be used to convert the clipboard into a file path.

R2EdiViewer has the following optional startup parameters:

R2EdiViewer EDI file or EDI directory
-DE[_xx] -EN[_xx] -FR[_xx]
-SV[¬]
-CC= -CE= -CI= -CS= -CV= -CX=
-FS=
-HS=
-LY=
-TD=
-UD=

-OV=
-SC
-MR=
-PR=
-OE=
-DI
-WL[¬]
-LF=
-SF

The green parameters can also be changed via the graphical user interface,
but the startup parameters given here have a higher priority.

The optional negation character ¬ (Alt 170) cancels the effect of the parameter.

 

3.1. Standard startup parameters


3.1.1. R2EdiViewer EDI-file

Displays the EDI file in the default language.
The full path, consisting of drive, directory and file name, is to be specified.

Examples:
R2EdiViewer c:\Programme\R2EdiViewer\R2EdiViewerExample.edi
c:\Programme\R2EdiViewer\R2EdiViewer.exe c:\Programme\R2EdiViewer\R2EdiViewerExample.edi
R2EdiViewer.exe "c:\Program Files (x86)\R2EdiViewer\R2EdiViewer*.e*"

If the file name contains the placeholders * or ?, then the first 10 found files are displayed
in a selection window.

Use the numbers 0 - 9, the ESC key, or mouse click to make the selection.

3.1.2. R2EdiViewer EDI-file -DE[_xx] -EN[_xx] -FR[_xx]

The Language-parameter determines the preferred syntax directory language and layout language
and overwriting the current Windows language. Optionally, a two-digit ISO3166 language for
number formatting of display layouts can be specified with _xx.
'-EN_DE' tries to display the EDI file with the English description/layout and with '_DE' as
number format language, the point is used as the thousands separator.
If there is no suitable description in the syntax directory R2EdiViewerSD.zip,
the default language depends on the message is used:

  • ANSIX12, EDIFACT, IDOC, ODETTE = English
  • VDA = German

If there is no matching display layout, a special search strategy is used.

Possible Language parameters are:

  • -DE = German
  • -EN = English
  • -FR = French

    Example:
    R2EdiViewer R2EdiViewerExample.edi -EN_de

 

3.1.3. R2EdiViewer EDI-file -SV¬

With the ShortView-parameter, fields with empty field values are no longer output,
which makes the output shorter and clearer.
 With this toggle button you can also switch between both views.

Examples:
R2EdiViewer R2EdiViewerExample.edi -SV
R2EdiViewer R2EdiViewerExample.edi -EN -SV
R2EdiViewer R2EdiViewerExample.edi -DE -SV¬

3.1.4. R2EdiViewer EDI-file -CC= -CE= -CI= -CS= -CV= -CX=

With the CharacterEncoding-parameter you can overcontrol the automatic detection
of the charset for the following files:

  • CC= CSV-output file
  • CE = EDIFACT/ODETTE/ANSIX12-input file
  • CI = INHOUSE-input file
  • CS = SAPIDOC-input file
  • CV =VDA-input file
  • CX =XML-input file

You have to enter a charset/codepage supported from Java.
In the GUI "Settings/Encoding" you can choose a charset from the list.

Examples:
R2EdiViewer R2EdiViewerExample.edi -CS=windows-1252
R2EdiViewer R2EdiViewerExample.edi -CV=IBM852 -CI=UTF-8

3.1.5. R2EdiViewer EDI-file -FS=

The FontSize-parameter defines the font size (in points) to display the EDI files.
Valid values are 8 to 24 points, the default value is 13 points.

Example:
R2EdiViewer R2EdiViewerExample.edi -FS=10

3.1.6. R2EdiViewer EDI-file -HS=

The HighlightingSize-parameter defines the file size (in KB) of the TMP file. Syntax-highlighting
is working until the size of the TMP file. Syntax-highlighting has an effect on processing time and
memory requirements. It depends on the size of your EDI files and your system environment
when you should shut off syntax-highlighting.
The default value is 1024 KB (max. 99999 KB).
With a value of 0 KB syntax-highlighting is not available.
With a value of 99999 KB syntax-highlighting is always available.

Example:
R2EdiViewer R2EdiViewerExample.edi -HS=1500

 

3.1.7. R2EdiViewer EDI-file -LY=

The Layout-parameter defines the subdirectory in the user/program directory where
the layout files are located.
-LY= without directory specification prevents an alternative display processing.  
All default layout files are delivered in the subdirectories "layouts" and "layoutsEdifileChecker".

Example:
R2EdiViewer R2EdiViewerExample.edi -LY=layouts

3.1.8. R2EdiViewer EDI-file -TD=

By default, R2EdiViewer saves the TMP files in the Windows-User-Temp-Directory.
If the user doesn't have write access, R2EdiViewer will use the "private" directory.
With the TempDirectory-parameter you can define an alternative directory.

Example:
R2EdiViewer R2EdiViewerExample.edi -TD=C:\

3.1.9. R2EdiViewer EDI-file -UD=

The "private" directory is used as the user directory. But if the "private" directory has no
write privileges, the directory is read from the environment variable "APPDATA"
and a R2EdiViewer subdirectory is created.

With the UserDirectory parameter an alternative directory can be specified.
If you only specified -UD ( without a directory), the directory is read again from the
environment variable "
APPDATA " and a R2EdiViewer subdirectory is created.

Examples:
R2EdiViewer R2EdiViewerExample.edi "-UD=Z:\my\data"
R2EdiViewer R2EdiViewerExample.edi -UD

 

3.2. Extended startup parameters


R2EdiViewer has a BATCH mode, which means that no files are displayed in the GUI.
Instead, the prepared files are sent by e-mail, printed, and/or saved in an output directory.

R2EdiViewer runs in batch mode as soon as a directory is specified instead of a single file.
One of the three parameters -MR, -PR or -OV must then be specified.

To prevent parallel execution of R2Ediviewer, use R2EdiViewerC.exe (console version) or
R2EdiViewer.jar in your BAT/CMD files.
The command-line command START creates parallel windows and must therefore not be used.

Here is an example BAT/CMD file with 2 steps. 

@echo off
ECHO R2EdiViewer is running...
 
REM Prevents multiple starts by a scheduler.
if exist C:\ProgramData\R2EdiViewer.tmp goto JOB_End
echo Job started.>C:\ProgramData\R2EdiViewer.tmp
 
 
echo *** Run step 1: Console version of R2EdiViewer ***
"c:\Program Files (x86)\R2EdiViewer\R2EdiViewerC.exe" "C:\EDI-files" -EN -WL -DI -ly=layouts "-OV=c:\Output-files"
if errorlevel == 1 pause
 
echo *** Run step 2: JAR Version of R2EdiViewer ***
java -jar "c:\Program Files (x86)\R2EdiViewer\R2EdiViewer.jar" "C:\EDI-files" -EN -WL -DI -ly=layouts "-OV=c:\Output-archiv" "-MR=r2ediviewer@freenet.de"
if errorlevel == 1 pause
 
 
del C:\ProgramData\R2EdiViewer.tmp
 
:JOB_End
exit


 

3.2.1. R2EdiViewer EDI-directory -OV=

The OutputViewResultDirectory-parameter specifies the desired output directory
where R2EdiViewer should save the processed files.

Examples:
R2EdiViewer C:\directory_with_files "-OV=C:\OutputDir"
R2EdiViewer C:\directory_with_files  -SV "-OV=C:\OutputDir"

3.2.2. R2EdiViewer EDI-directory -SC

The ShowCSV-parameter shows only the CSV file based on a DATASEL file.
A possible existing report will be not executed.
This is useful if you want to use a CSV file in your own applications.

Example:
R2EdiViewer C:\directory_with_files -SC "-OV=C:\OutputDir"

3.2.3. R2EdiViewer EDI-directory -MR=

The MailReceiver-parameter is used to send the R2EdiViewer output via e-mail
to the comma-separated e-mail recipients.
The Mail-Server-Settings-Dialog allows you to define once the access to the mail server.
You can also specify an HTML file with your own mail text.

Examples:
R2EdiViewer C:\directory_with_files "-MR=harry@freenet.de"
R2EdiViewer C:\directory_with_files "-MR=harry@freenet.de,tom@freenet.de"

3.2.4. R2EdiViewer EDI-directory -PR=

The Printer-parameter is used to print the PDF output of a report to the
comma-separated printers. For each printout you have to define the Windows printer name
and the paper size in the format "printer-name#printer-size".
The following paper sizes are supported:
- iso-a0 until iso-a10

Examples:
R2EdiViewer C:\directory_with_files "-PR=HP LaserJet 4000 Series PCL6#iso-a4"
R2EdiViewer C:\directory_with_files "-PR=Canon 6800#iso-a3,Epson#iso-a4" 

 

3.2.5. R2EdiViewer EDI-directory -OE=

The OutputEdiFileDirectory-parameter specifies a directory where R2EdiViewer will copy
the EDI input files.

Example:
R2EdiViewer C:\directory_with_files "-OV=C:\OutputDir" "-OE=C:\BackupDir_EDI-files"

3.2.6. R2EdiViewer EDI-directory -DI

The DeleteInputEDIFile-parameter deletes the EDI input files after processing.

Example:
R2EdiViewer C:\directory_with_files -DI "-OV=C:\OutputDir" "-OE=C:\BackupDir_EDI-files"

3.2.7. R2EdiViewer EDI-directory -WL¬

The WriteLogFile-parameter writes a log file (R2EdiViewer0.html) into the user directory.
The user directory can be changed by the -UD parameter.

Examples:
R2EdiViewer C:\DataDir -WL -DI "-OV=C:\OutputDir" "-OE=C:\BackupDir_with_EDI-files"
R2EdiViewer C:\DataDir -WL¬ -DI "-OV=C:\OutputDir" "-OE=C:\BackupDir_with_EDI-files"

3.2.8. R2EdiViewer EDI-directory -LF=

The LayoutDocumentFormat parameter defines the output format of the JasperReports document.
By default, a PDF document is created. The -LF parameter supports DOCX and XLSX documents.
The format of the -LF parameter is: -LF=Document format + Formatting bits

Document formatBit valueBit description
100Word DOCX+0

Standard output


+1

Allow flexible row height
200Excel XLSX+0

Standard output


+1

Reduce the font size by 1 point



+2
Perform text wrap




+4Shrink the font size so that the text fits in the cell


Examples to create a Word or an Excel document:
R2EdiViewer C:\DataDir "-OV=C:\OutputDir" -LF=101
R2EdiViewer C:\DataDir "-OV=C:\OutputDir" -LF=203

 

3.2.9. R2EdiViewer EDI-directory -SF

The SplitFile parameter separates EDIFACT files into single message files before processing.
This would result in a separate file for each invoice contained in an EDIFACT collective invoice file.
Prepared via a layout, this creates invoice-related PDF files instead of a single large PDF file.