DONE!
I'm using this code working like a charm :)
Data = JObject.Parse(Convert.ToString(JsonString))
DONE!
I'm using this code working like a charm :)
Data = JObject.Parse(Convert.ToString(JsonString))
Correction, my JsonString variable is a JObject not a string.
I'm using this in Content :
{{companies}}
The output was this :
[object Object],[object Object]
Bless you. Thank you so much Jan :)
I will try it and give feedback on this.
If I have variable that consist Json string that I got from Json query :
var JsonString;
That JsonString variable consist of this string :
{
"companies" :
{
"name" : "My company",
"address" : "Mainroad 12"
}
}
This is my source code :
var report = await rs.RenderAsync(new RenderRequest
{
Template = new Template
{
Recipe = Recipe.ChromePdf,
Engine = Engine.Handlebars,
Content = "{{ }}"
},
Data = new { }
});
My questions, can I use that JsonString variable as datasource?
If it can, how to implementing it and, for example, how to call "name" into Content?
Thanks for your reply.
Okay thank you. I will try to understand more.
Just for your info, I already install jsreport.Client and jsreport.Binary.
But I have error went trying to install jsreport.Embeded.
I'm using .Net Framework 4.6 on my project.
Using VS 2015, jsreport.embeded installed.
Can someone help me with this?
Thanks before.