SlideShare uma empresa Scribd logo
1 de 19
1
Chapter 1
Setting Up a New Jasperserver
1.1 Introduction to JasperReports Server
Jasper Reports Server is a stand-alone and embeddable reporting server. It provides reporting
and analytics that can be embedded into a web or mobile application as well as operate as a
central information hub for the enterprise by delivering mission critical information on a real-
time or scheduled basis to the browser, mobile device, printer, or email inbox in a variety of file
formats. Jasper Reports Server is optimized to share, secure, and centrally manage your
Jaspersoft reports and analytic views.
1.2 Authentication and roles to users
Before users can access reports in JasperReports Server, they need to be assigned a user
ID and password. Creating roles determines which users can see which repository resources.
Users can have multiple roles, and roles can have multiple users.
User accounts and role membership provide authentication and authorization mechanisms to
implement access control in JasperReports Server. Users enter an organization name if required,
a login name, and a password in order to access JasperReports Server. Administrators assign
named roles to users and then create role-based permissions to further restrict access to objects in
the repository and to data in Domains. Administrators use the management interface in
JasperReports Server to create roles and users. Once users and roles have been defined,
administrators will define access control list based access to objects within the repository based
on user or role.
1.2.1 Create Roles
Follow these steps to create a new role in JasperReports Server.
2
● Log into JasperServer as the Administrator
● username: jasperadmin
● password: jasperadmin
● From the Home Page, go to Manage > Roles
● From the Manage Roles page, click the Add Role… button just under the search box.
● Enter the desired role name in the Role Name (required) textbox
● Click Add Role
1.2.2 Create Users
Follow these steps to create new users.
● From the Home Page, go to Manage > Users.
● From the Manager Users page, click the Add User… button just under the search box.
● Enter the desired User name, User ID (required), Email, and the desired password in both
the Password (required) and Confirm Password (required) fields.
● Click the Enable this user checkbox, if it's not checked. (It should be checked by default)
● Click Add User
1.2.3 Assign Users
Follow these steps to assign users to the roles you created.
● From the Home Page, go to Manage > Users
● Select the desired user
● Click the Edit button in the Properties section
● Two Tabs will appear below the Properties Section Title. One will be named Properties,
the other, Attributes.
● At the bottom of the Properties Section, there will be two panes, Roles Available and
Roles Assigned. Each pane has a search box to find the desired Roles.
● Select the desired role to Assign or Deassign and use the left and right arrow buttons to
move Roles back and forth.
3
● Click the right arrow button in the middle of the form to move the role, Added Role, to
the Roles Assigned: section
● Click Save.
1.2.4 Setting Permissions
Administrators can assign permissions to access any folder or resource throughout the repository.
Users with the Administer permission on a folder can assign permissions to that folder and any
contents that inherit the permission. Users granted Administer permission to a resource can only
set the permissions on that specific resource.
To set permissions on a folder or resource in the repository:
1. Log in as a user with administrative privileges.
2. In the repository, browse or search for the folder or resource.
3.Right-click the object and select Permissions... from the context menu
The Permissions dialog opens. It shows the permissions in effect for the selected object. By
default, it first shows the permissions given to roles. Permissions that are inherited from the
object’s parent are indicated by an asterisk (*).
1.3 Scheduling Reports
Using the report scheduler wizard, you set up a job, report parameters, and output options:
• Set up a job – A job name, when to run the job, and how often
•Report parameters – If the report was designed with input controls, which parameters the
job will use
•Output options – Where to store the output, in which formats, the locale, and email options
for sending the output as an attachment
Jobs that you schedule run the reports in the background so you can use the server while the
report runs.
The permissions of the user who schedules a job determine the data that the report exposes. For
example, Gloria only has access to inventory data from the Southeast US region. A report that
4
she schedules only shows data from that region, even when the report is viewed by users in other
regions. Other users schedule the report themselves to see the data for their own regions.
1.3.1 Setting up a job
To set up a job:
● On the Home page, click View Reports; or from any page, click View >
Repository.
● Use the search field or browse the list of reports to find the report you want to
schedule.
● Right-click the report and select Schedule... from the context menu. The
Scheduled Jobs page appears and also shows the list of schedules.
● Click Schedule Job.
● In the Job Name field, enter a name for the job, for example, Weekly Report. The
description is optional.
● Set these schedule attributes like start, time zone, recurrence.
● Schedule the job to start at a specific time, click next.
● Choose a set of saved values, or set the input controls, click next.
● Set output options, as described in the next section, and click Submit to schedule
the job.
1.3.2 Setting Output Options
On the Output Details page, you can change these settings:
•Base Output Filename – The name of the file as it appears in the repository.
•Output Description – The optional description of the file that appears to users who view
the repository.
•Output Format – The available output formats. Select one, or accept the default format,
PDF. When you select more than one, each format is stored as a separate file in the
repository and attached as a separate file to the email notification.
• Output Locale – The locale settings for generating the report.
When you click Submit, the job appears in the list of scheduled jobs.
5
Chapter 2
iReports
2.1 Introduction
iReport is the free, open source report designer for JasperReports and JasperReports Server.
Create very sophisticated layouts containing charts, images, subreports, crosstabs and much
more. Access your data through JDBC, Table Models, JavaBeans, XML, Hibernate, CSV, and
custom sources. Then publish your reports as PDF, RTF, XML, XLS, CSV, HTML, XHTML,
text, DOCX, or OpenOffice.
6
Fig. 2.1 iReport Designer
2.2 Designing a Report
The report creation process has three main steps:
1. Creating a data source or a database connection used to fill the report.
2. Designing the report, including the layout of its elements and parameters to represent the
data.
3. Running the report, which includes compiling the JRXML source file in a Jasper file and
filling in the data for export or onscreen display.
The main purpose of any reporting tool is to produce high quality documents. Report filling
process helps reporting tool to achieve this by manipulating sets of data.
2.2.1 Steps:
1. To create the new connection in iReport, open the data sources/connections dialog by clicking
its icon in the toolbar.
2. Click New, choose Database JDBC connection and use the following settings for the sample
MySQL database.
3. Create the new report. Select File > New.
4. In the template chooser that appears, select a blank report and click Open this Template. Select
a name and location to store the new file, click next and then finish.
5. Click the button representing a database query in the designer toolbar.
6. This opens the Query dialog to define the query that retrieves data to fill the report. The SQL
query is stored inside the report and can accept parameters to filter the data using the syntax
$P{} (for standard parameters) and $P!{} (to use a parameter as SQL chunk).
7
7. As you type the query, iReport executes it to extract all the fields (columns) available in the
query. The fields are listed on the bottom portion of the window. If there is an error in the SQL,
you'll get a message that explains what's wrong. When the query is valid, click OK. iReport lists
all the discovered fields in the report inspector, so they can be used in the report and displayed
using text fields and other elements.
8. To print the value of a field in the report, drag a field object from the report inspector to the
design view. For example, drag a field into the detail band, a section of the report that is printed
for each record/row in the query results. The title and the summary bands are printed just once in
each report, while the page header and footer are printed once at the top and bottom of each
page, respectively.
9. When the field object is dragged inside the detail band, iReport creates a textfield element and
sets the text field expression for that element to $F{NAME}. This is a simple expression to print
the value of the field SHIPNAME (the syntax $F{}). Repeat the same operation for other fields
and format the text fields element by stretching, dragging and aligning them. It is important that
the textfields are all placed within the detail band.
To add other elements (such lines or labels), drag them from the palette into the designer view,
then resize and arrange them as desired.
8
Chapter 3
Upload of CSP Target Report
3.1 Introduction
Eko India Financial Services Pvt. Ltd. is a leading Indian fintech company, service for
State Bank of India (SBI), ICICI Bank India's two largest banks and Yes Bank. Today it has
180,000 users doing more than 6,000 money transfer transactions a day through a network of 700
"branches" (banking agents), in which neighbourhood grocery and pharmacy stores serve as
"Customer Service Points" (CSP), in Delhi NCR, six districts of Bihar and one district of
Jharkhand state, processing Rs. 35 million every day, in 2010 more than Rs. 1 billion were
processed through its branches. This allowed account holders to carry out financial transactions
like deposit and withdrawal from their accounts through their mobile phones at various SBI Eko
Customer Service Points, like local grocery stores, stationery stores, petrol pumps, PCOs and
pharmaceutical shops in far flung villages of Bihar and Jharkhand and Delhi, where the low-
wage people rarely have access to a banking system. Eko’s innovation was to enlist these
retailers to become “Eko outlets” aka Customer Service Points (CSPs).
3.1.1 Simpli Bank
The Simpli Bank platform is a hosted and managed, low-cost, abridged Core Banking System.
Simpli Bank has/supports multiple features:
● A standard double entry accounting system
● Multiple types of accounts- savings, current, money transfer, loan, etc.
● Customer and network management modules
● Definable interest accrual and posting system based on Indian banking guidelines
● Configurable limits and fees as per RBI’s AML/CFT requirements
● Secure signature (OkeKey) booklet
● Real-time transactions through a three factor authentication system
● User/system management and audit trails
3.2 Frameworks Used
3.2.1 Struts
9
Struts is popular and mature web application framework based on the MVC design pattern. The
WebWork framework started off with Struts framework as the basis and its goal was to offer an
enhanced and improved framework built on Struts to make web development easier for the
developers.
After some time, the WebWork framework and the Struts community joined hands to create the
famous Struts framework. Apache Struts is an open-source web application framework for
developing Java EE web applications. It uses and extends the Java Servlet API to encourage
developers to adopt a model–view–controller (MVC) architecture.
3.2.2 Hibernate
Hibernate is an Object-Relational Mapping(ORM) solution for JAVA and it raised as an open
source persistence framework. It is a powerful, high performance Object-Relational Persistence
and Query service for any Java Application.
Hibernate maps Java classes to database tables and from Java data types to SQL data types and
relieve the developer from 95% of common data persistence related programming tasks.
3.2.3 Apache POI library
Apache POI is a popular API that allows programmers to create, modify, and
display MS Office files using Java programs. It is an open source library
developed and distributed by Apache Software Foundation to design or
modify Microsoft Office files using Java program. It contains classes and
methods to decode the user input data or a file into MS Office documents.
Many a time, a software application is required to generate reports in
Microsoft Excel file format. Sometimes, an application is even expected to
receive Excel files as input data. For example, an application developed for
the Finance department of a company will be required to generate all their
outputs in Excel.
10
3.3 Implementation
Fig. 3.1 Webpage to upload CSPTarget file
Steps involved for uploading customer service point(CSP) target
● Import Simpli Bank into local host server
● Open eclipse and import the Simpli Bank project into the eclipse
● Libraries required to read XLSX files
o poi-3.14-20160307.jar
o poi-ooxml-3.14-20160307.jar
o poi-ooxml-schemas-3.14-20160307.jar
o log4j-1.2.17.jar
o xmlbeans-2.6.0.jar
● Create java file CSPTargetReportActionForm.java, CSPTargetReportAction.java and jsp
page CSPTargetReport.jsp.
● Link these java files and jsp files in struts-config.xml
● In CSPTargetReport.jsp create a frontend web page containing upload icon to upload
CSPTarget xlsx file, drop down box of each month, second dropdown box containing the
11
present and the next year and submit button to upload the file in selected month and the
year.
● In CSPTargetReportActionForm.java file, declare variables that are used in above jsp file
like uploadedFile, month, year and also create getters and setters of each variable used
and constructor containing these variables.
● In CSPTargetReportAction.java file, add functions like load and validate to verify
whether the url is genuine or not.
● Create three java files named CSPTargetReport.java, CSPTargetReportWeekly.java and
CSPTargetReportDaily.java and create three Hibernate files CSPTargetReport.hbm.xml,
CSPTargetReportWeekly.hbm.xml and CSPTargetReportDaily.hbm.xml.
● Map these three java files with hbm.xml files using hibernate.hbm.xml.
● Mention the required table names and their columns into three hbm.xml files.
● In the three java files create variable names should be same as their column names and
also create getters and setters of each variable used and constructor containing these
variables.
● In CSPTargetReportAction.java file, create a function named uploadFile.
● In uploadFile function we first read the xlsx files and checked whether the data is valid or
not for each cspcode.
● Then, we stored the first row into csptargets table and daily targets into csptarget_daily
and weekly targets into csptarget_weekly.
● In case, any error occurs during uploading the whole data in xlsx will be rolled back.
● Care should be taken that we should not refresh the page.
● As soon as the xlsx file is uploaded, function uploadFile will upload the target.xlsx file
into the three tables of database ekodb_icici named csptargets, csptarget_weekly,
csptarget_daily.
● It also stores the backup copy of this xlsx file for future reference.
3.4 Output
12
The uploaded csptarget.xlsx file has first row containing csp codes, second row containing
volume of that csp code in the given month and next 30-31 rows contain the daily volume of that
csp code in the given month and the next 4-5 rows contain the weekly volume of that csp code in
the given month.
When the CSPTarget.xlsx file is uploaded following output is shown:
● Total NEW CSP code uploaded
This states that the number of new csp codes that are being introduced in this month and
their respective targets.
● Total CSP Code NOT uploaded.
This states that those csp code that don’t exist or csp code contains some invalid data like
it contains string value or it has been left blank.
● Total CSP Code updated.
This states that the number of csp codes that already exist and their volumes have been
updated.
● Total CSP Code of this month.
This states that the total number of csp codes in that specific month.
● Total Volume Monthly.
This states that the total volume of all csp codes in that specific month.
13
Fig. 3.2 Output when file is uploaded
Fig. 3.3 Output saved in csptargets table
Fig. 3.4 Output saved in csptarget_weekly table
14
Fig. 3.5 Output saved in csptarget_daily table
3.5 Problems Faced
Following problems faced were:
● Number of commits
Initially while uploading the xlsx file we perform commits each time when a new csp
code is found as a result of which, it took nearly one hour to upload 5000 rows of files.
Instead we saved each data of the new csp code and performed commits only once. As a
result, file was uploaded within 2-4 minutes.
● Updation of the existing csp codes
Initially when we uploading the xlsx file it overrides the data of that month and the old
data was lost, so to handle this we added updation feature which updated the existing csp
codes and added the new csp codes instead of overriding the entire data.
● Validation of csp code
15
Initially we didn’t check whether the csp code is valid or not and the volume of each cap
code is correct or not. So we performed checks before uploading into the database like
checking if it contains a string or the place has been left blank making sure that it
contains only integer values.
Chapter 4
Storing user’s IP Address
4.1 Introduction
An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g.,
computer, printer) participating in a computer network that uses the Internet Protocol for
communication. An IP address serves two principal functions: host or network interface
identification and location addressing. Its role has been characterized as follows: "A name
indicates what we seek. An address indicates where it is. A route indicates how to get there."
The designers of the Internet Protocol defined an IP address as a 32-bit number and this
system, known as Internet Protocol Version 4 (IPv4), is still in use today. However, because of
the growth of the Internet and the predicted depletion of available addresses, a new version of IP
(IPv6), using 128 bits for the address, was developed in 1995. IPv6 was standardized as RFC
2460 in 1998, and its deployment has been ongoing since the mid-2000s. IP addresses are
16
usually written and displayed in human-readable notations, such as 172.16.254.1 (IPv4), and
2001:db8:0:1234:0:567:8:1 (IPv6).
Fig. 4.1 IP Address Classes
4.2 Implementation
We added this feature such that just before the user logs into the website his local and private IP
address will be stored into database and at what time they have logged into the website will also
be stored in there.
17
Fig. 4.2 Program to store IP address
Steps for storing the IP address:
● We will first get the person id who is logging into the website using getPersonnelId()
● We will then store the users Private IP address.
● Using bot of whatismyipaddress we will store the users Public IP address.
● We store the login time by using Date class.
Fig. 4.3 IP address is captured
18
Fig. 4.4 IP address is stored in database
4.3 Importance
IP addresses are an integral part of any corporate network, and companies large and small
are consuming them faster with more applications and devices than ever before. Overlooking the
importance of getting a handle on IP addresses can prove disastrous.
IP addresses are one of the most critical resources that need to be managed in any
network. Every networked application and device -- from e-mail and Web connectivity to file
storage and networked printers -- depends on IP and requires address assignment. That presents a
big enough challenge, but it's becoming an even bigger challenge as new core services like VoIP
and mobile networks increase IP address assignment needs, requiring more robust allocation,
classification, and tracking of addresses. This is known collectively as IP address management
(IPAM).
Storing of IP address into the database makes the administrator to keep a watch on who is
logging into website and from where and at what period of time. It is helpful at times when
website gets hacked by someone. At that time, we can check who were logged in at that time and
we can take actions on them and can easily find who was the culprit.
19
References
Online
[1] JasperSoft from http://community.jaspersoft.com/wiki/what-jasperreports-server
[2] iReports from http://community.jaspersoft.com/wiki/getting-started-ireport-designer
[3] Simpli Bank from https://en.wikipedia.org/wiki/Eko_India_Financial_Services
[4] Struts from http://www.tutorialspoint.com/struts_2/
[5] Hibernate from http://www.tutorialspoint.com/hibernate/
[6] IP address from https://en.wikipedia.org/wiki/IP_address

