How to use List (Component ) in Ireport.

How to use List components in Ireport :

When dragging over a list component to one of the report’s bands, iReport will not prompt you for anything, unlike the process for the table component. You’ll have to configure it once it’s on the design area. Once the List component is in the design area, you can edit the table datasource (by right-clicking on the component).

  • In the “Connection/Datasource Expression” tab, set the drop-down to “Don’t use connection or datasource”

  • In the “Parameters” tab, add a new parameter:

    • Set the “Dataset parameter name” to REPORT_CONNECTION

    • Set its corresponding Value Expression to the parameter containing the database connection statement

Once you have that ready, you will be ready to drag fields, values or parameters for that subdataset over to the List element’s area.

Example :

Lets start with some example to understand more perfectly :

Here my main idea is to create a report with positon and salary range of each employee department.

Step1: create an Employee Report :

1

step 2:

here I selected some fields employee id ,hiredate,fullname,position title and salary as dispayed below.

2

Step 3 :

lets drag and drop list element into footer position of positon group as below, now you can see a dataset1 automatically formed in report inspector and listcomponent as shown below.

3

Step 4:

Now lets add some querie in dataset1 with a parameter positon_id and create the same in parameter list

like below

4

step 5:

Drag and drop the fields from the dateset1 into the list ,dont use the fields from the main dataset.

5

Step 6:

now right click on list(component ) and click Edit list datasource , a pop up will be appeared in use data source expression use connection expression

6

step 7:

select the parameters tab and and map the parameter with the field in main report position id

7

8

step 8:

Run the report to get the desired output

9

This is how we can use lists in ireport..

Thank you.

USING PARMETERS IN iREPORT

USING PARMETERS IN iREPORT

 

Most basic knowledge any new learner would have of word parameter -“ parameter is a limit or boundary which defines the scope of a particular process or activity ”. And technically we can define it as – “A numerical or other measurable factor forming one of a set that defines a system or sets the conditions of its operation. ” Or call it “filter” in simple words.

But in jasper-reports they represent the best way communication channel between the report engine and the execution environment (which is your application). After designing the report and checking its preview, what designer will provide as solution to the user for his desired criteria for report generation at run time, the answer is parameter. So, here are basic steps using which you can add parameters to your report to enhance its reporting experience for user. Add parameter to the report from report inspector, and manage its addition and removal from the report .

1Fig 1.1

Right click on the “parameter 1” as shown in Fig 1.1, and rename the parameter as per your convenience. Now, pay attention to its properties to modify it .

2Fig 1.2

In properties you will notice fields as shown in Fig 1.2 , after naming it and defining its class in “parameter class” which is basically its data type, you need to provide “default value expression ” which gets executed only when value of parameter is not provided by the user at run time. Check box of “use as prompt” for pop up to get value from user , which will appear as shown in Fig 1.3.

3

Fig: 1.3

Next question is how parameter gets executed in SQL query of report?

 

Parameters can be used in SQL queries to filter records in a where condition or to add/replace pieces of raw SQL or even to pass the entire SQL string to execute.

In the first case the parameters are used as standard SQL parameters, in example:
SELECT * FROM DEPARTMENT WHERE DEPARTMENT_ID = $P{parameter1}
Syntax of parameter in query : $P{parameter1}
In above example the entered  value get evaluated to display the details of row containing values of DEPARTMENT_ID entered by user through parameter. Result will get displayed as Fig: 1.4
In this user will be solely responsible for the correct execution of report as only entered value will be used in the execution of query.

4Fig 1.4

Thanks,

Nisha Sahu

 

 

Calling JRXML inside HDI(Helical Dashboard Insights) : –

             Calling  JRXML  inside  HDI(Helical Dashboard Insights) : –

This blog will teach you how to call JRXML inside HDI(Helical Dashboard Insights) : –

To call JRXML inside Helical Dashboard Insights , we need 4 files required for HDI and one JRXML file.

I have created one folder named “JRXML” and kept all the above mentioned files in this folder.

Files : [ callJrxml.EFW , template.html , tabular.efwvf , dataConn.efwd , getEmployeeInfo.jrxml ]

Database : mysql

Table : emp

Query : select empno,ename,job,sal fromemp;

#1 : using the above query , first created a report in iReport.

#2 : then removed the <queryString></queryString> contents from jrxml.

#3 : Added the query in “dataConn.efwd” file.

