JASPER REPORT - An Overview

JASPER REPORT - An Overview

JASPER Report an Overview - Intended for Begineers

Jaspersoft : An embeddable reporting and analytics platform designed for software builders.

Jaspersoft : An embeddable reporting and analytics platform designed 

for software builders.



In Traditional Reporting 1) Application and 2) Analytics, build individuallly 

and clubbed togethar to creation of dashboard. Jaspersoft provide the capability both togethar, which allows the user to create the dashboard in a single layer/place thus avoid the integration of the application and analytics followed in earlier or old reporting.



We can this a Embedded BI ( App and Analytics togethar better for visualization of displaying of the answers,allows to make actionable insight on the dashboard,will allows allows a common place for other users to consume the data easily)

Life cycle of Jaspersoft?

1)? Designing of the report.

2)? Executing the report.

3)? Exporing to desired format.


Designing of the report :

? ? ? ?the first step is here to creation of JRXML file, 

meant for your report layout.

iReport Designer - help us to create the report layout,visual way helps 

the creation JRXML file format( no need to worry on how to create the file)

Once the report is created, the report needs to be compiled.



Executing the report :

?? ? Below things to be consider before executing the jasper report

(*.jasper - A binary object of compiled file from JRXML).

the purpose of compilation allows the population of data for the Application.?

The "class net.sf.jasperreports.engine.JasperFillManager" provides 

necessary functions to fill the data in the reports.

The Report Execution is performed by passing jasper file and a data source to jasper reports.

          Extraction of data for jasper from SQL Query,Flat files,

a HQL (Hibernate SQL Query), which is a collection of Java Bean.


The below code?

JasperFillManager.fillReportToFile( "MasterReport.jasper",parameters,getDataSource());
 
will allows the report to extract the data from the Datasource to shown in the jasper report.



Export to desired format:??

? JasperExportManager will allows to export the report in desirable formats
 as output.


JasperExportManager. exportReportToPdfFile( "MasterReport.jrprint" );


Note : JasperExportManager internally handles different API 

to create documents with mulitple formats.
        
No alt text provided for this image

the picture clears shows the different phase of Jasper report creation,execution and export process.


No alt text provided for this image

the diagram depitcs the overview of jasper report jasper report.

iReport Designer tool uses the report layout design and follows the process on how the data and analytics tied togethar forms embeeded analytics.+


will be continue...

some useful command of Cp unix commands for reference

Copy a file to another file

# cp {options} source_file target_file

Copy File(s) to another directory or folder

# cp {options} source_file?? target_directory?

Copy directory to directory

# cp {options} source_directory target_directory

Let’s jump into the practical examples of cp command,

Example:1) Copy file to target directory
Let’s assume we want copy the /etc/passwd file to /mnt/backup directory for some backup purpose, so run below cp command,

root@linuxtechi:~# cp /etc/passwd /mnt/backup/
root@linuxtechi:~#
Use below command to verify whether it has been copied or not.

root@linuxtechi:~# ls -l /mnt/backup/
total 4
-rw-r--r-- 1 root root 2410 Feb? 3 17:10 passwd
root@linuxtechi:~#
Example:2 Copying multiple files at the same time
Let’s assume we want to copy multiples (/etc/passwd, /etc/group & /etc/shadow) at same time to target directory (/mnt/backup)

root@linuxtechi:~# cp /etc/passwd /etc/group /etc/shadow /mnt/backup/
root@linuxtechi:~#
Example:3) Copying the files interactively (-i)
If you wish to copy the files from one place to another interactively then use the “-i” option in cp command, interactive option only works if the destination directory already has the same file, example is shown below,

root@linuxtechi:~# cp -i /etc/passwd /mnt/backup/
cp: overwrite '/mnt/backup/passwd'? y
root@linuxtechi:~#
In the above command one has to manually type ‘y’ to allow the copy operation

Example:4) Verbose output during copy command (-v)
If you want the verbose output of cp command then use “-v” option, example is shown below

root@linuxtechi:~# cp -v /etc/fstab? /mnt/backup/
'/etc/fstab' -> '/mnt/backup/fstab'
root@linuxtechi:~#
In case you want to use both interactive mode and verbose mode then use the options “-iv”

