Wednesday, May 27, 2015

JasperServer: How to generate/export report using url

http://<host>:<port>/<context>/flow.html?_flowId=viewReportFlow&reportUnit=/supermart/Details/XXX&employee=123&output=pdf

&output=pdf : Add this parameter in url to get a pdf file.
&output=xls  : Add this parameter in url to get a xls file.

Tags: 
Export PDF
Export Excel
Jasperserver.

Tuesday, May 26, 2015

Custom JQUERY in Jasper Server

You can add your custom JQUERY code with below syntax.
i.e. jQuery('#back').hide();

Follow the below steps to test JQUERY code. After implement below steps you can hide back button with JQUERY custom code.

Step 1: Open \\apache-tomcat\webapps\jasperserver\scripts\commons.main.js

Step 2: Add JQUERY code in below function.      

           domReady(function(){
 //Add the below jquery to hide back button
 jQuery('#back').hide();
            });

Step 3: You can see that back button is not display.

Below is result.



Tags: 
JQUERY
Customization
Jasperserver.

Friday, May 15, 2015

How to use JSON File with Table Component.


 Please Refer Attached JSON File and understand that below is my structure.




You can download the JSON Viewer Freeware Software from below link.
http://tomeko.net/software/JSONedit/index.php?lang=en

Below image display that how we can display JSON data in Table component.



Step 1 : Create connection with JSON File.




Step 2 : Create one data source and define Json query language path.




Step 3: Take Table Component and set parameter.




SAMPLE JSON FILE: Two.json

{"company" : "abc",
 "dbinformation" : {
      "company_detail" : "the description",
      "company_id" : 1538,
      "division" : {
         "product" : [
            {
               "proddetail" : {
                  "description" : "abc mobile",
                  "id" : 1,
                  "type" : "mobile"
               },
               "amount" : 6.0,
               "rate" : 4000
            },
            {
               "proddetail" : {
                  "description" : "xyz tablet",
                  "id" : 2,
                  "type" : "tablet"
               },
  "amount" : 2.0,
               "rate" : 5000
            }
         ],
         "product_supply_detail" : [
            {
               "address" : {
                  "description" : "Pune",
                  "pincode" : 38001
               },
            "productid" : 1,
     "quantity"  : 3
            },
            {
               "address" : {
                  "description" : "Ahmedabad",
                  "pincode" : 38001
               },
            "productid" :1,
     "quantity" : 4
            }
         ]}
   },
   "date" : 15022015
}

Tags: 
JSON
iReport
Jasper Studio
JSPN With Table Component


Monday, May 4, 2015

Display $ sign before numeric amount field.

Use Pattern as : $#,##0.00

Tags: 
iReport
Jasper Studio