Mais conteúdo relacionado

Mais procurados

Tutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft AccessTutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft Access
mcclellm
 
Access presentation
Access presentationAccess presentation
Access presentation
DUSPviz
 
Mastering informatica log files
Mastering informatica log filesMastering informatica log files
Mastering informatica log files
Amit Sharma
 
Altering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request FormAltering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request Form
Edwin Jackson
 
Data_Processing_Program
Data_Processing_ProgramData_Processing_Program
Data_Processing_Program
Neil Dahlqvist
 

Mais procurados (20)

Project Presentation
Project PresentationProject Presentation
Project Presentation
 
Tutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft AccessTutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft Access
 
Microsoft Access 2007: Get To Know Access
Microsoft Access 2007: Get To Know AccessMicrosoft Access 2007: Get To Know Access
Microsoft Access 2007: Get To Know Access
 
Access presentation
Access presentationAccess presentation
Access presentation
 
OBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - TutorialOBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - Tutorial
 
Dream for Oracle Quick Start User Guide
Dream for Oracle Quick Start User GuideDream for Oracle Quick Start User Guide
Dream for Oracle Quick Start User Guide
 
Mastering informatica log files
Mastering informatica log filesMastering informatica log files
Mastering informatica log files
 
IMPORT AND EXPORT UTILITIES IN MS-ACCESS
IMPORT AND EXPORT UTILITIES IN MS-ACCESSIMPORT AND EXPORT UTILITIES IN MS-ACCESS
IMPORT AND EXPORT UTILITIES IN MS-ACCESS
 