root@linuxtechi:~# cp -iv /etc/fstab? /mnt/backup/
cp: overwrite '/mnt/backup/fstab'? y
'/etc/fstab' -> '/mnt/backup/fstab'
root@linuxtechi:~#
Example:5) Copying a directory or folder (-r or -R)
To copy a directory from one place to another use?-r?or?-R?option in cp command. Let’s assume we want to copy the home directory of linuxtechi user to “/mn/backup”,

root@linuxtechi:~# cp -r /home/linuxtechi /mnt/backup/
root@linuxtechi:~#
In above command, -r option will copy the files and directory recursively.

Now verify the contents of linuxtechi directory on target place,

root@linuxtechi:~# ls -l /mnt/backup/linuxtechi/
total 24
drwxr-xr-x 2 root root 4096 Feb? 3 17:41 data
-rw-r--r-- 1 root root??? 7 Feb? 3 17:41 file_1.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:41 file_2.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:41 file_3.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:41 file_4.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:41 file_5txt
-rw-r--r-- 1 root root??? 0 Feb? 3 17:41 file_5.txt
root@linuxtechi:~#
Example:6) Archive files and directory during copy (-a)
While copying a directory using cp command we generally use -r or -R option, but in place of -r option we can use ‘-a’ which will archive the files and directory during copy, example is shown below,

root@linuxtechi:~# cp -a /home/linuxtechi /mnt/backup/
root@linuxtechi:~# ls -l /mnt/backup/linuxtechi/
total 24
drwxr-xr-x 2 root root 4096 Feb? 3 17:41 data
-rw-r--r-- 1 root root??? 7 Feb? 3 17:39 file_1.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:39 file_2.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:39 file_3.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:39 file_4.txt
-rw-r--r-- 1 root root??? 7 Feb? 3 17:40 file_5txt
-rw-r--r-- 1 root root??? 0 Feb? 3 17:39 file_5.txt
root@linuxtechi:~#
Example:7) Copy only when source file is newer than the target file (-u)
There can be some scenarios where you want copy the files only if the source files are newer than the destination ones. This can be easily achieved using “-u” option in the cp command.

In the Example:6? we have copied the linuxtechi home directory to /mnt/backup folder, in the linuxtechi home folder we have 5 txt files, let’s edit couple of them and then copy all the txt files using “cp -u”.

root@linuxtechi:~# cd /home/linuxtechi/
root@linuxtechi:/home/linuxtechi# echo "LinuxRocks" >> file_1.txt
root@linuxtechi:/home/linuxtechi# echo "LinuxRocks" >> file_4.txt
root@linuxtechi:/home/linuxtechi# cp -v -u? file_*.txt /mnt/backup/linuxtechi/
'file_1.txt' -> '/mnt/backup/linuxtechi/file_1.txt'
'file_4.txt' -> '/mnt/backup/linuxtechi/file_4.txt'
root@linuxtechi:/home/linuxtechi#
Example:8) Do not overwrite the existing file while copying (-n)
There are some scenarios where you don’t want to overwrite the existing destination files while copying. This can be accomplished using the option ‘-n’ in ‘cp’ command

root@linuxtechi:~# cp -i /etc/passwd /mnt/backup/
cp: overwrite '/mnt/backup/passwd'?
As you can see in above command, it is prompting us to overwrite the existing file, if you use -n then it will not prompt for the overwrite and also will not overwrite the existing file.

root@linuxtechi:~# cp -n /etc/passwd /mnt/backup/
root@linuxtechi:~#
Example:9) Creating symbolic links using cp command (-s)
Let’s assume we want to create symbolic link of a file instead copying using cp command, for such scenarios use ‘-s’ option in cp command, example is shown below

root@linuxtechi:~# cp -s /home/linuxtechi/file_1.txt /mnt/backup/
root@linuxtechi:~# cd /mnt/backup/
root@linuxtechi:/mnt/backup# ls -l file_1.txt
lrwxrwxrwx 1 root root 27 Feb? 5 18:37 file_1.txt -> /home/linuxtechi/file_1.txt
root@linuxtechi:/mnt/backup#
Example:10) Creating Hard link using cp command (-l)
If you want to create hard link of a file instead copy using cp command, then use ‘-l’ option. example is shown below,

root@linuxtechi:~# cp -l /home/linuxtechi/devops.txt /mnt/backup/
root@linuxtechi:~#
As we know in hard link, source and linked file will have the same inode numbers, let’s verify this using following commands,