callJrxml.efw :

efwTemplate.html :

htmltabular.efwvf :

efwvf

dataConn.efwd :

efwdOutput :

outputThanks,

Rupam Bhardwaj

I-Report Bands

                                                                                                        I-Report Bands

 

A jasper report is composed by a set of sections named as “bands”.  Every band contains few properties such as height. Band height should be greater than 0, otherwise it will never be visible to user.  The band height can grow if elements inside it are stretched.

Default Bands in Report:

Title Band

Printedonly one time and it’s the first band. It can be printed on a separate page. You can print report title in this band.

 

Page Header

Printed on each page.

 

Column Header

It prints on each page if page contains detail band. If page splits it prints on each page. You can use this to crate manual table and put column name in this band.

 

Detail

It prints for each record in the source.

 

Column Footer

It is same as column header band, but it prints in footer instead of header.

 

Page Footer

Same as Page header, but it is footer section.

 

Summary

It prints only once at the end of the report. It can be printed on separate page also.

 

Background

It can be used to define a page background. You can also use image in this band.

 

The position of bands cannot be modified. For each band, you can modify only band height.

This is the sequence of bands in any jasper report (Fig 1.0). You can hide/unhide bands according to your needs.

If you click on any band, you can see the properties of that band in your right hand side panels (Fig 2.0). (If properties panel is not visible, Click on menu Window > Properties.

 

FIg 1.0

FIg 1.0

Fig 2.0

Fig 2.0

 

 

 

 

Thanks

Sharad Sinha

Map Reduce In MongoDB

MongoDb Map Reduce

Map-reduce is a data processing paradigm for condensing large volumes of data into useful aggregated results.

For map-reduce operations, MongoDB provides the map Reduce database command.

The mapReduce command allows you to run map-reduce aggregation operations over a collection. The mapReduce command has the following prototype form:


db.runCommand(
     {
               mapReduce: <collection>,
               map: <function>,
               reduce: <function>,
               finalize: <function>,
               out: <output>,
               query: <document>,
               sort: <document>,
               limit: <number>,
               scope: <document>,
               verbose: <boolean>
     }
)

 

Pass the name of the collection to the mapReduce command (i.e. <collection>) to use as the source documents to perform the map reduce operation.

The command also accepts the following parameters:

Field Description
mapReduce The name of the collection on which you want to perform map-reduce. This collection will be filtered using query before being processed by the map function.
map A JavaScript function that associates or “maps” a value with a key and emits the key and value pair.
reduce A JavaScript function that “reduces” to a single object all the values associated with a particular key.
out Specifies where to output the result of the map-reduce operation. You can either output to a collection or return the result inline.
query Optional. Specifies the selection criteria using query operators for determining the documents input to the map function.
sort Optional. Sorts the input documents. This option is useful for optimization. For example, specify the sort key to be the same as the emit key so that there are fewer reduce operations. The sort key must be in an existing index for this collection.
limit Optional. Specifies a maximum number of documents for the input into the map function.
finalize Optional. Follows the reduce method and modifies the output.
scope Optional. Specifies global variables that are accessible in the map, reduce and finalize functions.
verbose Optional. Specifies whether to include the timing information in the result information. The verbose defaults to true to include the timing information.

 

The following is a prototype usage of the mapReduce command:

var mapFunction = function() { ... };
var reduceFunction = function(key, values) { ... };
db.runCommand(
{
      mapReduce: <input-collection>,
      map: mapFunction,
      reduce: reduceFunction,
      out: { merge: <output-collection> },
      query: <query>
}
)

Requirement for map function:
Map function is responsible for transforming each input document in to zero or more documents.It can access the variables defined in the scope parameter,and has following prototypes.

function(){
     ...
     emit(key,value);
}

The map function has the following requirements:

  • In the map function, reference the current document as this within the function.
  • The map function should not access the database for any reason.
  • The map function should be pure, or have no impact outside of the function (i.e. side effects.)
  • A single emit can only hold half of MongoDB..
  • The map function may optionally call emit(key,value) any number of times to create an output document associating key with value.

The following map function will call emit(key,value) either 0 or 1 times depending on the value of the input document’s status field:

function(){   
   if(this.status=='A')       
      emit(this.cust_id,1);
}

The following map function may call emit(key,value) multiple times depending on the number of elements in the input document’s items field:

function(){this.items.forEach(function(item){emit(item.sku,1);});}

Requirements for the Reduce Function
The reduce function has the following prototype:


     function(key,values){
         ...
         return result;
}

The reduce function exhibits the following behaviors:

  • The reduce function should not access the database, even to perform read operations.
  • The reduce function should not affect the outside system.
  • MongoDB will not call the reduce function for a key that has only a single value. The valuesargument is an array whose elements are the value objects that are “mapped” to the key.
  • MongoDB can invoke the reduce function more than once for the same key. In this case, the previous output from the reduce function for that key will become one of the input values to the next reduce function invocation for that key.
  • The reduce function can access the variables defined in the scope parameter.
  • The inputs to reduce must not be larger than half of MongoDB’s. This requirement may be violated when large documents are returned and then joined together in subsequent reduce steps.

Because it is possible to invoke the reduce function more than once for the same key, the following properties need to be true:

  • the type of the return object must be identical to the type of the value emitted by the mapfunction.
  • the reduce function must be associative. The following statement must be true:
reduce(key,[C,reduce(key,[A,B])])==reduce(key,[C,A,B])
    • the reduce function must be idempotent. Ensure that the following statement is true:
reduce(key,[reduce(key,valuesArray)])==reduce(key,valuesArray)
    • the reduce function should be commutative: that is, the order of the elements in thevaluesArray should not affect the output of the reduce function, so that the following statement is true:
reduce(key,[A,B])==reduce(key,[B,A])

Requirements for the finalize Function

The finalize function has the following prototype:

 function(key,reducedValue){
          ...
          return modifiedObject;
}

The finalize function receives as its arguments a key value and the reducedValue from thereduce function. Be aware that:

  • The finalize function should not access the database for any reason.
  • The finalize function should be pure, or have no impact outside of the function (i.e. side effects.)
  • The finalize function can access the variables defined in the scope parameter.

out Options

You can specify the following options for the out parameter:

Output to a Collection

This option outputs to a new collection, and is not available on secondary members of replica sets.

out:<collectionName>

Map-Reduce Examples:

Consider two Collection (tables) named :

  • Employee
  • Department

Now , to create collection in mongo db , use below query

db.createCollection(“Employee”)
db.createCollection(“Department”)

To insert data in Employee Collection :

db.Employee.insert({“name” : { “first” : “John”, “last” : “Backus” }, “city” : “Hyd”,“department” : 1})

db.Employee.insert({“name” : { “first” : “Merry”, “last” : “Desuja” }, “city” : “Pune”,“department” : 2})

To insert data in Department Collection :

db.Department.insert({“_id” : 1,   “department” : “Manager”})

db.Department.insert({“_id” : 2,   “department” : “Accountant”})

Now the requirement is to display FirstName , LastName , DepartmentName.

For this , we need to use Map Reduce :

Create two map functions for both the collections.

//map function for Employee
var mapEmployee = function () {
var output= {departmentid : this.department,firstname:this.name.first, lastname:this.name.last , department:null}
     emit(this.department, output);               
};

//map function for Department
var mapDepartment = function () {
var output= {departmentid : this._id,firstname:null, lastname:null , department:this.department}
     emit(this._id, output);              
 };

Write Reduce Logic to display the required fields :



var reduceF = function(key, values) {

var outs = {firstname:null, lastname:null , department:null};

values.forEach(function(v){
      if(outs.firstname ==null){outs.firstname = v.firstname }                   
      if(outs.lastname ==null){outs.lastname = v.lastname    }
      if(outs.department ==null){ outs.department = v.department }                         
 });   
 return outs;
};

Store the result into a different collection called emp_dept_test


result = db.employee_test.mapReduce(mapEmployee, reduceF, {out: {reduce: ‘emp_dept_test’}}) 
result = db.department_test.mapReduce(mapDepartment,reduceF, {out: {reduce: ‘emp_dept_test’}})

write the following command to get combined result:

db.emp_dept_test.find()

Output of the query gives the combined result like


{
    "_id" : 1,
    "value" : {
        "firstname" : "John",
        "lastname" : "Backus",
        "department" : "Manager"
    }
}

/* 1 */
{
    "_id" : 2,
    "value" : {
        "firstname" : "Merry",
        "lastname" : "Desuja",
        "department" : "Accountant"
    }
}

 

-By
Nitin Uttarwar
Helical It Solution

Map Reduce in Mongo db :

Map Reduce in Mongo db :

This Blog will teach you, how to write Map reduce in Mongo DB .

Map Reduce is a concept that process large volume of data into aggregated results.

To use Map Reduce Concept in Mongo DB , create one command called “mapReduce”.

This mapReduce() function fetch data from collection (table) and then produce the result set into (key, value) format.

Then reduce () function takes the (key, value) pair and reduce all the data (documents) on the same key.

Eg : – Let say I have two Collection (tables) named :

  1. Emp_test
  2. Dept_Test

Now , to create collection in mongo db , use below query

db.createCollection(“Emp_test”)

db.createCollection(“Dept_Test”)

To insert data in Emp_test Collection :

db.Emp_test.insert({“name” : {       “first” : “ABC”,       “last” : “DEF”   },   “city” : “Hyd”,   “department” : 1})

db.Emp_test.insert({“name” : {       “first” : “GHI”,       “last” : “JKL”   },   “city” : “Pune”,   “department” : 2})

To insert data in Dept_Test Collection :

db.Dept_Test.insert({“_id” : 1,   “department” : “SALESMAN”})

db.Dept_Test.insert({“_id” : 2,   “department” : “CLERK”})

Now the requirement is to display FirstName , LastName , DepartmentName.

For this , we need to use Map Reduce :

# 1 : Create two map functions for both the collections.

var mapEmp_test = function () {

var output= {departmentid : this.department,firstname:this.name.first, lastname:this.name.last , department:null}

emit(this.department, output);               };

var mapDept_Test = function () {

var output= {departmentid : this._id,firstname:null, lastname:null , department:this.department}

emit(this._id, output);               };

Write Reduce Logic to display the required fields :

var reduceF = function(key, values) {

var outs = {firstname:null, lastname:null , department:null};

values.forEach(function(v){

if(outs.firstname ==null){                       outs.firstname = v.firstname                   }                   if(outs.lastname ==null){                       outs.lastname = v.lastname                   }                   if(outs.department ==null){                       outs.department = v.department                   }                          });   return outs;};

# 3 : Store the result into a different collection called emp_dept_test

result = db.employee_test.mapReduce(mapEmployee, reduceF, {out: {reduce: ’emp_dept_test’}}) result = db.department_test.mapReduce(mapDepartment,reduceF, {out: {reduce: ’emp_dept_test’}})

# 4: write the following commanddb.emp_dept_test.find()

Welcome Page Customization For JasperSoft on the Basis of Roles

On Welcome page of Jaspersoft, Login is based on Some Roles assigned to particular user ,as per that we have an access on Jaspersoft. If anyone wants to create their own user with Roles, they simply do it by making following changes in particular files.

Let us consider that we are creating following three different Users and Roles with some http://helicaltech.com/wp-admin/post.php?post=3624&action=editrequirement:

1)Create three different Users

