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

ajay891

Members
  • Posts

    15
  • Joined

  • Last visited

ajay891'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. Hi All !! ireport provides facility to enter series colors for a chart, I want to color each key of a piechart, can I get some input on same ? Thanks and regards, Ajay
  2. Thanks Anandharaj Actually, it works as you shared, I was having n in the DB Field and hence the static text was going to next line when suffixed (which was not visible). Thanks you again for your help. Ajay
  3. Thanks Anandharaj The thing is - This works <textFieldExpression class="java.lang.String"><![CDATA[ "Text Value" + $F{DB-VALUE} ] ]></textFieldExpression> Output = Text Value + DB_VALUE But this gives <textFieldExpression class="java.lang.String"><![CDATA[$F{DB-VALUE} + "Text Value"]]></textFieldExpression> Output = DB_VALUE Any input ? Thanks, Ajay
  4. Hi All !! A basic question, I am not able to get value of a Field and Static Text as the textField value, I get textField = $F{Field}. Whats the best way to capture $F{Field} value and some text in a textField ? Thanks, Ajay
  5. Hi All !! I am looking for some inputs - can we display the grouped data side by side (rather than default one-below another) ? Thank you, Ajay
  6. Thank you for the inputs Lucian !! By static contents, I meant, can we see the textfields, frames etc even on detail band of a subreport when the datasource is not present ? Thanks, Ajay
  7. Hi All !! I have a main report and 5 subreports, I am supplying the data to each subreport by JRTableModelDataSource (datasource) but if the datasource (DS) is null or it does not have any row/column, the subreport is not showing up. Is there any way to make sure I can see subreport static contents even if the DS is not present. Thanks, Ajay
  8. Hello All !! I have a Main report with 9 subreports on it, each subreport is on a frame. These subreports get 9 JRTableModelDataSource as data source. If any of that Datasource is not present the subreport is not getting dispplayed. I want to dispplay "No Data Found" for each subreport in this case. 1) If I use testfields on top of Frames and overlap subreports on it, it looks bit clumsy 2) Like in JFreeChart one can specify the message to be displayed if chart data is not available, can we set something from calling java ? Display "No data found" if Datasource not present ? 3) Does subreport has any option to display some message for some conditions ? 4) Can something be written on the Frame background or can no data found image be set in frame background ? what are the other options available ? Thanks and regards, Ajay
  9. Hello All !! I am new to ireport, need some help. In ireport, by any chance, can we export CSV datasource settings in XML with fields type information included (Date, String, Long, etc? Or is there any way to determine type of data-fields from the loaded CSV datasources, so that jasper-text-fields can be assigned proper type ? Thanks, Ajay
  10. Hi Lucian !! As of now, I not able to use the 2nd approach - the best out of JRElementsVisitor I can get is the attached code but that to doesn't give me handle on JasperDesing or any other object which can help me to replace (add/remove) styles Code:JRElementsVisitor.visitReport(jrXML, new JRVisitorSupport() { @Override public void visitSubreport(JRSubreport subreport) { } }); Can you please elaborate on 2nd approach how to use that ? Thanks, Ajay
  11. Thank you very much Lucian. I tried first one and worked fine. Thanks, Ajay
  12. Hi !! I am new to Jasper. I will be very thankful I can get some help on couple of queries 1) Since jrtx does not support Conditional Styles whats the best way of bundling all the common styles used in various subreports 2) Is there any extra care needed to replace the styles at run time To take care of style consistency, I have a style-lib.jrxml file which has all the styles and if I want to change similar style in rest of subreports, I load 'JasperDesign' object from the 'style-lib.jrxml' and replace all the matching styles in subreports with the one from 'style-lib.jrxml' But the issue is when I replace the styles and compile, the conditional styles in jasper file does not work. And if I reload the replaced subreport jrxml in ireport and compile, the conditional style work. Code: JasperDesign styleLibrary = JRXmlLoader.load(styleFile); logger.info("Loaded style file:'" + styleFile.getName() + "'"«»); List<JRStyle> styles = styleLibrary.getStylesList(); for (File jrxmlFile : jrxmlDir.listFiles(new FileExtensionFilter( EXT_JRXML))) { JasperDesign jrXML = JRXmlLoader.load(jrxmlFile); for (JRStyle style : styles) { jrXML.removeStyle(style.getName()); jrXML.addStyle(style); // logger.info("Replaced style :'" + style.getName() + "' in // file :'" + jrxmlFile.getName() + "'"«»); } JRXmlWriter .writeReport(jrXML, jrxmlFile.getAbsolutePath(), "UTF-8"«»); if (compile) { String fileName = jrxmlFile.getName(); fileName = fileName.substring(0, fileName.length() - ".jrxml".length()) + ".jasper"; File jasperFile = new File(jrxmlFile.getParentFile(), fileName); JRSaver.saveObject(JasperCompileManager.compileReport(jrXML),jasperFile); JasperDesign jrXML = JRXmlLoader.load(jrxmlFile); logger.info("Compiled file:'" + jasperFile.getAbsolutePath() + "'"«»); } } I am sure that there are better way of handling it ? Thanks, Ajay
×
×
  • Create New...