create new data source

2

hi experts,

my first day with jasper

i downloaded and installed jasperreports-server-5.6 & jaspersoftstudiopro-5.60

i can't find a way to add new data source to my sql DB and create the report (jaspersoft Studio Professional).

if anyone has a link to show steps for beginners, it would be perfect.

the tutorial here doesn't have the same interface i have. i tried to add snapshoot of my jasper but upolading picture here is so slow.

thanks in advance,

Samira

samira.haroun's picture
Joined: Aug 11 2014 - 1:54pm
Last seen: 5 years 3 months ago

What tutorial were you looking at that confused you?

djohnson53 - 5 years 3 months ago

2 Answers:

3

IN the doc http://community-static.jaspersoft.com/sites/default/files/docs/jasperso..., look at the section 10.1, create Data Adapters, and select Database JDBC connection. Then look at  section 10.2 Creating Database JDBC Connections.

One thing that might confuse you is that Jaspersoft products don't include the native MySQL driver, because of licensing issues. So unfortunately you will need to download and install a MySQL driver. Here's a modified version of the instructions in the doc:

What
you
have
to
do
is
to
add
the
JDBC
driver
for
Oracle,
which
is
a
file
named
ojdbc14.jar
(or
classes12.zip
or
classes11.zip
for
older
versions)
to
the
classpath
(which
is
where
the
JVM
searches
for
classes).
As
Jaspersoft
Studio
uses
its
own
class
loader,
it's
enough
add
the
ojdbc14.jar
file
to
the
Jaspersoft
Studio
classpath,
which
is
defined
in
your
Eclipse
project;
the
same
can
be
done
for
directories
containing
classes
and
other
resources.
To
edit
the
classpath,
click
Project
>
Properties
>
Java
Build
Path
>
Libraries
,
and
click
Add
JARs
.
If
you
only
need
to
use
the
driver
for
this
specific
data
adapter,
you
can
instead
add
the
driver
on
the
data
adapter's
Driver
Classpath
tab.
Add the JDBC driver for MySQL, which is a jar file, to the classpath (which is where the JVM searches for classes). As Jaspersoft Studio uses its own class 
loader, it will be enough add the  driver jar file to the Jaspersoft Studio classpath in the Options window (Tools→Options); 
the same can be done for directories containing classes and other resources.

 

elizam's picture
4416
Joined: Mar 5 2012 - 9:19am
Last seen: 21 hours 14 min ago

You can also put a jdbc driver on the Build Path for the project. (or via Window -> Preferences -> Java -> build path)

elizam - 5 years 3 months ago
0

http://community-static.jaspersoft.com/sites/default/files/docs/jasperso...

This is your best friend. I don't remember exactly how to do it. It should prompt you in studio while you are setting up a new report.

989989272c's picture
Joined: Aug 14 2014 - 8:26am
Last seen: 5 years 3 months ago
Feedback
randomness