Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to connect to Sybase 12 ASA database server from iReport and JasperReports Server


    akonkin
    • Features: Data Sources, Domains, JasperReports Server Version: v4.7.1 Product: JasperReports® Server

    In this article I want to describe the process that shows how to connect to Sybase 12 ASA database server

    Developer edition from iReport and JasperReports Server.

    The Sybase 12 ASA was installed in Windows 7 operating system.

    The installation process of Sybase was pretty straightforward to provide it with the complete description.

    I just want to say that I started it by clicking on the SA1201_Developer.exe file, and then I accepted all default

    settings that were suggested by the installation program.

    With the Sybase 12 ASA Developer edition is supplied the test database that has name "demo"

    1. How to start, stop and connect to the Sybase demo database from the GUI tools that are supplied with Sybase distribution:

      After the installation process is completed in the windows menu should appear the tab related to Sybase:

      pic_1_initial_menu.png.2b31fa076b3d399619d2eb311e3133cf.png

      the next screen shot shows how to start the demo database

      pic_2_start_the_sample_database.png.582f88eb802b8fd7a08103ddfd01238a.png

      pic_3_splash_screen.png.8d262299997fa6513380e64221024049.png

      pic_4_system_tray_expanded.png.a30422032b2285f50307ad02aa386213.png

      pic_5_stop_database.png.27adfd58b9bf3c99fafed4a25be9d826.png

      pic_6_sybase_central_tool.png.a0ca225b68b8226f5d6ce97594b88e05.png

      Let's try to connect to the demo database from Sybase Central - Sybase database GUI administration tool

      pic_7_sybase_central_tool_connection.png.e6dfc5b152e98f0ce15ccad1aff04243.png

      pic_8_sybase_central_connection_established.png.c19a4639a60fe6d2f0d61fa1593ba212.png

    2. Configuring the connection to the Sybase demo database from iReport editor:

      With the Sybase 12 ASA is supplied jconn3.jar driver. We will use it to connect to the Sybase 12 ASA database server.

      pic_9_sybase_jdbc_driver.png.1832fb748ac45a0d98e5fff0bf70407b.png

      Path to the jconn3.jar JDBC driver should be defined in iReport Editor

      pic_10_sybase_jdbc_driver_path.png.cea55b2d0c245e1e37fc1e05d8844a81.png

      pic_11_sybase_jdbc_driver_test_connection.png.c5bc79cde8d6a04b3da39b274fa90f63.png

      pic_12_iReport_query.png.6de0aa92012450f13fc3dbeabce27cdd.png

      pic_13_iReport_results.png.9cace2f6ee839de9eb34ebac131e090a.png

    3. This paragraph describes how to connect to the Sybase 12 ASA database from the JasperReports Server.

      pic_13_1_add_jconn_driver_to_apache_tomcat.png.52a960866d468d76665a9f8643fa6da5.png

      After jconn3.jar driver is placed in the lib folder, apache-tomcat should be restarted to make this driver available to it.

      Beneath is shown how to create the Sybase data source in JasperReports Server:

      pic_13_2_add_jconn_driver_to_apache_tomcat.png.335d3afa9f3472a69cb862dff9c3a636.png

      pic_13_3_add_jconn_driver_to_apache_tomcat.png.5a3924152c85a8914f2ec2618ecb3bac.png

      After the Data Source is set and tested we can upload the test report from the iReport Editor to the JasperReports Server via Repository Navigator plugin.

      pic_14_iReport_upload_report_to_server.png.e6800d091442b2202a3312e7e23a75c1.png

      Let's navigate to this report in JasperReports Server and try to execute it

      pic_15_JasperReports_server_uploaded_report.png.b5e76a690129a92edeb855771603874f.png

      pic_16_JasperReports_server_uploaded_report_results.png.d594c0eb3d4c3272dfdda3dc627a0ade.png

      As shown in the last screen shot the report was successfully executed that means that the connection to the Sybase from JasperReports Server also works fine.

    4. Sybase command line tools.

      I am not a very experienced Sybase database administrator, but the first question that I've asked myself after I started Sybase database from the GUI tools was: Is it possible to start and stop Sybase database from the command line?
      Beneath I provide the very simple commands and only for your very first familiarization with it.
      Please refer to the Sybase brand documentation if you need more information related to the Sybase command line tools.

    5. To start our practice with these tools we should navigate to the bin64 folder

      pic_17_Sybase_command_line_tools.png.bab09d50bb7775d936533e90d8bc1aa6.png

      Let's try to check that Sybase demo database that we have started via GUI in the previous paragraphs is up and running

      pic_18_Sybase_command_line_tools_dbping.png.f9e0fb00770b85553d5ddd80c592dc08.png

      pic_19_Sybase_command_line_tools_stop_database(1).png.aa122934a530f01bdccec541f4786f01.png

      pic_20_Sybase_command_line_tools_test_ping.png.91947d3ba3f1f60bf48fed4c4da61326.png

      pic_21_Sybase_command_line_tools_start_database.png.7c4c01634a2017529782dc50cffc8ef4.png

      We can also check that the database is working via the dbping command:

      pic_22_Sybase_command_line_tools_second_ping.png.6d93e1cbee3829ea06772a03734f35aa.png

    Please find in the attachments the sample of the report that was described in this article.

    Thats all. Thank you for reviewing my article :)

    pic_2_start_the_sample_database.png.cdbd2f7508484003091a3eb0725d696a.png

    pic_3_splash_screen.png.bd76faf574decf7c200c2e7583f84949.png

    pic_7_sybase_central_tool_connection.png.23d7e09e2ee587920785916c3d45a557.png

    pic_8_sybase_central_connection_established.png.4c3de53c4069b683a5031ad49a5c94c1.png

    pic_9_sybase_jdbc_driver.png.365b6348b6cde576e09f0f8364bec0bd.png

    pic_10_sybase_jdbc_driver_path.png.fe87c16bc48991e5491f2d28aa637e42.png

    pic_11_sybase_jdbc_driver_test_connection.png.2cb8f2135344feee3bb04589405131dc.png

    pic_12_iReport_query.png.35183c9c6b8c16030c3afd9eb2fe9153.png

    pic_13_iReport_results.png.e40ce4b569e9d64696ff0fcab1de5b57.png

    pic_13_2_add_jconn_driver_to_apache_tomcat.png.bb531e913c0a1ab9a7dd5433d043e804.png

    pic_13_3_add_jconn_driver_to_apache_tomcat.png.14c99a88938e7e2ac91a2f4d6cf41cda.png

    pic_14_iReport_upload_report_to_server.png.ca6ab9ca50db81bcd9455802bcf2f3cc.png

    pic_15_JasperReports_server_uploaded_report.png.48fcc0575d54e161f2d1c105ce535298.png

    pic_16_JasperReports_server_uploaded_report_results.png.2cc01e727abbbe51fa834465f8bb1d85.png

    pic_17_Sybase_command_line_tools.png.3d90c7ae841f7b9e88e52add4720069e.png

    pic_18_Sybase_command_line_tools_dbping.png.bfe4f571d4341ca83d6e4a03e139d785.png

    pic_19_Sybase_command_line_tools_stop_database(1).png.ca2b2a0e1938bd68f62cd1d1f4ae2086.png

    pic_20_Sybase_command_line_tools_test_ping.png.e34c8bf2ab77f6245246e8e77654ee39.png

    pic_21_Sybase_command_line_tools_start_database.png.ecb02a6125642c78de23c449b17ec368.png

    pic_22_Sybase_command_line_tools_second_ping.png.690e938be55593990d4d1e6920255160.png

    case_30550_simple_sybase_report.jrxml

    case_30550_sybase_rep_1.zip


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...