i)Reports

ii)Dashboard

iii)Adhoc

2)Create three different Roles

i) ROLE_REPORT

ii)ROLE_ DASHBOARD

iii)ROLE_ ADHOC

3)Assign Role for each User As

i) For Report User Assign ROLE_ REPORTS

ii) For Dashboard User Assign ROLE_ DASHBOARD

iii) For Adhoc User Assign ROLE_ ADHOC

4) In MenuBar only View button should be their which contains only Repository option and for user other than above, it will show all Menus.

5)The Home page contains only three Containers which has only viewlist button at center

that is:

i)Reports

ii)Dashboards

iii) Ad Hoc Views

6) This three containers needs to be modified to display the text as:

i)Reports – Change the existing text to: Click on ‘View list’ to access all Reports in repository.

ii)Dashboards – Change text existing to: Click on ‘View list’ to access links to Dashboards.

iii)Ad Hoc Views – Change the existing text to: Click on ‘View list’ to access all AdHoc Views in Repository.

7) All text present in left side of Home Page will get removed.

Now we have do customization on JasperSoft to accomplish the requirement ,for that we requires to modify the following different files as below:

NOTE: After modifying the files, to see changes done on JasperSoft,it is important to firstly restart the tomcat-server, then and then only you are to able to see the changes.

