ORA-12713 Running a Report on Unix Environment

ORA-12713 Running a Report on Unix Environment

ORA-12713 Running a Report on Unix Environment

Titleimage

Posted by Patrick Hamou on 2017:09:19 19:55:48

APPLIES TO: Oracle Reports Developer

Oracle Reports Developer - Version 11.1.2.1.0 and later
Information in this document applies to any platform.
Checked for relevance on 01-FEB-2016

SYMPTOMS: SQL*ReportWriter, NLS_LANG

On SQL*ReportWriter version, 11.1.2.1.0 or higher

When attempting to run a particular report on a Unix environment using NLS_LANG as CANADIAN FRENCH_CANADA.WE8ISO8859P1 in reports.sh the following error occurs.

ERROR
-----------------------
REP-771: Une erreur grave PL/SQL s'est produite dans l'unité de programme afterpform.
ORA-12713: Perte de caractères dans la conversion NCHAR/CHAR

 

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Install Oracle Reports on Linux change in the reports.sh the NLS_LANG to CANADIAN FRENCH_CANADA.WE8ISO8859P1
2. run  your report using

   $INSTANCE_HOME/config/reports/bin/rwclient.sh server=rep_custom report=/path/tf5003.rdf userid=$HIDDEN desformat=PDF destype=file desname=/tmp/out.pdf
 

CHANGES NLS_LANG value

 Changed the NLS_LANG value in reports.sh

CAUSE: error message REP-1401, ORA-12713

The NLS_LANG on the Database is set as CANADIAN FRENCH_CANADA.WE8MSWIN1252 meaning the Character Set do not Match with the one used now by the Reports Server And there is a known bug:

Bug 9765970  : REPORTS FAILS WITH REP-1401: AND ORA-12713 AFTER UPGRADE TO 11G MID
 


-----BUG Excerpt ------
The error message REP-1401: and ORA-12713 occurs on trying to use a function call in the program unit in Developer 11g 
The stored procedure
  =========================
  create or replace function bossard_test_case1_f return string as
  vtest varchar2(20);
  begin
  select c1 into vtest from bossard_test_case1_t;
  return vtest;
  end bossard_test_case1_f;
  /
  
  The code in the reports 
  ========================
  function CF_1Formula return varchar2 is
  begin
  return bossard_test_case1_f;
  end;
  
  Error 
  ========================
  REP-1401: A fatal PL/SQL error occurred in program unit cf_1formula.
  ORA-12713: Character data loss in NCHAR/CHAR conversion
  ....
---- End of Excerpt

 

SOLUTION: Oracle Database developers

The Issue described was once reported as BUG but the developers determined this is not a BUG but an expected behavior on Reports Side.

The solution if you are using UTF8  characters is to use an NLS character set as UTF8 or AL32UTF8 on both sides (DataBase and Client).

*WE8MSWIN1252 can be used if the host is Windows
 

Return to Blog