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

Help with Jasper reports


crescent

Recommended Posts

 Hello,

I am fairly new to Jasper Server, and I had a question on how to modify data on jasper reports. My company is running jasper server 3.5, and when they run the report they don't want to see certain items on there. Is there a way I can set a filter on that particular report, and if that is possible how do I go about doing it?

 

Any help will be greatly appreciated

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Do you know if those reports were developed using iReport?

If so, then what you can do is connect to the server using iReport (using the repository navigator), browse to the report's location in the repository, and then open it up using iReport.

Then, you can modify the query that the report is using, and you can add the necessary filter to the query itself. Once you're satisfied with the report data, you can upload the report back to the server.

 

Link to comment
Share on other sites

 Thanks for your reply, but I have I already tried that and I don't know how to set the filter there. Once I am in iReports, I go into the file that I need to change, I open the main jrxml file. It gives me the designer view, xml code and preview of the report but I don't see any options to set filters.

To be more specific, it's a production report and displays a list of companies and their orders with some other information. I want to omit some companies from the report. Now my question is how would I do that?

I have never worked with Jasper reports before, I am new to this company and the previous IT guy didn't leave any documentation on jasper.  

 

Regards,

TK

Link to comment
Share on other sites

ok, it's good that you're familiar with the iReport tool. When you open up the JRXML file in the Designer Mode, you should "Designer", "XML", and "Preview" - click on the button that's right next to the "Preview" button, it looks like a cylinder with an arrow coming out of it.

When you click on that button, do you see a query? If you do, I'm thinking you could add a WHERE clause to exclude the companies you don't want to see.

 

Link to comment
Share on other sites

Do you think there is an easier way of doing this? It seems like I have to write a code to make the changes, plus I didn't see a WHERE clause, I did see a remove clause. But I just don't know how to use it (the syntax, the parameters). I was wondering if there is anything you can tell me or point me towards that can make my job a little easier.

PS: I don't have a programming background. I am more towards networking and desktop support. 

Link to comment
Share on other sites

Another option you could try is this. In the same pop-up window where you see the query, there's a button toward the bottom labelled "Filter Expression...". Click on it, and there you can choose the field that you want to filter on, and in the expression editor, you'll need to build an expression to exclude the companies you don't want. Something like this:

!$F{$company_name}.equals("Company1") && !$F{$company_name}.equals("Company2")

Yes, it's a programming statement. The thing about iReport is that it's meant for someone who's comfortable with SQL and/or Java, unfortunately it's not a pure end-user type of an application. To maintain and occasionally update these reports, you're going to need someone with that skillset.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...