aamitt06
-
Posts
34 -
Joined
-
Last visited
Community Answers
-
aamitt06's post in Getting error when taking backup of jasperserver database? was marked as the answer
Well I have resolved the issue initially what I was doing is using the command
root@ubuntu:pg_dump --username=postgres --host=127.0.0.1 --port=5433 jasperserver > /home/user/JS_55_Backup.sql
the problem with it was that there was another pg_dump on linux server which was of higher version and bundled postgresql of JasperServer uses 9.0.4 postgresql , to resolve this issue I gave the path of pg_dump inside jasperserver i.e
root@ubuntu:~# /opt/jasperreports-server-cp-5.5.0/postgresql/bin/pg_dump --username=postgresql --host-127.0.0.1 --port=5433 jasperserver > /home/user/JS_55_Backup.sql
-
aamitt06's post in How to create user using jasper rest api? was marked as the answer
I resolved the issue the mistake i was doing was that in String input = "{"username":"AgentUser22", ... instead of username it should be fullName and the correct fromat of descriptor should be
String input = "{"fullName":"AgentUser22","password":"jasperadmi","emailAddress":"aamitt06@gmail.com","tenantid":"Ag","enabled":true,
"externallyDefined":false,"roles":[{"name":"ROLE_USER"},{"name":"ROLE_VOUCHER"}]}";
JSONObject jObject = new JSONObject(input);
Rest would be the same as above.
-
aamitt06's post in How to get bars with maximum and minimum heights in JfreeCharts Barchart and set them with different color ? was marked as the answer
I resolved the issue by making customized BarRenderer class here is what I did to resolve this:
public void customize(JFreeChart chart, JRChart jasperChart) {
//Set the Customized Bar Renderer
CustomBarRenderer renderer = new CustomBarRenderer();
chart.getCategoryPlot().setRenderer((CategoryItemRenderer) renderer);
}
And Here is code for customized bar renderer class:
public class CustomBarRenderer extends BarRenderer {
public CustomBarRenderer(){
// super(
}
@Override
public Paint getItemPaint(int row,int column){
CategoryDataset dataset = getPlot().getDataset();
if(dataset!=null)
{
Number maximum = DatasetUtilities.findMaximumRangeValue(dataset);
Number minimum = DatasetUtilities.findMinimumRangeValue(dataset);
double l_value = dataset.getValue(row, column).doubleValue();
if(l_value==(double)minimum)
{
return Color.RED;
}
else if(l_value==(double)maximum) {
return Color.GREEN;
}
}
return Color.GRAY;
}
}
-
aamitt06's post in How to set marker property in map component in JasperSoft Ireport Designer 5.6.0? was marked as the answer
I was able to set marker property,I found no way to change the property of marker in ipreport map properties and the edit right click.
To resolve this issue I made changes in the xml of report and set marker item property for icon there ,the following changes I did was:
<mp:itemProperty name="icon"><valueExpression><![CDATA["http://maps.google.com/mapfiles/ms/icons/blue-dot.png"]]></valueExpression></mp:itemProperty>