Forum Discussion

jsinisa's avatar
jsinisa
Copper Contributor
Feb 28, 2022

Problem with Language

Hello,

we are using Universal Print with MS Business Central 19, since 1 month. It works basically OK, but we are facing a problem with Langauge. We have a printer where we have set flag on Landscape, because printout should be in Landscape format. But, users who use Business Central with German (Switzerland) are getting Error message:

 

Invalid Job Data was provided.

Error Message:

Invalid Validation Exception: Requested value 'Querformat' was not found.

 

 

It seems that Universal Print doesn't "speak" German. If BC langauge is set to English, then we don't have any problem with print.

 

How can we teach Universal Print to understand German?

 

thank you in advancs

2 Replies

    • jsinisa's avatar
      jsinisa
      Copper Contributor
      @Saurabh
      thank you for feedback.
      our problem is not with the documents.

      problem is if have an user who is using German(Switzerland) in his session.

      This setting works just fine if field caption is 'Landscape' in Universal Printer Settings.
      As soon as user chooses German (Switzerland) as Langauge, then the flag field Caption is 'Querformat', BC shows an error:

      Invalid Job Data was provided.
      Error Message:
      Invalid Validation Exception: Requested value 'Querformat' was not found.

      I have tried to log a support case but I can choose only between:
      Billing and Subsription Management.


      We have checked code with debugger and we have found possible bug in Code below.
      In the Format(Enum::"Universal Printer Orientation"::landscape)); it is Format of Enum that translates landscape to Querformat

      procedure CreatePrintJobRequest(UniversalPrinterSettings: Record "Universal Printer Settings"; var JobId: Text; var DocumentId: Text; var ErrorMessage: Text): Boolean
      var
      ResponseJsonObject: JsonObject;
      BodyJsonObject: JsonObject;
      BodyConfigJsonObject: JsonObject;
      DocumentsJsonToken: JsonToken;
      Documents: JsonArray;
      DocumentJsonToken: JsonToken;
      FirstDocument: JsonObject;
      ResponseContent: Text;
      begin
      BodyConfigJsonObject.Add('outputBin', UniversalPrinterSettings."Paper Tray");
      if UniversalPrinterSettings.Landscape then
      BodyConfigJsonObject.Add('orientation', Format(Enum::"Universal Printer Orientation"::landscape));

Resources