Hi,
I am new to Jasper Report and was using Crystal Report earlier. I want to ask can anyone share a c# class file which shows how to call a Jasper Report from C# application which is deployed in Jasper Report Server.
Also is there any cloud based Jasper Report server where some sample Jasper Report are deployed which can be used for testing purpose using one's C# code?
Any input wil be deeply appreciated.
Regards,
Abhishek.
1 Answer:
Posted on February 4, 2014 at 12:38am
Hi All,
I was able to run report successfully from c# Rest webservice .
I took help from this blog http://www.freeze.ro/node/7 . This blog doesnt shows anything about passing parameters.
So. I figured it on my own.
Let know if anyone needs it. It was quite simple.
Regards,
Abhishek
can you please post the parameters, i didn't hnow how to change it ! thanks
There is separate class for the same such as IntJasperReportParameter, StringJasperReportParameter. Assign value and Name to it and pass as a list of JasperReportP"arameters. It will be done
JrParameterItem mp3 = new JrParameterItem();
mp3.Name = "Au";
mp3.Value = "01-01-2015";
mP.Add(mp3);
IntJasperReportParameter p = new IntJasperReportParameter();
p.IntValue = 2;
p.Name = "NN";
mP.Add(p);
DateTimeJasperReportParameter d = new DateTimeJasperReportParameter();
d.DateTimeValue = DateTime.Now.Date;
d.Name = "Du";
mP.Add(d);
JasperReport report = new JasperReport()
{
Name = "Relevé",
Path = "/Pathto/MyReport",
Parameters = mP,
};
@aelhadi