root@linuxtechi:~# ls -li /mnt/backup/devops.txt
918196 -rw-r--r-- 2 root root 37 Feb? 5 20:02 /mnt/backup/devops.txt
root@linuxtechi:~# ls -li /home/linuxtechi/devops.txt
918196 -rw-r--r-- 2 root root 37 Feb? 5 20:02 /home/linuxtechi/devops.txt
root@linuxtechi:
Example:11) Copying attributes from source to destination (–attributes-only)
If you want to copy only the attributes from source to destination using cp command, then use option “–attributes-only”

root@linuxtechi:/home/linuxtechi# cp --attributes-only /home/linuxtechi/distributions.txt /mnt/backup/
root@linuxtechi:/home/linuxtechi# ls -l /home/linuxtechi/distributions.txt
-rw-r--r-- 1 root root 41 Feb? 5 19:31 /home/linuxtechi/distributions.txt
root@linuxtechi:/home/linuxtechi# ls -l /mnt/backup/distributions.txt
-rw-r--r-- 1 root root 0 Feb? 5 19:34 /mnt/backup/distributions.txt
root@linuxtechi:/home/linuxtechi#
In the above command, we have copied the distribution.txt file from linuxtechi home directory to /mnt/backup folder, if you have noticed, only the attributes are copied, and content is skipped. Size of distribution.txt under /mn/backup folder is zero bytes.

Example:12) Creating backup of existing destination file while copying (–backup)
Default behavior of cp command is to overwrite the file on destination if the same file exists, if you want to make a backup of existing destination file during the copy operation then use ‘–backup‘ option, example is shown below,

root@linuxtechi:~# cp --backup=simple -v /home/linuxtechi/distributions.txt /mnt/backup/distributions.txt
'/home/linuxtechi/distributions.txt' -> '/mnt/backup/distributions.txt' (backup: '/mnt/backup/distributions.txt~')
root@linuxtechi:~#
If you have noticed, backup has been created and appended tilde symbol at end of file. backup option accept following parameters

none, off? – never make backups
numbered, t?– make numbered backups
existing, nil?– numbered if numbered backups exist, simple otherwise
simple, never?– always make simple backups
Example:13) Preserve mode, ownership and timestamps while copying (-p)
If you want to preserve the file attributes like mode, ownership and timestamps while copying then use -p option in cp command, example is demonstrated below,

root@linuxtechi:~# cd /home/linuxtechi/
root@linuxtechi:/home/linuxtechi# cp -p devops.txt /mnt/backup/
root@linuxtechi:/home/linuxtechi# ls -l devops.txt
-rw-r--r-- 1 root root 37 Feb? 5 20:02 devops.txt
root@linuxtechi:/home/linuxtechi# ls -l /mnt/backup/devops.txt
-rw-r--r-- 1 root root 37 Feb? 5 20:02 /mnt/backup/devops.txt
root@linuxtechi:/home/linuxtechi#
Example:14) Do not follow symbolic links in Source while copying (-P)
If you do not want to follow the symbolic links of source while copying then use -P option in cp command, example is shown below

root@linuxtechi:~# cd /home/linuxtechi/
root@linuxtechi:/home/linuxtechi# ls -l /opt/nix-release.txt
lrwxrwxrwx 1 root root 14 Feb? 9 12:28 /opt/nix-release.txt -> os-release.txt
root@linuxtechi:/home/linuxtechi#
root@linuxtechi:/home/linuxtechi# cp -P os-release.txt /mnt/backup/
root@linuxtechi:/home/linuxtechi# ls -l /mnt/backup/os-release.txt
-rw-r--r-- 1 root root 35 Feb? 9 12:29 /mnt/backup/os-release.txt
root@linuxtechi:/home/linuxtechi#
Note:?Default behavior of cp command is to follow the symbolic links in source while copying.

Example:15) Copy the files and directory forcefully using -f option
There can be some scenarios where existing destination file cannot be opened and removed. And if you have healthy file which can be copied in place of existing destination file, then use cp command along with -f option

root@linuxtechi:/home/linuxtechi# cp -f distributions.txt? /mnt/backup/
root@linuxtechi:/home/linuxtechi#
Example:16) Copy sparse files using sparse option in cp command
Sparse is a regular file which contains long sequence of zero bytes that doesn’t consume any physical disk block. One of benefit of sparse file is that it does not consume much disk space and read operation on that file would be quite fast.

