{"id":598,"date":"2021-10-02T14:34:20","date_gmt":"2021-10-02T11:04:20","guid":{"rendered":"https:\/\/m-shaeri.ir\/blog\/?p=598"},"modified":"2023-02-22T17:03:06","modified_gmt":"2023-02-22T13:33:06","slug":"with-salmos-report-generate-reports-in-spring","status":"publish","type":"post","link":"https:\/\/mshaeri.com\/blog\/with-salmos-report-generate-reports-in-spring\/","title":{"rendered":"With Salmos Report in Spring boot generate reports in any format you need"},"content":{"rendered":"\n<p>In Generating a report from data stored in database, along with Report\u2019s title, columns\u2019 header, content direction, fonts and etc., there exist numerical information that should be summarized in the header or footer section of the report. Moreover, Some times we need to export data in different structure or format such as XML, JSON or other custom structure.<\/p>\n\n\n\n<p>Although the existing libraries like Jasper are so comprehensive and matured, if you need to make simple tiny reports it can be frustrating and somehow confusing to work with its xml based configuration and environment setup. In my last project I looked for a battery included alternative library for Jasper that is easy to setup and easy to use, unfortunately I couldn&#8217;t find (maybe I didn&#8217;t googled well ). I decided to start an open-source project to develop an easy to configure and easy to use library in Spring boot that make quick reports in few lines of codes, and I named it <strong>Salmos report<\/strong>. <\/p>\n\n\n\n<p>It directly read from database using SQL query and JDBC data source, and can be fed by entity objects retrieved by hibernate,  and until now it can produce Html, xml and pdf and custom format report.<\/p>\n\n\n\n<p>To download using Gradle , add this line to your dependencies section :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">implementation 'io.github.birddevelper:salmos-report-spring-boot-starter:2.1.0'<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>To download in your Maven project add this as a dependency :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"xml\" class=\"language-xml\">&lt;dependency&gt;\n   &lt;groupId&gt;io.github.birddevelper&lt;\/groupId&gt;\n   &lt;artifactId&gt;salmos-report-spring-boot-starter&lt;\/artifactId&gt;\n   &lt;version&gt;2.1.0&lt;\/version&gt;\n&lt;\/dependency&gt;<\/code><\/pre>\n\n\n\n<p><strong>To learn how to generate your first report read : <a rel=\"noreferrer noopener\" href=\"https:\/\/medium.com\/javarevisited\/with-salmos-report-in-spring-boot-generate-reports-in-few-lines-of-code-b5212486b921\" target=\"_blank\">my article on Medium.com<\/a><\/strong><\/p>\n\n\n\n<p><strong>Version 2.1.0 Features :<\/strong><\/p>\n\n\n\n<ul><li><strong>Read data from List of Objects and Entities<\/strong><\/li><li><strong>Read data from database by SQL query<\/strong><\/li><li><strong>Generate HTML Report<\/strong><\/li><li><strong>Generate XML document<\/strong><\/li><li><strong>Generate PDF document<\/strong><\/li><li><strong>Generate custom structure report<\/strong><\/li><li><strong>Generate TEXT file from report<\/strong><\/li><li><strong>CSS Classes for HTML report<\/strong><\/li><li><strong>CSS style for html tags<\/strong><\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>Github repository : <a rel=\"follow noopener\" href=\"https:\/\/github.com\/birddevelper\/salmos-report-spring-boot-starter\" data-type=\"URL\" data-id=\"https:\/\/github.com\/birddevelper\/salmos-report-spring-boot-starter\" target=\"_blank\">salmos report on github <\/a> (please don&#8217;t forget to give start to project )<\/p>\n\n\n\n<p>Maven central page : <a href=\"https:\/\/mvnrepository.com\/artifact\/io.github.birddevelper\/salmos-report-spring-boot-starter\/2.1.0\" data-type=\"URL\" target=\"_blank\" rel=\"noreferrer noopener\">salmos report on Maven Central <\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Generating a report from data stored in database, along with Report\u2019s title, columns\u2019 header, content direction, fonts and etc., there exist numerical information that &hellip; <\/p>\n","protected":false},"author":1,"featured_media":736,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,69,35,110,70],"tags":[72,46,73,9,65,64,67,47,63,71,68,66],"_links":{"self":[{"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/posts\/598"}],"collection":[{"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/comments?post=598"}],"version-history":[{"count":38,"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/posts\/598\/revisions"}],"predecessor-version":[{"id":858,"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/posts\/598\/revisions\/858"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/media\/736"}],"wp:attachment":[{"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/media?parent=598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/categories?post=598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mshaeri.com\/blog\/wp-json\/wp\/v2\/tags?post=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}