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

johndahl

Members
  • Posts

    18
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by johndahl

  1. Thank you for the reply. I will try recompiling the jrxml files once again.
  2. I have been using JasperReports 1.3.3 in a project over a year now. Its been running fine but I want to use new features provided by latest version (v. 3.5.x). So I was wondering if it works if I simply drop the new jasperreports jar file without recompiling or modifying my existing reports? And by the way, do I have to upgrade JFreeChart library also if I opt to upgrade JasperReports? Thanks in advance.
  3. Sorry for my very late response. You have understood the problem correctly. And yes I have aligned the subreport correctly in the container, but I don't think it has any real effect on actual alignment of subreport elements. As far as I understand, to align the text elements horizontally center, JasperReports needs to know the width of textField. Although I have set the property "Enlarge between Margins" to the textField so that it covers the whole available width, it actually sets the width property to some calculated numerical value. The result is that if the subreport is oriented vertically, it will be correctly aligned only if used in vertically oriented report and vice versa. Currently I am using 2 subreport files as a quick and dirty solution. But I have a feeling that it can be done with just a single report. Any suggestions?
  4. Thanks. So iReport can't help on this case. The only option is to play with JasperReports API.
  5. I have 4 fields in a row positioned as <field1> <field2> <field3> <field4> Both <field1> and <field2> can be absent, in which I case I want to shift other remaing fields towards left as follows: <field3> <field4> We can call it floating horizontally (left). Can we do this in JasperReports? Thanks in advance.
  6. I have two jasper reports, one in landscape and other in portrait mode. Both reports use same subreport for page header which needed to be aligned in center horizontally. If the subreport is in landscape mode, it works for landscape only and same is the case with portrait mode. Can we align same subreport in center horizontally in both reports? I have removed all margins in the subreport. Thanks in advance.
  7. Yes, I am putting key value (eg. txtSubGroupId) to a report element and I can get that object by searching for that key. But I need the value that element is holding (in this cse txtSubGroupId). So how can I read this value without printing it in the report?
  8. I ran into the problem once again. When implementing the hidden element solution, I put one text field holding SUB_GROUP_ID in the report group header. When this field is printed in the file (currently pdf), then the java code can find the control and can read it text property. However when I hide the field ( by setting new Boolean(false) in the print when expression, then the java code can't find the element as it seems that the method JRPrintPage.getElements() returns only printed elements. Then I changed the element width and height to 5px. Now the java code can find the control, but getText() returns empty string. The interesting point here is while debugging in eclipse shows the field "value" of String holding array of characters of actual value of the field, the String itself is empty with count, hash, offset all set to zero. Then I increased the width and height of the field to only show the 1st character of it's value. Now the getText() returns only the 1st character that is printed. When I increased both height and width to show the full value, then only the getText() returned the full value. So it seems like the element holds only the printed character. But I don't want to print the value in the report. Now, how can I read the correct value from the element ? And can we read value from hidden (not printed) elements?
  9. Thank you for the useful thought. I have implemented both solutions and tried running both for a simple report containing 3 sub groups. From my simple experiment, method with finding control in jasper file seems a little bit faster than the query filtering method. However a report may actually contain more than 100 sub groups. The main point for comparison here is which process is faster: searching for control in jasper file in 100+ pages (each sub group can span multiple pages) or filling 100+ sub reports using query filtering. I think the first one will be faster. Thank you once again for your timely response.
  10. Thank you. The parameter solution did worked. Now having two solutions for the problem, I start to wonder which one is better(performance, speed)? Since filling is done only once by Jasper engine in the first solution (putting a hidden field), I guess this one may be faster but I don't know how much time consuming will the searching the hidden field will be? But in second case, filling will be done multiple times not for all records, but only for those filtered by SUB_GROUP. Hoping to get guidance once again.
  11. Ok, that will be a bit tricky solution. Now I am thinking if this can be achieved from report query by some filetering as follows: 1) Assuming a parameter SUB_GROUP_ID, if it's value is null (or -1), then don't filter result by SUB_GROUP_ID. 2) If value of SUB_GROUP_ID is not null or > 0, then filter the result by SUB_GROUP_ID so that only report for that SUB_GROUP_ID will be generated whatever no of pages it might take. The solution seems perfect for my case. But I am unable to achieve this. I can't give a calculated string value in report query. Is there any other workaround to apply such filter dynamically ( not programatically)?
  12. Thank you for the solution. I can find the total pages using JasperPrint.getPages().size() and print each page in separate pdf file. However I have a new problem now. I am using one "Report Group" printing the group in a new page always. Now if each record in the report group takes only one page to fill up, then there is no problem, I can print every PAGE_INDEX in separate pdf file. But if any record in the report group take more than one page to fill, then printing each PAGE_INDEX in separate file won't be correct as a single record in the report group will take multiple files while printing. So I need to know the start and end PAGE_INDEX of every record in the report group so that I can print every record in the report group to its own pdf file. How can I do that? Thank you for spending time for me.
  13. I am using JasperReports for one of my projects to generate PDF reports. However we have this peculiar requirement to be able to print every page of the report into separate PDF files. How to do this in JasperReports programatically? Thanxs in advance.
  14. Actually that's just an example to explain the situation. In my case, all data cannot be pulled from a single query, so the report query just pulls the main info(name, address, phone no only), but since I need to show salary info(we can assume that the main report query can't pull salary info along with employee info), how can I show salary info. Does JasperReport allows to use multiple report queries?
  15. If I have report query which gives employee info(having fields name, address, phone no only) and if I need to display their salary info, which is not available in the report query, how can I show salary value in report? I tried using subdataset creating a new to pull employee salary, but I don't know how to use it. Is this case a correct one to use subdataset? Please give me an example of using subdataset. Thank you in advance.
  16. Thank you for the solution. That feature was very cool. But that didn't solve my original problem. I am sorry to present the question in that way, but what I actually want is to be able to select single param_name/param_values from the rows of them. For e.g. I need to display only game_name: football I need to do it in iReport, not in the report query. So I just need to apply filter to get my required data, which I am unable to do right now. Thank you in advance.
  17. I am pretty new to JasperReports/iReport. Please forgive me if the solution is too simple or too complex:) I have a report query which produces following result: param_id param_name param_value 1 game_name football 2 player_count 12 3 play_duration 1.5hr What I want is to show these values horizontally instead of vertically as follows: game_name=football player_count=12 play_duration=1.5hr I tried applying sql WHERE clause in fields, but it seems like Fields only understands Java expressions, not sql. So, the problem can be generalized as displaying row data as columns. What are the solutions available for these kind of problems? And which one is the best to use? Thank you in advance.
×
×
  • Create New...