Jump to content
We've recently updated our Privacy Statement, available here ×

garnold

Members
  • Posts

    21
  • Joined

  • Last visited

garnold's Achievements

Explorer

Explorer (4/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. I’m really trying to get the hand of Java and Java related coding. Spring was high on my list of tools I needed to get at least a basic understanding of. The idea the beans just didn’t seem to click for me. Lucky for me I came across these videos that really helped me out a lot! https://www.yo...
  2. JasperReports Server 6.1 is just around the bend and I was able to spend sometime with the beta. Along with the many new cool features is this new JSON data source. Using this data source you can connect to JSON documents on the web, or in my example, stored in the repository. I’ve put togethe...
  3. It’s common to want to have a different page show up when you log into JRS. Normally when I speak about JRS I explain that certain users my rather see a dashboard directly after logging into JRS rather then the default home page. This short post will show you how to make this happen. In this exam...
  4. Along with the many projects I seem to pull myself into I feel the need to start another! Working with Jaspersoft (a Java based application) really has pushed me to the point where I feel some level of Java programming skills would be helpful. I was trying to follow this article on how to create ...
  5. Wanted to post from my phone what my workstation looks like when at a hotel. Kind of cool actually! Using an AT&T wifi to get to the internet. Works pretty good! As always my trusty MacBook Pro :-) Next to that is my, just as trusty, iPad Air acting as a second monitor. I found this app cal...
  6. So what I chose to do was go a head and start building a wrapper class around the Jasperserver REST API to make it easier to make calls. Below is a quick screen shot of a REST call to search the repo for something. I’ve stubbed out all the possible parameters you can send in to this resource whic...
  7. So what I chose to do was go a head and start building a wrapper class around the Jasperserver REST API to make it easier to make calls. Below is a quick screen shot of a REST call to search the repo for something. I’ve stubbed out all the possible parameters you can send in to this resource which should make it a lot easier to place more complex searches. Again (and I say this again and AGAIN), I’m really not to great at programming so there are LOTS of room for impairment. Writing this with ASYNC in mind has not made it to my code. I’ll need plenty of help to clean this up but at least I can create the first pass and put together some ideas and basic structure. Here is a list of the items I plan to build out... Searching for resource Moving a resource Deleting a resource Creating a resource (starting with folders and then seeing how far I can go) Finding users Creating users Updating users Deleting users Scheduling a report Deleting a Scheduled report Getting back a list of all scheduled reports What ever else I might have forgotten to type out here :) http://postachio-images.s3-website-us-east-1.amazonaws.com/b9867b29e8a31c7b619b5a2ba30ce17f.png
  8. It’s been a little while since I posted to my blog and I wanted to show you what I have been working on. JasperReports Server is a great BI tool all around. One of the areas that it really excels is around embedding. Now that being said I thought it was time for me to start truly trying some exam...
  9. It’s been a little while since I posted to my blog and I wanted to show you what I have been working on. JasperReports Server is a great BI tool all around. One of the areas that it really excels is around embedding. Now that being said I thought it was time for me to start truly trying some examples out and seeing how I can embed this product inside of another app. I’m by no means a good C# coder but of all the languages that I have messed with, this is the one I know best so I’m running with it. The video that you will see along with this post is where I’m at so far. I just wanted to better learn how to use REST calls with .Net against Jasperserver. I’ll follow this up with some specific examples of things I’m working on and my progress :) Uh oh, it looks like your embed code is broken
  10. Let’s see if this shows up in the RSS feed return
  11. Let’s see if this shows up in the RSS feed return
  12. A feature released in version 5.6 of JasperReports Server is the ability to create your own custom link types in reports. These link types can be anything you like and the code the fires also can be anything you want. You may be familiar with the ReportExecution link type available from with in J...
  13. A feature released in version 5.6 of JasperReports Server is the ability to create your own custom link types in reports. These link types can be anything you like and the code the fires also can be anything you want. You may be familiar with the ReportExecution link type available from with in JasperReports. This function tells JasperReports Server to execute a report and is passed some parameters to help make this happen. Well, how cool would it be if you could actually write your own functions and pass any parameters you want into it? Pretty Cool I think and this is what I’ll show you how to do! Let’s layout the steps involved to pull this off. Create a report in Jaspersoft Studio. Currently (as of this article) the only way to place a link inside a report is via Jaspersoft Studio. Find the section(s) of the report you want to offer this link functionality and add a hyperlink. I’ll show you some examples below. In the hyperlink(s) you will pass in your new custom link name. This really is the function that will run when this link is clicked. Create a javascript file that will handle the link when clicked. Place this file in the proper location of your JasperReports Server install That’s pretty much it! It’s really not complicated at all and works very well. So let’s start looking at these steps in detail one at a time. Here is an example of a report created in JasperSoft Studio. This is a very simple report that opens up dialog boxes from 3 different locations. http://postachio-images.s3-website-us-east-1.amazonaws.com/3f1ef816feedd505c340ba2802faee96.png Dialog 1 - This is an image placed on the report. It has nothing to do with the data that this report is bound to. Though it may look like a button, again, it really is just an image placed on the report. Now just about everything placed on a report has the option to be a hyperlink. This image is no exception to the rule and has hyperlink properties. See below that the Link Type is called open_dialog. This link type is referencing a javascript function that I built and added to the JasperReports Server. When a user clicks on the image it will call this function. What’s really cool about this is it will also pass any parameters I want to the function. See the image below and notice that I’m passing some specific parameters to my function that will have it react in a certain way. The types of parameters passed to a function is limited only by the function you create. My open_dialog function takes a handful of parameters to have it work correctly. You functions can do the same. http://postachio-images.s3-website-us-east-1.amazonaws.com/75c57d12807dad8b7914540f3a14a2d9.png http://postachio-images.s3-website-us-east-1.amazonaws.com/5031631cf627292f8f039f8d13bf02ba.png Here is a picture of the content being presented in the dialog. Report parameters and even Java code are all good. http://postachio-images.s3-website-us-east-1.amazonaws.com/e780bbefbd3b62160c4c85016db1dcb0.png Dialogs 2 and 3 - Both of these links open up dialog boxes that show actual data from the report. Notice how each link is within a row of data. This means that each link can pass parameters specific to that row! Very cool indeed :) So the links you see here are actually going to be passing report parameters and are completely dynamic. See the images below and how the Employee Details dialog boxes both render different data. http://postachio-images.s3-website-us-east-1.amazonaws.com/89a5b70107e359ce80ec1f231b44a512.png http://postachio-images.s3-website-us-east-1.amazonaws.com/ba1c84e08b467f81ede268dd452540c8.png Here is a picture of the content parameter that is being passed into the open_dialog function. Notice how report fields are being passed in. This will allow each link to be unique and have it’s own set of values for the provided parameters. http://postachio-images.s3-website-us-east-1.amazonaws.com/a87302ff833ce89ffef65a8360f867bf.png Once this report has been uploaded into JasperReports Server it will look like the below image. By clicking on the links different dialog boxes will open. You can look into the code I’m providing to see how this works and how you can open multiple dialog boxes as well as have multiple links update/change the content in the same dialog box. http://postachio-images.s3-website-us-east-1.amazonaws.com/2076ed449a1b00fb3aeb61768e9abd2e.png Besides just uploading the report into JasperReports Server you will need to add my javascript code into your application. This code is contained in a file called jr.open_dialog.js. Both the jr and .js are removed during the process of calling the function so the part in the middle is the actual name of your function hence the reason that you saw open_dialog as my function name in the link type of JasperStudio. You place this file inside your optimized-scripts folder as you can see in the picture below. I realize that this script is not optimized but by placing it here you can run JasperReports Server in non-optimized mode and still have the function available. http://postachio-images.s3-website-us-east-1.amazonaws.com/e5f94a8d1cfa0718eeee5981e4cb404b.png To test out this example and see how the code works please download the example from the link below. Download files here I hope you have fun with this feature and create some really cool reports with JasperSoft!!! BlogId - 0f15151c-4b21-4b87-9d1a-61f4fe11e74f
  14. One area of JRS that I never really played with much is the actual sending of a report via the scheduler. I’ve shown and setup countless times what the schedule would look like but never truly ran it through to see the email output. This is largely because you need an email server! For Windows yo...
  15. One area of JRS that I never really played with much is the actual sending of a report via the scheduler. I’ve shown and setup countless times what the schedule would look like but never truly ran it through to see the email output. This is largely because you need an email server! For Windows you can pick from a ton of simple little email servers for testing but on the Mac I have found that there are far less to choose from. I do realize that the Mac OS has tools to help with this but to be completely honest here I’m just looking for a very simple little app that I can spin up and catch a few emails to see how this all work. Enter MockSMTP.app. This Mac application will do exactly what I’m (and maybe you) looking for. Below you will see how to set this application up and have it talk to JRS. Hope you find it useful :) First you will need to download the application. You can grab a 30 day trial from their website and buy it from $9.99 off the App Store. http://postachio-images.s3-website-us-east-1.amazonaws.com/2d4dd7ab15140f91e2dc6b4c7847dc4d.png Installing is very easy. Just unzip the download and move the app to your applications folder if you wish. http://postachio-images.s3-website-us-east-1.amazonaws.com/c214c6764f99cbb35ab5b5250c5c898a.png To setup JasperReports Server you need to open up the js.quartz.properties file and make some changes. tomcat-location/webapps/jasperserver-location/WEB-INF/js.quartz.properties Really not much to it. You need to set the location of your server so localhost will work. Username and Password can really be anything you want because the SMTP tool is open. The sender email can also be anything you want and MockSMPT creates an email box based on the email address. We are using SMTP so just leave that alone. MockSMPT will listen out of the box on port 1025 so use that port unless you made changes in MockSMPT. After you makes these changes to your files you need to save the file and restart the server for them to take affect. http://postachio-images.s3-website-us-east-1.amazonaws.com/ba8add3814c5f20d46ca52d72cd41bc5.png Now, any emails sent from JRS will be caught inside of MockSMPT and be available for you to view. Below is an email sent out to a fake email address and the results. Again, MockSMPT is catching the emails so you can pretty much just send it to anyone you like. It’s pretty cool because you can see in the below picture that I have an email with multiple attachments. That is because I wanted to play around and see what it would look like if JRS sent out an email with a bunch of stuff attached. All the attachments work and it really demos quite nicely :) http://postachio-images.s3-website-us-east-1.amazonaws.com/116b665019e197ff4638131b0695fe69.png BlogId - e309b981-8d07-4a0a-b9a9-f7c76d75ecca
×
×
  • Create New...