1) To Grant the permissions for Users:

i)Navigate to the path : C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\WEB-INF\jsp\modules\home

/* If this condition is true it redirects to HomePage1.js */<authz:authorize ifAnyGranted=”ROLE_REPORTS,ROLE_ DASHBOARD,ROLE_ ADHOC”><c:set var=”ModuleName” value=”home/HomePage1“/></authz:authorize> 

/* Else it redirects to HomePage.js */

<authz:authorize ifNotGranted=”ROLE_REPORTS,ROLE_DASHBOARD,ROLE_ADHOC”>

<c:set var=”ModuleName” value=”home/HomePage“/>

</authz:authorize>

 

/*Insert this line to add variable created above*/

<t:putAttribute name=”moduleName”>${ModuleName}</t:putAttribute>

 

ii)In that homeForNonDemo.jsp contains code related to grant permissions for the user,so here we have to grant permissions to User Report,Dashboard,Adhoc as follows:

iii) Firstly restart the server, now you are able to logged onto server using different three  users that is Reports,dashboard,AdHoc.

 

2)To change the HomePage which contains HomeView:

i)After logged in with above users, it will redirects to HomePage1

ii)Goto C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-   pro\scripts\home

iii)In that create .js file same as HomePage.js,but make following changes in HomePage1.js, which we are already create as HomeView1.js as HomeView.js.