Universe
UniverseUniverse
Universe
 
Ms access
Ms accessMs access
Ms access
 
Altering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request FormAltering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request Form
 
Data_Processing_Program
Data_Processing_ProgramData_Processing_Program
Data_Processing_Program
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
 
MS Access Training
MS Access TrainingMS Access Training
MS Access Training
 
社會網絡分析UCINET Quick Start Guide
社會網絡分析UCINET Quick Start Guide社會網絡分析UCINET Quick Start Guide
社會網絡分析UCINET Quick Start Guide
 
Ms access Database
Ms access DatabaseMs access Database
Ms access Database
 
Sas UTR How To Create Your UTRs Sep2009
Sas UTR How To Create Your UTRs Sep2009Sas UTR How To Create Your UTRs Sep2009
Sas UTR How To Create Your UTRs Sep2009
 
001.general
001.general001.general
001.general
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
 
How to debug a fast formula
How to debug a fast formulaHow to debug a fast formula
How to debug a fast formula
 

Destaque

Neptune and Pluto!!!!!!!
Neptune and Pluto!!!!!!!Neptune and Pluto!!!!!!!
Neptune and Pluto!!!!!!!
dunhamg
 
Manual
ManualManual
Manual
L1237H
 
Exemplo 3
Exemplo 3Exemplo 3
Exemplo 3
rodezio
 

