Jump to content
Changes to the Jaspersoft community edition download ×

grzewal

Members
  • Posts

    12
  • 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 grzewal

  1. Hi. I've used iReport 1.2.5 for a long time but there was a bug (or my misuderstanding). Changed version to 1.3 but nothing changed. Here's the thing. As we all know using styles in JasperReports is much like cascading styles in HTML. And here's where the bug comes. Let's imagine I've defined a style with some padding, for example: <style name="defaultContentStyleJustified" isDefault="false" hAlign="Justified" vAlign="Middle" borderColor="#000000" topPadding="4" leftBorderColor="#000000" leftPadding="4" bottomBorderColor="#000000" bottomPadding="4" rightPadding="4" isStyledText="true" fontName="Arial" pdfEncoding="Cp1250" isPdfEmbedded="true" isBlankWhenNull="true" /> As you can see this style sets all the paddings to 4. Now let's imagine I've used this style in some textElements several times like this: <textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement style="defaultContentStyleJustified" x="0" y="0" width="483" height="20" key="textField-21" stretchType="RelativeToTallestObject" isPrintWhenDetailOverflows="true"/> <box topBorder="None" topBorderColor="#000000" topPadding="4" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000" bottomPadding="4"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$R{system.version} + " " + $F{SYSTEM_VERSION}]]></textFieldExpression> </textField> and I've overriten the border and paddings values and what's most important I wanted to set leftPadding and rightPadding to 0. When I do this via iReport somehow the leftPadding="0" and rightPadding="0"is ommited when writing the jrxml template. As the idea of cascading styles works the element takes the padding form the style defined "higher" in chierarhy, which makes leftPadding="4" and rightPadding="4". My question is wheather the iReport ommits all paddings values set to 0 on purpose or is it a bug or is there something I do not understand... With regards, Grzegorz W.
  2. Here's my idea: You can try to create a group with group expression set to $V{PAGE_COUNT} and a start on new page property set to true, header set to for example 1px and footer to 0px, printWhenExpression for group header set to new Boolean($F{someField}.equals("some value")), This way every time the field called someField will contain a value equal "same value" the group header will be rendered and a page break will be introduced. HTH, Grzewal
  3. Hi! I've got a big classpath problem. The thing is that I'm working on a standalone java application which would use JasperReports. The application has plenty of packages. After I build the distribution even though I add a proper line to the manifest I get errors about missing packages form JasperReports at report compilation time. I tried to set the net.sf.jasperreports.compiler.classpath property at runtime to point the jasperreports-1.2.5.jar and it works ok. The problem is that I use only custom datasources. And when I set the net.sf.jasperreports.compiler.classpath property subreports seem to miss the classes implementing custom datasources. I know I must add those just as well to the net.sf.jasperreports.compiler.classpath but those custom data sources use big number of core ore domain classes and I would have to add those to, and so on and so on. Is there a way to somehow nicely modify the classpath for the compilation process to make all the required classes visible? Regards, Grzewal
  4. Actually there's no need. I sovled it. I just made a group for each subreport where group changed when record number field in main report changed and I put each subreport in different group (made sense as each subreport was presenting detail information about each record). Given this I could completely erease blank space if some details (and thus subreports) were unavailable thanks to band print when expression. Thank you for your concern. Regards, Grzewal
  5. Maybe you could try to use a subreport that displays the phone numbers as fields for a person givern as a parameter... HTH, Grzewal
  6. Hi. I'm not sure what you're trying to achieve but you get the error because you try to pass an Array: Code:String[] s1=new String[len]; (of Strings, sure but still an Array) for the homephone parameter Code:[code] hmap.put("homephone",s1); where the engine expects to see a String: Code:[code]<parameter name="homephone" isForPrompting="false" class="java.lang.String"> HTH, Grzewal
  7. Hello. I'd like to know how to solve a problem like this: I have a master report with 3 subreports. Each of them is printed depending on value of some fields from master report using printWhenExpression. As I use iReport I set the height of each subreport element to 1 px - to make as little blank space as possible when a report is not being displayed due to the printWhenExpression condition evaluation. The problem is that only the first subreport displays properly - the rest are missing. I set the two latter subreports positioning to float and the first one relative to top. And it surely is not because of their datasources because when I remove any two subreports form the master the trid one is displayed properly. In addition subreports may need more space than one page each. And they are all placed in detail band without any groups. Maybe someone could give me some suggestions on how to make all of the subreports visible and to design their objects in master report so that they leave as little blank space as possible when they're not printed. Thank you! Regards, Grzewal
  8. Hi. I've quite a complex report to create and I was wondering wheater someone could give me some design tips. The situation is like that: I have a collection of objects which all inherit from one baseObject class. Each of those objects has some characteristics like: name, amount, value, type, etc. Now some of those objects, depending on their type have some additional characteristics, eg. if a object represents software it has system requirements characteristic, licence expiration date, etc. Each object can also be used in a procedure (and I do not mean java method but some business meaning procedure). For example a extinguisher can be used in fire fighting procedure. Each procedure has also it's characteristics like: symbol, type, etc. All the logic, and data manipulation methods are ready to use, so I can easily retrieve the objects collection, given a type of object I can easily retrieve it's additional characteristics, procedures, etc. The point is I have to make a report which will list all the objects names, and if a object has some additional characteristics they will be displayed in tabular way below the objects name as will the procedures. If there are no procedures or no additional characteristics only the object name get's displayed. The bad news is that user can select wheater they want the procedures and/or additional characteristics to be displayed. Do you suppose I should use multiple templates, each for one user's choice of the detail level? I should probably use some custom data source and subreports - but how do I do that to make sure that the subreport retrieves data for the given parent report object, eg that the subreport lists the additional characteristics for the parent report "current" object? Any tips are welcomed, Regards, Grzewal
  9. Try using JRRtfExporter and it's exportReport() method. Just be sure you have recent enough version of JasperReports. HTH, Grzewal
  10. Try to implement the JRDataSource interface in a way that it would retrieve values form your HashMap and pass them to the report fields. Kind regards, Grzewal
  11. Hi! I was wondering if anyone could tip me on solving a problem like this: I have a report which (in simplified version) looks like this: --------------- |col_1|col_2| --------------- |val11|val12| --------------- |val21|val22| --------------- |val31|val32| --------------- Data is sorted by col_1 values. The case is that values in col_1 are not unique. For identical values in col_1 I'd like to make the report lok like that: --------------- |col_1 |col_2| --------------- |empty|val12| | val_1|------- |empty|val22| --------------- |val31 |val32| --------------- which means that empty is really empty, col_1 values are vertically aligned to the middle and what's most important - there is one border per merged col_1 fields. If it weren't for the border I could use Print repeated values attribute set to false, but the report would look like that: --------------- |col_1 |col_2| --------------- |val_1 |val12| --------------- |empty|val22| --------------- |val31 |val32| --------------- I must mention that the number of columns is static (which if I understand right prevents me from using a crosstab). Any help would be appreciated! Kind regards, Grzewal
  12. Hi. Is it possible to somehow politely interrupt report template compiling process and/or then report filling process. Reason behind this is to allow user to stop generating report if it takes too long. Regards, Grzewal
×
×
  • Create New...