HomeView = require(“home/view/HomeView1“)

 

3)To change the HomeView which contains different views we have to change:

i)From HomePage1 it will redirects to HomeView1

ii)Navigate to path : C:\Jaspersoft\jasperreports-server-5.6\apache- tomcat\webapps\jasperserver-pro\scripts\home\view

iii)create HomeView1.js as HomeView,it is having Listview and WorkflowView,homeTemplate add the ListView1,WorkflowView1,homeTemplate1.js files created by us.

ListView = require(“home/view/ListView1“),WorkflowView = require(“home/view/WorkflowView1“),homeTemplate = require(“text!home/template/homeTemplate1.htm“),

 

4)To change the text which the container displays:

i)Goto C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\scripts\home\view

ii)In that ListView1.js file we need to modify the text as:

render: function () {var nothingToDisplayElement;if (this.collection.length > 0){//cleanup only for ‘nothing’ msg, no listeners to remove herethis.$el.html(“”);

this.collection.forEach(_.bind(function(model){

var name = model.get(‘name’);

               console.log(model);

                if (name == ‘dataSource’ || name == ‘domain’) {return;}

                if(name == ‘dashboard’) {

                model.set(‘description’,’Click on View list to access links to Dashboards in repository’);}

             if(name == ‘adhocView’) {

                model.set(‘description’,’Click on View list to access links to Ad hoc Views in repository’);}
if(name == ‘report’) {

                model.set(‘description’,’Click on View list to access links to Reports in repository’);}

var view = new this.initOptions.listElementView({ model: model });this.subviews.push(view);this.$el.append(view.render().$el);

},this)).

}else{

nothingToDisplayElement = _.template(nothingToDisplayTemplate, {message: this._msgNothingToDisplay});

this.$el.append(nothingToDisplayElement);

}

 

return this;

}

 

 

iv)It will change the containers display text.

5)To change the click event of the Viewlist presents on the container:

i)Navigate to C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\scripts\home\view

ii)Goto workflowView1,change the path of template and modify click event as:

template = require(“text!home/template/workflowTemplate1.htm“),events: {     “click .button.left”: “clickOnLeftButton”,”click .button.center“: “clickOnRightButton” },

iii)Now you are able to see Viewlist at Middle.

6)To remove ViewTutorial from Containers:

i)Goto to C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\scripts\home\Template

ii)In workflowTemplate.html comment or remove the text which shows the ViewTutorial as

<!–{{ if (tutorialControl) { }}<a href=”{{- tutorialControl.entity.url }}” target=”_blank” >{{- tutorialControl.label }}     </a>{{ } }}–>

 

7)To Remove Left Side text from Home Page:

i)Navigate to var C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\scripts\home\Template

ii) Having homeTemplate1.html in that comment or remove the following text as:

<h2 class=”homeSidebar-title” >{{- welcomeMessage }}</h2>

 

8)To display View Menu having only Repository option:

i)Goto /var/lib/tomcat7/webapps/jasperserver-pro/WEB-INF/decorators

ii) In decorators.jsp modify as follows and add assign menu.search,menu.all to administrator

<context name=”main_view_mutton” test=”checkAuthenticationRoles” testArgs=”ROLE_SUPERUSER,ROLE_ADMINISTRATOR,ROLE_REPORTS,ROLE_DASHBOARD,ROLE_ADHOC”> <selectAction labelKey=”menu.repository”>

 