Destaque (16)

Exercícios de língua portuguesa substantivos e adjetivos
Exercícios de língua portuguesa substantivos e adjetivosExercícios de língua portuguesa substantivos e adjetivos
Exercícios de língua portuguesa substantivos e adjetivos
 
Neptune and Pluto!!!!!!!
Neptune and Pluto!!!!!!!Neptune and Pluto!!!!!!!
Neptune and Pluto!!!!!!!
 
Test
TestTest
Test
 
Post Tour Expoeventos 2014
Post Tour Expoeventos 2014Post Tour Expoeventos 2014
Post Tour Expoeventos 2014
 
Proyecto i
Proyecto iProyecto i
Proyecto i
 
Presentación colegio panama
Presentación colegio panamaPresentación colegio panama
Presentación colegio panama
 
Manual
ManualManual
Manual
 
Exemplo 3
Exemplo 3Exemplo 3
Exemplo 3
 
Alejandra caicedo tamayo, el respeto
Alejandra caicedo tamayo, el respetoAlejandra caicedo tamayo, el respeto
Alejandra caicedo tamayo, el respeto
 
AMAN-CV v4
AMAN-CV v4AMAN-CV v4
AMAN-CV v4
 
efewf
efewfefewf
efewf
 
Apresentacao emgoldex ouro oficial
Apresentacao emgoldex ouro oficialApresentacao emgoldex ouro oficial
Apresentacao emgoldex ouro oficial
 
