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

shamphadtale

Members
  • Posts

    54
  • Joined

  • Last visited

shamphadtale's Achievements

Enthusiast

Enthusiast (6/14)

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

Recent Badges

0

Reputation

  1. As static text does not streach and my column names are going to vary I am trying to use Text Field as column header. How should I set text to it? I am doing as shown in below code where col.getTitle() gives column header to be shown, but I am getting exception as follow - net.sf.jasperreports.engine.JRException : Errors were encountered when compiling report expressions class file: Is anyone have idea about how to fix this issue? 1. Syntax error on token "Name", delete this token value = Device Name; //$JR_EXPR_ID=26$ <--> Code:JRDesignTextField staticText = new JRDesignTextField(); staticText.setX(initX); staticText.setY(initY); staticText.setWidth(col.getWidth() + widthAdjustment); staticText.setHeight(HEADER_BAND_HEIGHT); staticText.getLineBox().setLeftPadding(3); staticText.getLineBox().setRightPadding(3); staticText.setPrintWhenDetailOverflows(true); staticText.setStretchType(StretchTypeEnum.RELATIVE_TO_TALLEST_OBJECT); staticText.setMode(ModeEnum.OPAQUE); staticText.setBackcolor(headerColor); col.getHeaderStyle().getLinePen().setLineWidth(0); headerStyle = col.getHeaderStyle(); staticText.setStyle(headerStyle); staticText.setHorizontalAlignment(HorizontalAlignEnum.CENTER); staticText.setStretchWithOverflow(true); JRDesignExpression expression1 = new JRDesignExpression(); expression1.setValueClass(String.class); expression1.setText(col.getTitle()); staticText.setExpression(expression1); //staticText.setText(col.getTitle()); headerBand.addElement(staticText);
  2. I am exporting report using JRXhtmlExporter, while exporting verticle space between data get reduced resulting into overlapping of data. When i use setLineSpace() method which is depricated method in jasper report 4.5 problem get resolved. But on report viewer verticle space between rows is get increased. Is there any other export time property by which i can set verticle space between two data rows while exporting report to HTML.
  3. When report is exported using JRPdfSaveContributor and is file name is already exist then contributor ask - File already exist, do you want to replace it? But such dialog is not present when we use some JRPdfExporter such dialog is not present if file exist, it directly over write existing file. Is there any thing in exporter by which we can check if file is already exist or not?
  4. I am thinking of recreating report design and save it to PDF with default font Halvetica if user selects to save generated report as PDF. Is there any better option than this?
  5. Yes iText uses Helvetica font in exported PDF if font selcetd to generate report is not present. But exported PDF reports does not look well, some text get overlapped with next column or next row. It is due to the formatting(like streching of text fields) are done when report is generated. Exported report has same formatting as of generated report but has different font results in overlapping some text /tools/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif. Is there any solution for such problem? How should I deal with this problem? Post Edited by shamphadtale at 01/02/2012 09:01
  6. I am already using iText-2.1.7.jar. still facing issue. Is anything more I need to do?
  7. Hi Parag, I am facing similar issue with font Aharoni, did you got any other solution?
  8. Thanks a lot lucian.. Today you are god for me /tools/fckeditor/editor/images/smiley/msn/regular_smile.gif Last 3 days I was trying to fix the issue, but no success. I tried all methods by which I can export report to HTML format. I had checked export properties, did not look at fill properties. Yesterday night I had came to conclusion that after exporting file to HTML I need to open it again and insert spaces in those words which has length more than column width. But due to your help I need not do that thing. Thanks a lot again!
  9. One more thing i noticed just now. Suppose column width is 10 and data contains 11 letters without space then 11 letter is not get display. If there is space then all all letters from that space goes on second line. Means word wrap worked if words are separate and their length is graeter than column width. But it will not work if there is single word(no space) having length greater than column width. WHy it is happening? DO i need to set some property for XHTML? If i export report using JRHtmlExporter exporter, column width get increased as per data width. Is there any property setting by which I can get similar output for XHTML report?
  10. Hello Parag, As Stanislav is saying try to use 4.5 and ugrading report from 3.6 to 4.5 is easier. I had faced similar issue with older japer version, but after using jasperreport 4.5 still now issue is not produced. I dont know root cause of issue, but i got required output. Regards, Sham
  11. I am exporting report to HTML as shown in below code. I have set property for page break - IS_WRAP_BREAK_WORD - to true but still in exported report words are not getting wrapped. They overlapped with next column data. How to fix this problem? Code: Post Edited by shamphadtale at 12/27/2011 13:30
  12. With JRHtmlExporter we can set different properties to hide header or footer etc as follow - jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.ignore.page.margins","true"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.exclude.origin.keep.first.band.columnHeader","columnHeader"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.exclude.origin.keep.first.band.pageHeader","pageHeader"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.exclude.origin.band.columnFooter","columnFooter"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.exclude.origin.band.pageFooter","pageFooter"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.remove.empty.space.between.rows","true"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.wrap.break.word","false"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.flush.output","false"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.white.page.background","false"); jasperPrint.getPropertiesMap().setProperty("net.sf.jasperreports.export.html.size.unit", "pt"); Are there similar properties for JRXhtmlExporter? If yes please can you provide me names, if no at export time how can I remove header and footer from XHTML page.?
  13. Thanks asejas, I am using available fonts on system, I am not providing any font through my application. There could be no. of fonts that can available on different systems. I am giving facility to user for selecting the fonts from available fonts present on system. I need something by which if font is present on system but it is not supportted by PDF and if application user selects that font then while exporting report to PDF some standard font like Arial(which is availabel on all windows machine) should get use. So for this situation I guess creating jasperreport font extention jar will not be the useful solution, since I am not aware about which fonts to be include in font extention. Please correct me if my understanding is incorrect. I am not clear about how to do this, what should be the best way to solve such situation? Regards, Sham Post Edited by shamphadtale at 12/23/2011 09:46
  14. This is not export issue it is desighn issue. Please try to set following property to your detail band.PREVENT); By setting this property records will no get split in viewer and as well as in exported excel. detailBand.setSplitType(SplitTypeEnum.
  15. What is the purpose of setPdfFontName() method of JRDesignStyle. Does font set by this method will get used if font used in viewer is not available in iText library?
×
×
  • Create New...