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

bthale

Members
  • Posts

    23
  • 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 bthale

  1. Is bold, italic, etc supported in text files using JRTextExporter?????
  2. We have many reports in plain text. It seems that setting the bold or italic for a text field doesn't work. <staticText> <reportElement x="0" y="10" width="177" height="14"/> <textElement> <font isBold="true"/> </textElement> <text><![CDATA[DELIVERER INFORMATION]]></text> </staticText>
  3. Why don't you just precompile and place inside your jar file? Then you simply use the path name to the compiled report when you create the InputStream. Example: InputStream is = (InputStream) JRLoader.getResourceInputStream("com/path/jasper/MyReport.jasper"); Post Edited by bthale at 05/02/2012 15:29
  4. I'm not sure if you are already doing this but I would make sure that A. Parameter is defined as String in jrxml B. Declare you HasMap like HashMap<String,String>(); C. Check your typing for mistakes D. Try the query in your DB program to verify it brings back expected results
  5. We have nmany plaintext reports and there seems to be a bug in detail lines. A blank line will show up in detail bands. Sometimes every 15th line, sometimes every 20 lines, and this is random per report. With in a report the blank line is usually constant. We have been somewhat successful by making the detail band the same height as text fields. But it doesn't always work. None of the text fileds are allowed stretch as we will just truncate if necessary. What can be causing this and how could I fix it? This does not happen when exporting as PDF or Docx for example. Just plaintext.
  6. I am generating a report usig the JRSwapFileVirtualizer class. The javadocs state that the cleanup() method dispose of the the file, but it's not working. The swap file remains. What's the correct way to dispoase of the file after the report is run?
  7. I have a report where a text field has to be a fixed width. The current font and size holds 16 characters. If there are more in the data, that's ok. The problem is that Japser is truncating at the last space. I want it to truncate at character 16. I have tried setting property net.sf.jasperreports.print.keep.full.text but this doesn't work. What should I do to make sure it doesn't truncate at the last space?
  8. And what variable would that be? Maybe REPORT_COUNT but I would need to know if the REPORT_COUNT is less than the REPORT_DATA_SOURCE size, and as far as I know, REPORT_DATA_SOURCE only has two methods, next() and getFieldValue(). It would be nice if you could use something like size() and indexValue()
  9. I have a requirement to add a string "continued", when detail data over runs to another page. Does anyone know how to accomplish this? My first thoughts are to use a scriptlet and override beforeDetailEval() and afterDetailEval(), but not sure if it would be too early or too late to determine detail content is finished. the detail data is a subreport with a single line of height 14.
  10. Also - there is no calcuation, just trying to return a string that is only available in the subreport
  11. I followed these instruction, but still get null returned. I know the variable is not null in the subreport, because I am displayiing it for debugging purposes. There is also a calculation setting in the dialogs where you define a return variable. I'm not sure if it should be set to System also, but there is no option in the dropdown for System. Is this a bug?
  12. Anybody have an idea of how to get this done? I've tried several combinations of settnigs on the variables, but still get nothing back - just prints null.
  13. Where is the jasper report file located? In the root directory of D drive? If so your code should read jasperPrint = JasperFillManager.fillReport("D:/devreportjob_Main.jasper", parameters, timecardListDataSource); Add a forward slash to the file location
  14. I have a subreport that needs to return a string variable. I need this variable displayed in the Page Header. I have tried evaluation times of Now, Report, and Band, but alwys get null. I have debigged the data and the subreport variable is getting it's value from a field in the subreport. This field is not null. How do I get the correct data back from the subreport. Do I need to have the variable calculation set to something other than nothing?
  15. I am trying to use a local class in my report. I used the <import> element with the full classpath. The class is in the proper directory, and I have added the classpath to iReport as well. I still get class not found errors. What more do I have to do? The jrxml file is also in the classes directory and part of the project packages. <import value="com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary"/> <parameter name="activityDate" class="java.lang.String"/> <parameter name="systemDate" class="java.lang.String"/> <parameter name="systemTime" class="java.lang.String"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["com/theocc/positions/batch/jasper/"]]></defaultValueExpression> </parameter> <parameter name="reportName" class="java.lang.String"/> <parameter name="schemaDescr" class="java.lang.String"/> <queryString> <![CDATA[]]> </queryString> <field name="indexPositionSummary" class="com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary"/> <field name="equityPositionSummary" class="com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary"/> <field name="indexPositionITM" class="com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary"/> <field name="equityPositionITM" class="com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary"/> [jrc] 1. java.lang.ClassNotFoundException: com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary [jrc] 2. java.lang.ClassNotFoundException: com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary [jrc] 3. java.lang.ClassNotFoundException: com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary [jrc] 4. java.lang.ClassNotFoundException: com.theocc.positions.batch.eor.valueobject.ExpiringPositionsSummary
  16. We are using a framework that we have written that makes it hard to pass in a data source for a subreport. So I created a variable of type JRBeanCollectionDataSource. I have a scriptlet that overrides beforeDetailEval. See code below: When I set a break point in this method, I can see the correct data being retrieved and passed to the variable, but debug console outpupt shows no data being passed and subreport is empty. What could cause this behaviour? The jrxml specific code is here. <variable name="SUB_REPORT_DATA_SOURCE" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/> <subreport> <reportElement x="0" y="9" width="802" height="41"/> <dataSourceExpression><![CDATA[$V{SUB_REPORT_DATA_SOURCE}]]></dataSourceExpression> <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "TradeUpdatesSubreport.jasper"]]></subreportExpression> </subreport> Code: public void beforeDetailEval() throws JRScriptletException { JRBeanCollectionDataSource ds = (JRBeanCollectionDataSource)this.getParameterValue("REPORT_DATA_SOURCE"); this.setVariableValue("SUB_REPORT_DATA_SOURCE", ds); } Post Edited by bthale at 04/04/2011 20:48
  17. I need to show a list of strings in 1 to 3 columns depending on the size. This works when I have more than enough for the first column, but I would like to control when the columns break. What I want is something like this: If there are more than 50 items, break it into two columns If there are more than 75 items, break it into 3 columns, If more than that, go to next page. I have tried with a subreport and 3 columns and tried with the list component, but I can't control when it breaks. If I have more objects to print, the last one will break into 3 columns, but the first is just 1 column. I am attaching my report, and this is not what I want. The 3rd page is the behaviour I am seeing that is not what I want. Is it possible?
  18. JRDocxExporter does not keep the font that the report was created in. It always defaults to Times New Roman. If I change the export to be JRRtfExporter, then the original report font is kept. I looked into the code and JRDicxExporter is using deprecated font code.
  19. Pass the lists of data to your subreports in <dataSourceExpression> element. Check the docs. Here is an example. <subreport> <reportElement positionType="Float" isPrintRepeatedValues="false" x="2" y="58" width="551" height="69" isRemoveLineWhenBlank="true"/> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{seriesList})]]></dataSourceExpression> <subreportExpression class="java.lang.String"><![CDATA["ExpirationReplacementMemo_subreport.jasper"]]></subreportExpression> </subreport> The data maps to Fields just like the main report. I wish someone could explain why My subreports fonts are different than main report. I'm trying to keep from putting the font ON EVERY ONE OF MY TEXT ELEMENTS!!!!
  20. I have the problem too. I saw a post that said that was a bug in 3.5 but it was fixed. I am using 3.7.1 but it's still happening.
  21. I have a number of reports that have to be exported to DOCX. I have set a font in default.jasperrports.properties file, but I don't think I have it in the right place because the fonts are showing in New Times Roman, which is not the default. Another problem is that another report that has a subreport, the font shows in Arial for the main report but the subreport shows as New Times Roman. This only happens with DOCX. Is this a MS Word problem? Where should I place the properties file. Right now it is in the same directory as my jasper report files.
  22. I have been working for three days on something that seems doable and easy but has been quite frustrating. I have a java bean data source that contains a list of data. This list is passed as data source to a subreport. This first level subreport works fine. Within that data is another list which I am passing to a subreport embedded in the first subreport. This subreport data seems to be passed, but is never shown. I have tried many different things to no avail. I even create 3 simple reports with nothing but static test in the title, master, sub one, and sub two. The last subreport in this simple setup does not show either. While I don't know if the datasource is actually passed, I do pass in a parameter that shows the list size which is shown. I did this for debugging purposes and added to a page header section, but the detail section doesn't show. So maybe it's not possible to do this Master -> SubreportOne -> Subreport Two. Frustrating to say the least The reason for creating the report this way is because I need the last list (subreport two) to display in 3 columns.
  23. I am having trouble passing data down to a subreport. This subreport is inside another subreport. I tried passing REPORT_DATA_SOURCE but no data is displayed. Is it possible ot fill a subreport in java code and add the subreport to a master using the API?
×
×
  • Create New...