Como planejar suas vendas em 2017 com o Google
Como planejar suas vendas em 2017 com o GoogleComo planejar suas vendas em 2017 com o Google
Como planejar suas vendas em 2017 com o Google
 
Ley de amnistía e indulto, proceso de paz entre el Gobierno y las FARC
Ley de amnistía e indulto, proceso de paz entre el Gobierno y las FARCLey de amnistía e indulto, proceso de paz entre el Gobierno y las FARC
Ley de amnistía e indulto, proceso de paz entre el Gobierno y las FARC
 
Quando o desespero bate a porta
Quando o desespero bate a portaQuando o desespero bate a porta
Quando o desespero bate a porta
 
spring bed comforta anak
spring bed comforta anakspring bed comforta anak
spring bed comforta anak
 

Semelhante a synopsis

Demo Guidebook 040110
Demo Guidebook 040110Demo Guidebook 040110
Demo Guidebook 040110
Brad Ganas
 
Creating a data report in visual basic 6
Creating a data report in visual basic 6Creating a data report in visual basic 6
Creating a data report in visual basic 6
mrgulshansharma
 
Design Document Sample
Design Document SampleDesign Document Sample
Design Document Sample
Steve Smith
 
Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...
Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...
Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...
guest96f6c68d
 
Informatica PowerAnalyzer 4.0 3 of 3
Informatica PowerAnalyzer 4.0 3 of 3Informatica PowerAnalyzer 4.0 3 of 3
Informatica PowerAnalyzer 4.0 3 of 3
ganblues
 
Smart view for-planning-part-ii
Smart view for-planning-part-iiSmart view for-planning-part-ii
Smart view for-planning-part-ii
Amit Sharma
 
Create a basic performance point dashboard epc
Create a basic performance point dashboard   epcCreate a basic performance point dashboard   epc
Create a basic performance point dashboard epc
EPC Group
 
SOP_ERP_AdministrationModule
SOP_ERP_AdministrationModuleSOP_ERP_AdministrationModule
SOP_ERP_AdministrationModule
Sunil Mukadam
 

Semelhante a synopsis (20)

Demo Guidebook 040110
Demo Guidebook 040110Demo Guidebook 040110
Demo Guidebook 040110
 
MicroStrategy Basic Reporting.pptx
MicroStrategy Basic Reporting.pptxMicroStrategy Basic Reporting.pptx
MicroStrategy Basic Reporting.pptx
 
Style Intelligence User Documentation
Style Intelligence User DocumentationStyle Intelligence User Documentation
Style Intelligence User Documentation
 
Creating a data report in visual basic 6
Creating a data report in visual basic 6Creating a data report in visual basic 6
Creating a data report in visual basic 6
 
Design Document Sample
Design Document SampleDesign Document Sample
Design Document Sample
 
Pnbhfl training final
Pnbhfl training finalPnbhfl training final
Pnbhfl training final
 
Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...
Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...
Developing Dynamic PeopleSoft Field Security Applications:A PeopleSoft Develo...
 
Management of database information system
Management of database information systemManagement of database information system
Management of database information system
 
Attach
AttachAttach
Attach
 
Access5
Access5Access5
Access5
 
obiee-training-obiee-11g-bi-publisher.pdf
obiee-training-obiee-11g-bi-publisher.pdfobiee-training-obiee-11g-bi-publisher.pdf
obiee-training-obiee-11g-bi-publisher.pdf
 
BEX.pptx
BEX.pptxBEX.pptx
BEX.pptx
 
Informatica PowerAnalyzer 4.0 3 of 3
Informatica PowerAnalyzer 4.0 3 of 3Informatica PowerAnalyzer 4.0 3 of 3
Informatica PowerAnalyzer 4.0 3 of 3
 
SAP BO Web Intelligence (BI Launch Pad)-Basics
SAP BO Web Intelligence (BI Launch Pad)-BasicsSAP BO Web Intelligence (BI Launch Pad)-Basics
SAP BO Web Intelligence (BI Launch Pad)-Basics
 
SAP BO Web Intelligence Basics
SAP BO Web Intelligence BasicsSAP BO Web Intelligence Basics
SAP BO Web Intelligence Basics
 
Smart view for-planning-part-ii
Smart view for-planning-part-iiSmart view for-planning-part-ii
Smart view for-planning-part-ii
 
Create a basic performance point dashboard epc
Create a basic performance point dashboard   epcCreate a basic performance point dashboard   epc
Create a basic performance point dashboard epc
 
Informatica cloud Powercenter designer
Informatica cloud Powercenter designerInformatica cloud Powercenter designer
Informatica cloud Powercenter designer
 
SOP_ERP_AdministrationModule
SOP_ERP_AdministrationModuleSOP_ERP_AdministrationModule
SOP_ERP_AdministrationModule
 
Office excel tips and tricks 201101
Office excel tips and tricks 201101Office excel tips and tricks 201101
Office excel tips and tricks 201101
 

