jsreport.client how i send default lang?



  • Hi i have that method:

    var rs = new ReportingService("http://MyServer.com:5488/", "admin", "password");
    rs.RenderByNameAsync("Inventory", myData);
    

    where i put the option details, i need to change language resources.

     {
          "template": { "shortid" : "g1PyBkARK" },
          "data" : { ... },
          "options": { "language": "en" }
       }
    


  • Something like this should work.

    rs.RenderAsync(new RenderRequest() {
      Template = new Template () {
         Name = "Inventory"
      },
     Data = myData,
     Options = new RenderOptions {
        Language = "en"
      }
    })
    

    or you can always send an anonymous object completely

    rs.renderAsync(new {
      template = new { name="foo"},
      data = ...
      options = new { language = "en" }
    })
    

Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.