Let’s assume we have sparse cloud image named as “ubuntu-cloud.img”

root@linuxtechi:/home/linuxtechi# du -sh ubuntu-cloud.img
12M???? ubuntu-cloud.img
root@linuxtechi:/home/linuxtechi# cp --sparse=always ubuntu-cloud.img /mnt/backup/
root@linuxtechi:/home/linuxtechi# du -sh /mnt/backup/ubuntu-cloud.img
0?????? /mnt/backup/ubuntu-cloud.img
root@linuxtechi:/home/linuxtechi#
Different options can be used while using sparse parameter in cp command,

sparse=auto
sparse-always
sparse=never
That’s all from this article, I hope it helps you to understand the cp command more effectively. Please do share your feedback and comments

Tableau Performance tips Jun17 2021
https://canonicalized.com/tableau-dashboard-performance-optimization-case-study/?section=tableau-logics

LOD Jul07 2021
https://www.rigordatasolutions.com/post/introduction-to-tableau-level-of-detail-expressions
https://www.pluralsight.com/guides/discern-the-three-different-types-of-level-of-detail-(level-of-details)-calculations-in-tableau
https://www.thedataschool.co.uk/hanna-nykowska/tableau-lods-include-and-exclude
https://blog.decisivedata.net/blog/using-the-fixed-lod-calculation-in-tableau
https://www.flerlagetwins.com/2020/02/lod-uses.html

study exclude vs include
https://www.thedataschool.co.uk/hanna-nykowska/tableau-lods-include-and-exclude

nice with example do it first
https://www.aegissofttech.com/articles/level-of-detail-expressions-tableau.html

PA : delay timer
https://www.enjoysharepoint.com/power-automate-wait-timer/
https://www.enjoysharepoint.com/power-automate-wait-timer/
https://www.process.st/how-to/use-delay-until-in-power-automate/
Scheduling Automated Emails
Scheduling automated emails with the Delay Until feature in Power Automate can be easily accomplished by following these steps:

Create a new flow in Power Automate.
Add the trigger action that will initiate the flow.
Add the Delay Until action and configure it to specify the desired date and time for sending the email.
Add the next action, such as sending the email or performing any other desired task.
Save and test the flow to ensure it is working correctly.

https://www.acuitytraining.co.uk/news-tips/power-automate-do-until/
        
Vijay Kannan

Senior Technical Architect at Hexaware Technologies

6 年

Hello Siva, Glad that you started posting your new experiments.? Welcome back from hiatus.? Thanks -- Vijay.

回复

要查看或添加评论,请登录

Sri Sivakumar Ramar ( An Agile Learner )的更多文章

  • AI World

    AI World

    Welcome to AI World As we know how AI help and facilitates the people make better decisions by analyzing large amounts…

  • Dates Always - Comparing your latest week to the same days of the previous week

    Dates Always - Comparing your latest week to the same days of the previous week

    Solved: Dynamic date period Filter based on slicer selecti..

  • ML and Charts Using R

    ML and Charts Using R

    Power BI: Tips and Tricks for Building Professional Power BI Model (and a star schema tutorial) – business intelligist…

  • Essential SQL Query to Know

    Essential SQL Query to Know

    select first and last row sql Code Example (codegrepper.com) SQL Window Functions Cheat Sheet | LearnSQL.

  • Looker - BI for making better business decision

    Looker - BI for making better business decision

    Looker's a Web-based platform that allows users to explore data in a timely manner to help them make better business…

  • I want to know what is Python Pandas

    I want to know what is Python Pandas

    Python Zen Master: Jan 26 1121 am python-tips/python_tips.ipynb at main · CalebCurry/python-tips · GitHub…

  • JavaScript Object Notation

    JavaScript Object Notation

    JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.

    1 条评论
  • Gradient descent

    Gradient descent

    An Article about Gradient Descent Gradient Descent is a popular algorithm to perform optimization of deep learning such…

  • Visualization ???

    Visualization ???

    Tableau : History of Innovations Analyzing the history of Tableau innovation History of Tableau Innovation | Tableau…

  • Naive Bayes Classifier

    Naive Bayes Classifier

    Naive Bayes Classifier for Predicting the Party Voting of "Republican" & "Democrat". Naive Bayes classification is a…