synopsis

  • 1. 1 Chapter 1 Setting Up a New Jasperserver 1.1 Introduction to JasperReports Server Jasper Reports Server is a stand-alone and embeddable reporting server. It provides reporting and analytics that can be embedded into a web or mobile application as well as operate as a central information hub for the enterprise by delivering mission critical information on a real- time or scheduled basis to the browser, mobile device, printer, or email inbox in a variety of file formats. Jasper Reports Server is optimized to share, secure, and centrally manage your Jaspersoft reports and analytic views. 1.2 Authentication and roles to users Before users can access reports in JasperReports Server, they need to be assigned a user ID and password. Creating roles determines which users can see which repository resources. Users can have multiple roles, and roles can have multiple users. User accounts and role membership provide authentication and authorization mechanisms to implement access control in JasperReports Server. Users enter an organization name if required, a login name, and a password in order to access JasperReports Server. Administrators assign named roles to users and then create role-based permissions to further restrict access to objects in the repository and to data in Domains. Administrators use the management interface in JasperReports Server to create roles and users. Once users and roles have been defined, administrators will define access control list based access to objects within the repository based on user or role. 1.2.1 Create Roles Follow these steps to create a new role in JasperReports Server.
  • 2. 2 ● Log into JasperServer as the Administrator ● username: jasperadmin ● password: jasperadmin ● From the Home Page, go to Manage > Roles ● From the Manage Roles page, click the Add Role… button just under the search box. ● Enter the desired role name in the Role Name (required) textbox ● Click Add Role 1.2.2 Create Users Follow these steps to create new users. ● From the Home Page, go to Manage > Users. ● From the Manager Users page, click the Add User… button just under the search box. ● Enter the desired User name, User ID (required), Email, and the desired password in both the Password (required) and Confirm Password (required) fields. ● Click the Enable this user checkbox, if it's not checked. (It should be checked by default) ● Click Add User 1.2.3 Assign Users Follow these steps to assign users to the roles you created. ● From the Home Page, go to Manage > Users ● Select the desired user ● Click the Edit button in the Properties section ● Two Tabs will appear below the Properties Section Title. One will be named Properties, the other, Attributes. ● At the bottom of the Properties Section, there will be two panes, Roles Available and Roles Assigned. Each pane has a search box to find the desired Roles. ● Select the desired role to Assign or Deassign and use the left and right arrow buttons to move Roles back and forth.
  • 3. 3 ● Click the right arrow button in the middle of the form to move the role, Added Role, to the Roles Assigned: section ● Click Save. 1.2.4 Setting Permissions Administrators can assign permissions to access any folder or resource throughout the repository. Users with the Administer permission on a folder can assign permissions to that folder and any contents that inherit the permission. Users granted Administer permission to a resource can only set the permissions on that specific resource. To set permissions on a folder or resource in the repository: 1. Log in as a user with administrative privileges. 2. In the repository, browse or search for the folder or resource. 3.Right-click the object and select Permissions... from the context menu The Permissions dialog opens. It shows the permissions in effect for the selected object. By default, it first shows the permissions given to roles. Permissions that are inherited from the object’s parent are indicated by an asterisk (*). 1.3 Scheduling Reports Using the report scheduler wizard, you set up a job, report parameters, and output options: • Set up a job – A job name, when to run the job, and how often •Report parameters – If the report was designed with input controls, which parameters the job will use •Output options – Where to store the output, in which formats, the locale, and email options for sending the output as an attachment Jobs that you schedule run the reports in the background so you can use the server while the report runs. The permissions of the user who schedules a job determine the data that the report exposes. For example, Gloria only has access to inventory data from the Southeast US region. A report that
  • 4. 4 she schedules only shows data from that region, even when the report is viewed by users in other regions. Other users schedule the report themselves to see the data for their own regions. 1.3.1 Setting up a job To set up a job: ● On the Home page, click View Reports; or from any page, click View > Repository. ● Use the search field or browse the list of reports to find the report you want to schedule. ● Right-click the report and select Schedule... from the context menu. The Scheduled Jobs page appears and also shows the list of schedules. ● Click Schedule Job. ● In the Job Name field, enter a name for the job, for example, Weekly Report. The description is optional. ● Set these schedule attributes like start, time zone, recurrence. ● Schedule the job to start at a specific time, click next. ● Choose a set of saved values, or set the input controls, click next. ● Set output options, as described in the next section, and click Submit to schedule the job. 1.3.2 Setting Output Options On the Output Details page, you can change these settings: •Base Output Filename – The name of the file as it appears in the repository. •Output Description – The optional description of the file that appears to users who view the repository. •Output Format – The available output formats. Select one, or accept the default format, PDF. When you select more than one, each format is stored as a separate file in the repository and attached as a separate file to the email notification. • Output Locale – The locale settings for generating the report. When you click Submit, the job appears in the list of scheduled jobs.
  • 5. 5 Chapter 2 iReports 2.1 Introduction iReport is the free, open source report designer for JasperReports and JasperReports Server. Create very sophisticated layouts containing charts, images, subreports, crosstabs and much more. Access your data through JDBC, Table Models, JavaBeans, XML, Hibernate, CSV, and custom sources. Then publish your reports as PDF, RTF, XML, XLS, CSV, HTML, XHTML, text, DOCX, or OpenOffice.
  • 6. 6 Fig. 2.1 iReport Designer 2.2 Designing a Report The report creation process has three main steps: 1. Creating a data source or a database connection used to fill the report. 2. Designing the report, including the layout of its elements and parameters to represent the data. 3. Running the report, which includes compiling the JRXML source file in a Jasper file and filling in the data for export or onscreen display. The main purpose of any reporting tool is to produce high quality documents. Report filling process helps reporting tool to achieve this by manipulating sets of data. 2.2.1 Steps: 1. To create the new connection in iReport, open the data sources/connections dialog by clicking its icon in the toolbar. 2. Click New, choose Database JDBC connection and use the following settings for the sample MySQL database. 3. Create the new report. Select File > New. 4. In the template chooser that appears, select a blank report and click Open this Template. Select a name and location to store the new file, click next and then finish. 5. Click the button representing a database query in the designer toolbar. 6. This opens the Query dialog to define the query that retrieves data to fill the report. The SQL query is stored inside the report and can accept parameters to filter the data using the syntax $P{} (for standard parameters) and $P!{} (to use a parameter as SQL chunk).
  • 7. 7 7. As you type the query, iReport executes it to extract all the fields (columns) available in the query. The fields are listed on the bottom portion of the window. If there is an error in the SQL, you'll get a message that explains what's wrong. When the query is valid, click OK. iReport lists all the discovered fields in the report inspector, so they can be used in the report and displayed using text fields and other elements. 8. To print the value of a field in the report, drag a field object from the report inspector to the design view. For example, drag a field into the detail band, a section of the report that is printed for each record/row in the query results. The title and the summary bands are printed just once in each report, while the page header and footer are printed once at the top and bottom of each page, respectively. 9. When the field object is dragged inside the detail band, iReport creates a textfield element and sets the text field expression for that element to $F{NAME}. This is a simple expression to print the value of the field SHIPNAME (the syntax $F{}). Repeat the same operation for other fields and format the text fields element by stretching, dragging and aligning them. It is important that the textfields are all placed within the detail band. To add other elements (such lines or labels), drag them from the palette into the designer view, then resize and arrange them as desired.
  • 8. 8 Chapter 3 Upload of CSP Target Report 3.1 Introduction Eko India Financial Services Pvt. Ltd. is a leading Indian fintech company, service for State Bank of India (SBI), ICICI Bank India's two largest banks and Yes Bank. Today it has 180,000 users doing more than 6,000 money transfer transactions a day through a network of 700 "branches" (banking agents), in which neighbourhood grocery and pharmacy stores serve as "Customer Service Points" (CSP), in Delhi NCR, six districts of Bihar and one district of Jharkhand state, processing Rs. 35 million every day, in 2010 more than Rs. 1 billion were processed through its branches. This allowed account holders to carry out financial transactions like deposit and withdrawal from their accounts through their mobile phones at various SBI Eko Customer Service Points, like local grocery stores, stationery stores, petrol pumps, PCOs and pharmaceutical shops in far flung villages of Bihar and Jharkhand and Delhi, where the low- wage people rarely have access to a banking system. Eko’s innovation was to enlist these retailers to become “Eko outlets” aka Customer Service Points (CSPs). 3.1.1 Simpli Bank The Simpli Bank platform is a hosted and managed, low-cost, abridged Core Banking System. Simpli Bank has/supports multiple features: ● A standard double entry accounting system ● Multiple types of accounts- savings, current, money transfer, loan, etc. ● Customer and network management modules ● Definable interest accrual and posting system based on Indian banking guidelines ● Configurable limits and fees as per RBI’s AML/CFT requirements ● Secure signature (OkeKey) booklet ● Real-time transactions through a three factor authentication system ● User/system management and audit trails 3.2 Frameworks Used 3.2.1 Struts
  • 9. 9 Struts is popular and mature web application framework based on the MVC design pattern. The WebWork framework started off with Struts framework as the basis and its goal was to offer an enhanced and improved framework built on Struts to make web development easier for the developers. After some time, the WebWork framework and the Struts community joined hands to create the famous Struts framework. Apache Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. 3.2.2 Hibernate Hibernate is an Object-Relational Mapping(ORM) solution for JAVA and it raised as an open source persistence framework. It is a powerful, high performance Object-Relational Persistence and Query service for any Java Application. Hibernate maps Java classes to database tables and from Java data types to SQL data types and relieve the developer from 95% of common data persistence related programming tasks. 3.2.3 Apache POI library Apache POI is a popular API that allows programmers to create, modify, and display MS Office files using Java programs. It is an open source library developed and distributed by Apache Software Foundation to design or modify Microsoft Office files using Java program. It contains classes and methods to decode the user input data or a file into MS Office documents. Many a time, a software application is required to generate reports in Microsoft Excel file format. Sometimes, an application is even expected to receive Excel files as input data. For example, an application developed for the Finance department of a company will be required to generate all their outputs in Excel.
  • 10. 10 3.3 Implementation Fig. 3.1 Webpage to upload CSPTarget file Steps involved for uploading customer service point(CSP) target ● Import Simpli Bank into local host server ● Open eclipse and import the Simpli Bank project into the eclipse ● Libraries required to read XLSX files o poi-3.14-20160307.jar o poi-ooxml-3.14-20160307.jar o poi-ooxml-schemas-3.14-20160307.jar o log4j-1.2.17.jar o xmlbeans-2.6.0.jar ● Create java file CSPTargetReportActionForm.java, CSPTargetReportAction.java and jsp page CSPTargetReport.jsp. ● Link these java files and jsp files in struts-config.xml ● In CSPTargetReport.jsp create a frontend web page containing upload icon to upload CSPTarget xlsx file, drop down box of each month, second dropdown box containing the
  • 11. 11 present and the next year and submit button to upload the file in selected month and the year. ● In CSPTargetReportActionForm.java file, declare variables that are used in above jsp file like uploadedFile, month, year and also create getters and setters of each variable used and constructor containing these variables. ● In CSPTargetReportAction.java file, add functions like load and validate to verify whether the url is genuine or not. ● Create three java files named CSPTargetReport.java, CSPTargetReportWeekly.java and CSPTargetReportDaily.java and create three Hibernate files CSPTargetReport.hbm.xml, CSPTargetReportWeekly.hbm.xml and CSPTargetReportDaily.hbm.xml. ● Map these three java files with hbm.xml files using hibernate.hbm.xml. ● Mention the required table names and their columns into three hbm.xml files. ● In the three java files create variable names should be same as their column names and also create getters and setters of each variable used and constructor containing these variables. ● In CSPTargetReportAction.java file, create a function named uploadFile. ● In uploadFile function we first read the xlsx files and checked whether the data is valid or not for each cspcode. ● Then, we stored the first row into csptargets table and daily targets into csptarget_daily and weekly targets into csptarget_weekly. ● In case, any error occurs during uploading the whole data in xlsx will be rolled back. ● Care should be taken that we should not refresh the page. ● As soon as the xlsx file is uploaded, function uploadFile will upload the target.xlsx file into the three tables of database ekodb_icici named csptargets, csptarget_weekly, csptarget_daily. ● It also stores the backup copy of this xlsx file for future reference. 3.4 Output
  • 12. 12 The uploaded csptarget.xlsx file has first row containing csp codes, second row containing volume of that csp code in the given month and next 30-31 rows contain the daily volume of that csp code in the given month and the next 4-5 rows contain the weekly volume of that csp code in the given month. When the CSPTarget.xlsx file is uploaded following output is shown: ● Total NEW CSP code uploaded This states that the number of new csp codes that are being introduced in this month and their respective targets. ● Total CSP Code NOT uploaded. This states that those csp code that don’t exist or csp code contains some invalid data like it contains string value or it has been left blank. ● Total CSP Code updated. This states that the number of csp codes that already exist and their volumes have been updated. ● Total CSP Code of this month. This states that the total number of csp codes in that specific month. ● Total Volume Monthly. This states that the total volume of all csp codes in that specific month.
  • 13. 13 Fig. 3.2 Output when file is uploaded Fig. 3.3 Output saved in csptargets table Fig. 3.4 Output saved in csptarget_weekly table
  • 14. 14 Fig. 3.5 Output saved in csptarget_daily table 3.5 Problems Faced Following problems faced were: ● Number of commits Initially while uploading the xlsx file we perform commits each time when a new csp code is found as a result of which, it took nearly one hour to upload 5000 rows of files. Instead we saved each data of the new csp code and performed commits only once. As a result, file was uploaded within 2-4 minutes. ● Updation of the existing csp codes Initially when we uploading the xlsx file it overrides the data of that month and the old data was lost, so to handle this we added updation feature which updated the existing csp codes and added the new csp codes instead of overriding the entire data. ● Validation of csp code
  • 15. 15 Initially we didn’t check whether the csp code is valid or not and the volume of each cap code is correct or not. So we performed checks before uploading into the database like checking if it contains a string or the place has been left blank making sure that it contains only integer values. Chapter 4 Storing user’s IP Address 4.1 Introduction An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there." The designers of the Internet Protocol defined an IP address as a 32-bit number and this system, known as Internet Protocol Version 4 (IPv4), is still in use today. However, because of the growth of the Internet and the predicted depletion of available addresses, a new version of IP (IPv6), using 128 bits for the address, was developed in 1995. IPv6 was standardized as RFC 2460 in 1998, and its deployment has been ongoing since the mid-2000s. IP addresses are
  • 16. 16 usually written and displayed in human-readable notations, such as 172.16.254.1 (IPv4), and 2001:db8:0:1234:0:567:8:1 (IPv6). Fig. 4.1 IP Address Classes 4.2 Implementation We added this feature such that just before the user logs into the website his local and private IP address will be stored into database and at what time they have logged into the website will also be stored in there.
  • 17. 17 Fig. 4.2 Program to store IP address Steps for storing the IP address: ● We will first get the person id who is logging into the website using getPersonnelId() ● We will then store the users Private IP address. ● Using bot of whatismyipaddress we will store the users Public IP address. ● We store the login time by using Date class. Fig. 4.3 IP address is captured
  • 18. 18 Fig. 4.4 IP address is stored in database 4.3 Importance IP addresses are an integral part of any corporate network, and companies large and small are consuming them faster with more applications and devices than ever before. Overlooking the importance of getting a handle on IP addresses can prove disastrous. IP addresses are one of the most critical resources that need to be managed in any network. Every networked application and device -- from e-mail and Web connectivity to file storage and networked printers -- depends on IP and requires address assignment. That presents a big enough challenge, but it's becoming an even bigger challenge as new core services like VoIP and mobile networks increase IP address assignment needs, requiring more robust allocation, classification, and tracking of addresses. This is known collectively as IP address management (IPAM). Storing of IP address into the database makes the administrator to keep a watch on who is logging into website and from where and at what period of time. It is helpful at times when website gets hacked by someone. At that time, we can check who were logged in at that time and we can take actions on them and can easily find who was the culprit.
  • 19. 19 References Online [1] JasperSoft from http://community.jaspersoft.com/wiki/what-jasperreports-server [2] iReports from http://community.jaspersoft.com/wiki/getting-started-ireport-designer [3] Simpli Bank from https://en.wikipedia.org/wiki/Eko_India_Financial_Services [4] Struts from http://www.tutorialspoint.com/struts_2/ [5] Hibernate from http://www.tutorialspoint.com/hibernate/ [6] IP address from https://en.wikipedia.org/wiki/IP_address