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

nKognito

Members
  • Posts

    14
  • Joined

  • Last visited

nKognito's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

0

Reputation

  1. I use DejaVu custom font in my reports.. Everything works fine until I added some charts.. Don't know why, but charts generated properly but labels are empty.. I implemented Customizer class which configures the font of labels: public class CustomFontCategoryChartCustomizer implements JRChartCustomizer { /** * */ @Override public void customize(JFreeChart chart, JRChart jasperChart) { CategoryPlot plot = chart.getCategoryPlot(); Font customFont = new Font("DejaVu Serif", Font.BOLD, 12); // Works fine plot.getDomainAxis().setTickLabelFont(customFont); plot.getRangeAxis().setTickLabelFont(customFont); plot.getRangeAxis().setUpperMargin(0.5); // Doesn't work LegendItemCollection legends = plot.getLegendItems(); for (int i = 0; i < legends.getItemCount(); i++) { legends.get(i).setLabelFont(customFont); } plot.getLegendItems().addAll(legends); // Doesn't work LegendItemCollection legends = plot.getLegendItems(); for (int i = 0; i < legends.getItemCount(); i++) { plot.getLegendItems().get(i).setLabelFont(customFont); } }}[/code]the code works fine, there are no exception but all the labels at charts are empty!! The rest of report (details and header) works fine! ANy help? Thank you in advance
  2. I am trying to generate some document with JasperReports and everything worked fine until tomorrow. I made some change and now each time I receive an empty first page and the second one contains a valid document. I already rolled back to previous versions but still there is an error with empty page. What can it be? The file is to long, so I uploaded it to here.
  3. I am trying to put some variable inside Variable Expression of another variable. For example: $V{sum} = $F{quantity} * ${price}, where sum is simple variable without any calculation $V{total} = $F{disb} * $V{price}, where total has 'Sum' calculation type. As a result I receive the wrong amount. But If I use: $V{total} = $F{disb} * $F{quantity} * ${price} the amount is valid. Is there any reason that variable inside variable expression gives wrong value? Thank you
  4. I am trying to set the unit in the iReport to mm. But the problem that after changing the settings in Tools->Options->General->Unit from px to mm the only thing is changed is ruler. If I change the report's margin (in project properties) it still has the same values. How can I set these values in mm?Thank you
  5. As I understand "Spacing After" adds a space after the text. But I can't make it work - I have text block (Position type: float, stretch type: no stretch), I fill "Spacing After" with some value but in the outpur PDF there is no empty space after that text block. What I am doing wrong? Thank you
  6. Hi, I want to implement such report: there are invoices, each invoice has sum and currency. In the report can be invoices with different currencies. What I need is to show in summary total sum for each currency. For example, report has 2 EUR invoices and 3 USD invoices. So in the summary should be 2 records: total for USD and total for EUR. Is it posible to implement it with jasperreports or I have to create a list of totals at the java-side and pass the list as a parameter? Thank you
  7. Thanks for your reply. I found what the problem was - fields should not touch each other. This topic helped me: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=20446 Post Edited by nkognito at 02/15/2012 16:13
  8. Hi, thanks for your reply. Actually, I have three rows of textfields - one under another. The problem is when I put empty value to first one, the others doesn't reposition to first's place.
  9. I have some accounting report's summary with such rows: vat, net, total. How can I reposition some row after another was removed because it was empty? For example, if vat is empty, I set 'Remove line when blank' and 'Blank when null' - this will remove the line from the template. But I need to reposition the net and total rows. How can I do that? Thank you
  10. Closed. I had to run iReport as windows administrator...
  11. Hi, I am trying to install new font in iReport->Settings->Fonts. It gives me an Aceess denied error after I choose TTF files and locales. In fonts window there are already DejaVu font with (from a read-only extention) notes. How can I solve this problem? Thank you
  12. Thanks for your reply. I understand what the problem is. What I can't understand - why it fails on warning? It should fail only on errors
  13. I am trying to compile a template and it fails with warning: net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 1. Warning : Element bottom reaches outside band area : y=85 height=126 band-height=192 Why it fails on warning? It should compile that template, no? Thank you
×
×
  • Create New...