[Bug .Net] Issue with case in data object pssed to RenderByNameAsync

  • Hi,

    I've found an bug with .net RenderByNameAsync method :
    You define classes with Uppercase letters for properties like :

    public class Data
    public List<SubData> DataList { get; set; }
    public class SubData
    public string Message { get; set; }

    Then you pass an object create from this class to RenderByNameAsync like this :

    //d is an instanciated Data object.
    var results = service.RenderByNameAsync ("TplName", d);

    Template replacement will recognize DataList member as datalist (lowercase) but it won't recognize Message. To solve the issue, you should lowercase all members of the SubData class. Or you can convert all to Json which will solve the issue.

    This is rather annoying when you use naming conventions and use uppercase in properties' names.



  • Ups. Thank you for the bug report.
    I've submitted it here, you can subscribe to get notification when it gets fixed.

Log in to reply

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