9)To hide Library Menu From Jaspersoft for Above Roles As:

i)Goto C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\WEB-INF\decorators

ii) In decorator.jsp modify it as:

<js:authorize ifAllGranted=”ROLE_ADMINISTRATOR”><li id=”main_library” tabIndex=”-1″ class=”leaf”><p class=”wrap button”><span class=”icon”></span><spring:message code=”menu.library”/>

</p>

</li>

</js:authorize>

It means we are hiding the Library menu for Above Roles but it is Visible to Role Administrator.

10)To optimize your javascript code we need make change in js.config.properties file which is present at path:

C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\WEB-INF

But now we don’t know to create the optimized js code because of that we will keep it as false:

# Control default value of javascript optimization in runtimejavascript.optimize=false

 

 Thanks,
Sayali Mahale

White Labeling  of  JasperSoft

                                                            

White Labeling  of  Jaspersoft

A white-labeling is a service produced by one company for example Jaspersoft, that other companies reband to make it appear as if they had made it. Customers sometimes want to customize the look and feel of the Jasper Reports Server interface by performing customizations. As Jasper Report is open source tool we can customize it.

Jaspersoft Login Page

Such as:

  1. Branding on the  Browser tab and Title Bar
  2. Favicon
  3. Logo
  4. Welcome label
  5. Contact button
  6. About and Copyright
  7. Theme

Let us consider that we are making customization from Jaspersoft to Helical IT Solutions :

To customize Branding on the Browser tab and Title Bar

The Branding on the browser tab and title bar includes the:

  • The company name on the browser tab.
  • The company name on the title bar.

Important Note:
After making changes save the file and first of all Restart the Server then only you are able to see the changes.

To change the company name on browser tab and title Bar :
1) Open this file for editing:
C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\WEB-INF\decorators\decorator.js
2) Change the title as you want in <title> tag.

<html><head><title>Helical IT Solutions: <decorator:title /></title></head></html>

3) Log into the Server.

                                                                                                                                                                                          

To change Favicon

1) Rename your icon to favicon.ico.

2)Copy the icon to this location : C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps

3) Log into the Server.

                                                                                                                                                              

To change Logo

To change the Logo on all pages including Login Page:

1)Navigate to the path:

C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\themes

2)Copy the logo image logo.png with dimension as 141*28 pixels and give it the same name logo.png

3)Log into the server as superuser.

4)Goto View->Repository

5)In the folder panel on left side right click on root/Themes,and select Add Folder.

6)Name the new folder customizations

Capture1

7)Right-click the customizations folder, and select Add Folder,Name the new folder images

8) Add your logo to the images folder:

a. Right-click the images folder and select Add Resource > File > Image

Capture2

The Upload a File From Your Local Computer page appears.
b. Browse to your logo.
c. In the Name field, enter logo.png
d. In the Resource ID field, enter logo.png

Capture3

9)Click Submit .

10)The logo.png file appears in the
Themes > customizations > images folder in the repository.

Now the logo is available on server it appears in the web interface after you perform the procedure “To Add New Theme ” as mention.

                                                                                                                                                                                        

To customize Welcome label

1) Navigate to the path:

C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro \WEB-INF\bundles\

2)Open this file for editing:
jasperserver_messages.properties

3) Search for a Login page in file
Change LOGIN_WELCOME_OS property to Welcome to Helical IT Solutions

#Welcome Login PageLOGIN_WELCOME_OS=Welcome to Helical  IT Solutions# the following 2 strings belong to the same sentenceLOGIN_ONLINE_DEMO_PRE=For a quick look at the functionality, check outLOGIN_ONLINE_DEMO=our online demos.

                                                                                                                                                                

To customize the Contact JasperSoft Button URL And Label

1) Open this file for editing

C:\Jaspersoft\jasperreportsserver5.6\apachetomcat\webapps\jasperserver-pro scripts\
components.loginBox.js

2) Change the URL of the CONTACT_SALES_URL in the loginBox variable definition from the jaspersoft.com address to another address, for example, http://www.helicaltech.com

var loginBox = {LOGIN_BOX_TEMPLATE_DOM_ID: “login”,.. CONTACT_SALES_URL: “http://www.helicaltech.com”,_dom: null,

 

3)Open the following file for editing:

C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\WEB-INF\bundles\
jasperserver_messages.properties

