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

callrmk

Members
  • Posts

    11
  • Joined

  • Last visited

callrmk's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. Dear members, Anyone got the answer?Please help. I have never used jasper before,please help the beginner.In future ,my expertise may help someone else to solve their problems through this forum. Thank you,
  2. Hi, As i am not able to attach all my code and supporting documents to existing thread, i am starting new thread.Please help. Problem:Trying to generate PDF for a webpage(To provide printer friendly version in PDF there by avoiding browser dependencies). Last lines of the page are missing while floating/paginatind to next page. How i am doing that? i have around 70 elements on a webpage and the height of the Detail band is not sufficient to place all elements.So I am using group header and group footer so that I can place some of our detail elements on a special group header, some of them will probably remain on the detail section, and the rest could go on the group footer.i have started placing the elemets on Group Header ,and i expected the elements to flow(isSplit=true) to the next PDF page when they are not fit in current page.But when the end of the page is reached, subsequent elements are disappearing.In the PDF report i have attached,last line of the first page is Name of regulatory authority of manager Rugulatroy Authority Value The next line to be printed as a first line of the next page is Please provide the licence number issued L1212122212121 by the relevant regulatory authority but this line is disappearing and the next line to be printed also missing some of its part.Please see the PDF and java programs attached.I have tried with isPrintWhenDetailOverflows but couldn't work.Depending on the data entered by the user for each field,last line of the page may differ but what expected is, It should flow to next page if it not fit in current page. Please advice whethere there is any other way or am i doing anything wrong. kindly ask me if you need more clarification about my problem.attached Java program, jrxml,and PDF.Hope this time i can able to attach.you may consider adding more data in java program and see the PDF generated. Thank you, Regards, Mohan Code:import java.util.HashMap;import java.util.Map;import net.sf.jasperreports.engine.JREmptyDataSource;import net.sf.jasperreports.engine.JRPrintElement;import net.sf.jasperreports.engine.JRPrintPage;import net.sf.jasperreports.engine.JasperCompileManager;import net.sf.jasperreports.engine.JasperExportManager;import net.sf.jasperreports.engine.JasperFillManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.engine.export.JRPdfExporter;import net.sf.jasperreports.engine.export.JRPdfExporterParameter;public class GeneratePDF { public static void main(String[] args){ try{ String srcFileName = "C:\form.jrxml"; String destFilename="C:\form.jasper"; JasperCompileManager.compileReportToFile(srcFileName,destFilename); Map<String,String> parameters = new HashMap<String,String>(); parameters.put("page_title", "View Notification"); parameters.put("notificationNo_label","Notification Number :"); parameters.put("notificationNo_value","09L5G2B0966"); parameters.put("sectionSchemeInfo", "Information on the Restricted Scheme"); parameters.put("schemeNameQn1", "Name of the restricted scheme ("the scheme")"); parameters.put("schemeNameQn1_value", "schemname- sdfsdfsd dfasdfasd fasdfasdfasdfasd fasdfasdf dfs fsdaf asdf sadfsdfsda sdf sdfasdf sdfsdafsad sadf sadfsadfsd asdfasd fsadfsaf sd fsdfsd fsdf asdfsda fsddfdEND"); parameters.put("NameChangeTo", "changing to"); parameters.put("schemeName_q1New", "schemnameNew- sdfsdfsd dfasdfasd fasdfasdfasdfasd fasdfasdf dfs fsdaf asdf sadfsdfsda sdf sdfasdf sdfsdafsad sadf sadfsadfsd asdfasd fsadfsaf sd fsdfsd fsdf asdfsda fsddfdEND"); parameters.put("schemeNameEffDateChange_value_1", "on 21/05/2009 "); parameters.put("isSubFundQn2","Is the scheme a sub-fund of an umbrella fund?"); parameters.put("isSubFundQn2_value","Yes"); parameters.put("umbrellaFundNameQn21","State the name of the umbrella fund"); parameters.put("umbrellaFundNameQn21_value", "umbrellafund-sdfasdfasdfasdfasdfasdasdfasdfsadfsadf sdfsadfasdfasfserger erwgwergwergsdfgsdf gsdfgsdfgsdfg fsdgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgdfgsdfgsdfgsdfgfdgf END"); parameters.put("UmFundNameChangeTo", "changing to"); parameters.put("umbrellaFundName_q2_1New", "umfundchange- sdfsdfsd dfasdfasd fasdfasdfasdfasd fasdfasdf dfs fsdaf asdf sadfsdfsda sdf sdfasdf sdfsdafsad sadf sadfsadfsd asdfasd fsadfsaf sd fsdfsd fsdf asdfsda fsddfdEND"); parameters.put("umFundEffDateChange_value_1", "on 21/05/2009 "); parameters.put("isInSingaporeQn3","Is the scheme constituted in Singapore?"); parameters.put("isInSingaporeQn3_value", "Yes"); parameters.put("jurisdictionQn4","State the jurisdiction under which the scheme is principally governed"); parameters.put("jurisdictionQn4_value", "Singapore"); parameters.put("trusteeNameQn51", "Name of trustee to be appointed for the scheme"); parameters.put("trusteeNameQn51_value", "trustee retertertertrdf dgfdf sdfad fasdf asdfasdfasdfasdfasdfasdfsad sdfasdfasdfasdfsdf sdfsdfEND"); parameters.put("isCloseEndedQn6","Is the scheme a closed-end fund (as defined under section 2 of the Securities and Futures Act, Cap. 289) constituted either as an entity or a trust?"); parameters.put("isCloseEndedQn6_value","No"); parameters.put("sectionManagerInfo", "Information on the Manager"); parameters.put("mgrNameQn7", "Name of manager for the scheme"); parameters.put("mgrNameQn7_value", "Manager-sdfgsdfasdfasdfsd sfsad sdfasdf asdfasdfsd sdfsdfasdf sd fsdfasdfsd END"); parameters.put("MgrNameChangeTo", "changing to"); parameters.put("mgrName_q7New", "mgrname change- sdfsdfsd dfasdfasd fasdfasdfasdfasd fasdfasdf dfs fsdaf asdf sadfsdfsda sdf sdfasdf sdfsdafsad sadf sadfsadfsd asdfasd fsadfsaf sd fsdfsd fsdf asdfsda fsddfdEND"); parameters.put("mgrNameEffDateChange_value_1", "on 21/05/2009 "); parameters.put("businessAddress", "Address of place of business"); parameters.put("businessAddr1Qn71", "Address Line 1"); parameters.put("businessAddr1Qn71_value","Address Line1 value- asdkjfasdjkfaskdj sdfsdfsdf sdfsdfsdfsdfsdfsd addressEnd"); parameters.put("businessAddr2Qn71", "Address Line 2"); parameters.put("businessAddr2Qn71_value","Address Line2 valuefgsdfgdsfg gsdfgdfdfgdfgdf,lesdfsdfsdfsdfsdfsdfsdfsdfsdf "); parameters.put("businessAddr3Qn71", "Address Line 3"); parameters.put("businessAddr3Qn71_value","Address Line 3 value-asaeadasdsad,level2 sdfasdfasdfasdfa sadfasdfasdfasdf sdfsadfasdfsadfsd sdfsdf sdfsdfsdfsdfsdfsdfsdfsd sdfsdfsdfsdEnd"); parameters.put("businessFaxQn72", "Fax number"); parameters.put("businessFaxQn72_value", "12-123123-1231231234534534534534534523452"); parameters.put("incorporationQn8", "Country of incorporation of manager"); parameters.put("incorporationQn8_value", "United States Of America"); parameters.put("isLicensedQn9", "Is the manager currently licenced or authorised to conduct fund management in the jurisdiction of its principal place of business?"); parameters.put("isLicensedQn9_value", "Yes"); parameters.put("regulatoryAuthorityQn912", "Name of regulatory authority of manager"); parameters.put("regulatoryAuthorityQn912_value", "Rugulatroy Authority Value"); //Below two missing while pagination parameters.put("licenceNumberQn92", "Please provide the licence number issued by the relevant regulatory authority"); parameters.put("licenceNumberQn92_value", "LicenceNumber-valueL23423423423423342323423423423423423423235252323423423 sdfsdfs bsf5234234234234234234234234234"); //this is partly printing parameters.put("isPublicQn911", "911Is the Manager a public company that is exempted from the requirement to hold a capital markets services licence to carry on business in fund management under paragraph 5(1)(d) of the Second Schedule of the Securities and Futures (Licensing and Conduct of Business) Regulations?"); parameters.put("isPublicQn911_value", "Yes"); JasperPrint jp =JasperFillManager.fillReport(destFilename, parameters,new JREmptyDataSource()); JasperExportManager.exportReportToPdfFile(jp, "c:\Test.pdf"); }catch(Error er){ er.printStackTrace(); }catch(Exception e) { e.printStackTrace(); } System.out.println(" report done"); } }
  3. Hi, Please find the attached xml,java file and the PDF generated.I have removed font related stuff so that it will compile.Please try adding some more data to the parameters,as the data moves down on the PDF,some other fields may disappear while paginating. Greatly appreciate your help. Thank you, Regards, Mohan Code: Post Edited by mohan kumar at 04/01/09 02:52 Post Edited by mohan kumar at 04/01/09 03:16
  4. Hi Teodor, Thanks for your reply.I am here with attaching jrxml,pdf report generated and the Java program to fill and export the report. Trying to generate PDF for a webpage(TO provide printer friendly version in PDF to avoid browser dependencies) How i am doing that? i have around 70 elements on a webpage and the height of the Detail band is not sufficient to place all elements.So I am using group header and group footer so that I can place some of our detail elements on a special group header, some of them will probably remain on the detail section, and the rest could go on the group footer.i have started placing the elemets on Group Header ,and i expected the elements to flow(isSplit=true) to the next PDF page when they are not fit in current page.But when the end of the page is reached, subsequent elements are disappearing.In the PDF report i have attached,last line of the first page is Name of regulatory authority of manager Rugulatroy Authority Value The next line to be printed as a first line of the next page is Please provide the licence number issued L1212122212121 by the relevant regulatory authority but this line is disappearing and the next line to be printed also missing some of its part.Please see the PDF and java programs attached.I have tried with isPrintWhenDetailOverflows but couldn't work.Depending on the data entered by the user for each field,last line of the page may differ but what expected is, It should flow to next page if it not fits in current page. Please advice whethere there is any other way or am i doing anything wrong. kindly ask me if you need more clarification about my problem. Thank you, Regards, Mohan Code:public class CreatePDF {public static void main(String[] args){try{String srcFileName = "D:\JasperReport\newdesign\NotificationForm.jrxml";String destFilename="D:\JasperReport\fromsvn\NotificationformPDFReport.jasper";JasperCompileManager.compileReportToFile(srcFileName,destFilename);//fill parametersparameters.put("page_title", "View Notification");parameters.put("notificationNo_label","Notification Number :");parameters.put("notificationNo_value","09L5G2B0966");parameters.put("sectionSchemeInfo", "Information on the Restricted Scheme");parameters.put("schemeNameQn1", "Name of the restricted scheme ("the scheme")");parameters.put("schemeNameQn1_value", "schemname- sdfsdfsd dfasdfasd fasdfasdfasdfasd fasdfasdf dfs fsdaf asdf sadfsdfsda sdf sdfasdf sdfsdafsad sadf sadfsadfsd asdfasd fsadfsaf sd fsdfsd fsdf asdfsda fsddfdEND");parameters.put("NameChangeTo", "changing to");parameters.put("schemeName_q1New", "schemnameNew- sdfsdfsd dfasdfasd fasdfasdfasdfasd fasdfasdf dfs fsdaf asdf sadfsdfsda sdf sdfasdf sdfsdafsad sadf sadfsadfsd asdfasd fsadfsaf sd fsdfsd fsdf asdfsda fsddfdEND");parameters.put("schemeNameEffDateChange_value_1", "on 21/05/2009 ");parameters.put("isSubFundQn2","Is the scheme a sub-fund of an umbrella fund?");parameters.put("isSubFundQn2_value","Yes");parameters.put("umbrellaFundNameQn21","State the name of the umbrella fund");parameters.put("umbrellaFundNameQn21_value", "umbrellafund-sdfasdfasdfasdfasdfasdasdfasdfsadfsadf sdfsadfasdfasfserger erwgwergwergsdfgsdf gsdfgsdfgsdfg fsdgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgdfgsdfgsdfgsdfgfdgf END");parameters.put("UmFundNameChangeTo", "changing to");parameters.put("umbrellaFundName_q2_1New", "umfundchange- sdfsdfsd dfasdfasd fasdfasdfasdfasd fasdfasdf dfs fsdaf asdf sadfsdfsda sdf sdfasdf sdfsdafsad sadf sadfsadfsd asdfasd fsadfsaf sd fsdfsd fsdf asdfsda fsddfdEND");parameters.put("umFundEffDateChange_value_1", "on 21/05/2009 ");//==========rest of the parametersparameters.put("incorporationQn8", "Country of incorporation of manager");parameters.put("incorporationQn8_value", "United States Of America");parameters.put("isLicensedQn9", "Is the manager currently licenced or authorised to conduct fund management in the jurisdiction of its principal place of business?");parameters.put("isLicensedQn9_value", "Yes");parameters.put("regulatoryAuthorityQn912", "Name of regulatory authority of manager");parameters.put("regulatoryAuthorityQn912_value", "Rugulatroy Authority Value");//problem started from hereparameters.put("licenceNumberQn92", "Please provide the licence number issued by the relevant regulatory authority");parameters.put("licenceNumberQn92_value", "LicenceNumber-valueL23423423423423342323423423423423423423235252323423423 sdfsdfs bsf5234234234234234234234234234");parameters.put("isPublicQn911", "911Is the Manager a public company that is exempted from the requirement to hold a capital markets services licence to carry on business in fund management under paragraph 5(1)(d) of the Second Schedule of the Securities and Futures (Licensing and Conduct of Business) Regulations?");parameters.put("isPublicQn911_value", "Yes");//importing fontHashMap fontMap = new HashMap(); fontMap.put(new FontKey("Times New Roman", false, false),new PdfFont("D:\JasperReport\fromsvn\fonts\times.ttf",BaseFont.IDENTITY_H,true));fontMap.put(new FontKey("Times New Roman", true, false),new PdfFont("D:\JasperReport\fromsvn\fonts\timesbd.ttf",BaseFont.IDENTITY_H,true));fontMap.put(new FontKey("Times New Roman", false, true),new PdfFont("D:\JasperReport\fromsvn\fonts\timesi.ttf",BaseFont.IDENTITY_H,true)); JRPdfExporter exporter = new JRPdfExporter(); exporter.setParameter(JRPdfExporterParameter.CHARACTER_ENCODING,"UTF-8");exporter.setParameter(JRPdfExporterParameter.FONT_MAP, fontMap);JasperPrint jp =JasperFillManager.fillReport(destFilename, parameters,new JREmptyDataSource());exporter.setParameter(JRPdfExporterParameter.JASPER_PRINT,jp); exporter.setParameter(JRPdfExporterParameter.OUTPUT_FILE_NAME,"D:\JasperReport\jasper1.pdf");exporter.exportReport(); }Catch(Exception e)}//main}
  5. Hi, Still couldn't find solution to the problem.Is there any one ever used Jasper to generate PDF for a web page.Please help.
  6. Hi, No one knows the solution to this problem.I am still searching for a solution. greatly appreciate your help
  7. Hi, i am having the same problem .i set IS_Ignore_Pagination to true. Now it is paginating. But while paginating,two lines are disappearing in every page. For example i have 60 lines in my report. line1 line2 line3 line4 ----------- line9 line10 line11 line12 -------- upto line 8 are in first page, then line9,10 are disappearing and line 11,12 are printing in second page. i set all the elements to 'float',stretch on oversize. Please advice.
  8. you can define styles using <style> tag. if you are using ireport, follow view--> format styles
  9. Hi, we are using jasper to generate PDF file for a webpage.Idea is to provide a printer friendly format for a webpage. I am using 'parameters' to generate text. Page desing is like as below (lables and values are all parameters) Label1 : value1 Label2: value2 Label3: Value3 Label4:Value4 ------------------ Label9:value9 Label10: value 10 Label11:value11 ------------------- Our problem is that, when the end of the page is reached, the next label is not printing while scrolling down to next page.For example, After Label9:value9 if it is next page, Label10:value10 is not printing/hiding but the text after that is printinng in PDF. Is there anyway to scroll down to next page without loss of data,please advice. Please find the attachement of report design.
  10. Hi, we are trying to provide PDF for a webpage.The webpage is a form filling page with around 50 to 60 questions.Like question1 : answer1 question 2: answer2 when we are designing the report using ireport, the default band height(802) for A4(595*842) is not sufficient to place all the elements. If we increase the page height(say 1500), we can able to place all the elements in the report and while generating PDF,It is showing all the elements in a single page(595*1500). and while printing on A4,the lines are being skipped. Is there any way for us to place as much as elements as we want on the jrxml file and jasper can generate a PDF with multiple pages(with excess lines scroll down to next page). or Is there any way to combine multiple jrxml files into single PDF file so that we can split the webpage data into two/three jrxml reports and jasper can generate single PDF. Please advice.
×
×
  • Create New...