4)Search for the BUTTON_CONTACT_SALES property and the definition from Contact JasperSoft to Contact Helical.
BUTTON_CONTACT_SALES=Contact Helical

                                                                                                                                                                                                                                           To customize About and Copyright

To hide the copyright and About link on all server pages, including the Login page:

1) On the file system of the server, navigate to the \themes directory in the server installation files. By default, this directory is in the following source code location:

C:\Jaspersoft\jasperreports-server-5.6\apache-tomcat\webapps\jasperserver-pro\themes

2) Copy overrides_custom.css to a different location on your hard drive and open it in a CSS editor.

3) Add the following line to the file:

#about, #copyright{display:none;} 

                                                                                                                                                                                                                                            To Add New Theme

To activate the customizations theme :

1) Log into the server as superuser.

2) Click View > Repository

3) In the Folders panel, right-click the customizations folder in Themes,Add themes.css file.

5)Right click the customizations folder select Set as Active Theme.

6)Logout to the server, Restart it ,to see the changes.

 

Thanks ,
Sayali Mahale

How to use Custom Component in Jaspersoft Studio:

How to use Custom Component in Jaspersoft Studio:

This Blog will teach you how to use Custom component in Jaspersoft studio.

A Custom component allows the BI Developer to enhance the functionality of Jasperreports engine by adding some custom visualized components.

By using Custom Component , we can able to develop anything like tables , charts , etc …

Steps to create Custom Component :

# 1.      Go to File -> New -> Others

Custom# 2 .     Select Custom Component

CustomThen Click Next.

# 3. There you will get 3 samples , you can select any one of them and give your Project Name.

Then Click on Next.

d3charts# 4. You can see in the left side , one folder is created named same as the above metioned name.

project explorer

# 5. Right click on build.js -> Buid Component

# 6.After thet In the same folder double click “d3_Circle_sample.jrxml” , Preview it

You will get the Output as :

output

 

 

Thanks ,

Rupam Bhardwaj

 

Creating a custom template with Jaspersoft Studio

Creating a custom template with Jaspersoft Studio

Create the Structure

Creating template is nothing more than a standard report where some elements have a precise and fixed name that is used by the Jaspersoft Studio engine to understand where to place every element.

The First thing is to create new report from File -> New -> Jasper Report. We can start with blank report or selecting one of the other templates as a starting point.

Now Design the template as par your requirement .Creating the template is same as that of generating the report.

I have created like this

Report Template

Now switch to the Preview mode and look if the result is what you want and if it is allright you can continue with the export operation.

Export the Template

To start the export wizard select click File -> Export as Report Template.

In the first dialog you will see all the resources that will be exported. Between these resources you can fine the template and other files used by it, in our example you will see the one image. In this step you will need also to select the destination folder, where the template and all his resources will be placed.

Template Export

When you have finished press Next.

Here you can define the categories where your template will be visible inside the New Report Wizard.  You can select any number of categories or your own category. To define a custom category you need only to type its name inside the text area on the bottom and press the Add button. Then your category will be added to Selected Categories list. Then your category will be added to Selected Categories list.

At this point you need to select the correct type of report, for example if it is a Tabular Report or a standard one.
Template Type and Categories

At this point you can see two different steps:

  • The first one, and the one that should appear follwoing this tutorial, is a congratulations step. It means that the template you designed is valid for the report type you have selected in the previous step.
  • The second one is a list of error messages if the template you designed is not valid for the selected type because of some design errors. For example for a template with Tabular type is expected a table in the summary band. If this table is not found it’s probably a design error. In this step all the design errors found are listed so you can look to what is wrong and fix it.

5(30)
 

OR

 
6(22)

 

In both the cases we can export the template and all resources by clicking the finish button.

In second case may your template should not work while generating the report.

Add the Templates location to Studio

  1. Now you have to put your custom template for studio.
  2. Navigate to Windows ->Preferences. A new Preferences window open.
  3. From the Left panel expand the category Jaspersoft Studio and select Template Locations.
  4. Click on New and browse the folder where you have saved template jrxml file.

Refer the screenshot below:
5(14)

Test the new template

  1. Open Jaspersoft studio.
  2. Navigate to File > New > Jasper Report.

A new Report wizard will open.
Template

  1. Select the template that you have added. Then Report will open as shown below:

Report Template
 
-By
Nitin Uttarwar
Helical It Solution