I understand the issue that the fonts have to be available to the server running the D2W app. if I deploy this on a different box, then I will have to move the fonts there. I am on the development box. the fonts in question are loaded in /Library/Fonts. The display beautifully in iReport but not in the compiled .jasper report. Originally when I googled on the error message I found posts saying that the fonts needed to be exported into a .jar and be in the java classpath. Then I found posts saying that truetype fonts should just work. I don't have an answer yet. I hope it isn't that truetype works if you use an up to date version of iReport. We are really locked into using 3.7.4 We'll see where it goes. Ted
--- On Wed, 4/4/12, Paul Yu <[email protected]> wrote: From: Paul Yu <[email protected]> Subject: Re: JasperReports progress To: "Theodore Petrosky" <[email protected]> Cc: "Kieran Kelleher" <[email protected]>, [email protected] Date: Wednesday, April 4, 2012, 10:28 AM I think those fonts are what installed on the machine that is running the report. When I deployed my reports to my linux server, the reports broke because of a lack of fonts. -- Paul YuSent with Sparrow On Wednesday, April 4, 2012 at 10:24 AM, Theodore Petrosky wrote: I found the jasper version (3.7.4) and downloaded the correct iReport version and voila. I get no errors and it creates the PDF. The only issue is that the report is not using the fonts I selected. Is there something I must do to tell JR to use the fonts I selected? Ted --- On Wed, 4/4/12, Kieran Kelleher <[email protected]> wrote: From: Kieran Kelleher <[email protected]>Subject: Re: JasperReports progressTo: "Theodore Petrosky" <[email protected]>Cc: [email protected]: Wednesday, April 4, 2012, 6:56 AMSeems to me like D2W integration oflong response pages is your issue here and the d2wcontext isgetting lost. CCAjaxLongResponsePage knows nothing about D2Wfor a start, neither the nextpage controllers being usedthere. The jasper task is a background Callable task thatreturns a File result. The Jasper example project is not aD2W project. So, at this stage I have to defer to the D2Wexperts on the list for advice on integrating a backgroundtask with a File (to be downloaded result) into a D2Wscenario. The iReport MUST match the JasperReports version in thisproject. You have been warned.Look in Libraries directory of this project for the jarnamed something like jasperreports-X.X.X.jar.That file has the current version number. Currently Wonder version is at 3.7.4. It will probably staythat way for a while. Jasper has many other dependencies andthose dependencies are used across other Wonder projects.... iText for example. So it is not just a case of drop thelatest jasper and all its dependencies into Libraries. On Apr 3, 2012, at 10:48 PM, Theodore Petrosky wrote: here's what we have. in a stock D2W app there is a method in pageWrapper: public String bodyClass() { String result = null; String pageConfig =(String)d2wContext().valueForKey("pageConfiguration"); if (pageConfig != null &&pageConfig.length() > 0) { result =pageConfig + "Body"; } return result;} Obviously it is setting the css class for the context.When I return from making the jasper report pdf, thed2wcontect is null and there is the NPE. as a work around, I added to the method that checks thecontext: if (d2wContext() != null) { NSLog.out.appendln("*** pageWrapper pageConfiguration is not null = ***** "); pageConfig =(String)d2wContext().valueForKey("pageConfiguration");} I get a very ugly page. now I can figure out why thecompiled jasper report is not using any of the fonts that Iam specifying. Are there any gotchas with the different versions ofiReport and the version of Jasper Reports in wonder? Ted --- On Tue, 4/3/12, Kieran Kelleher <[email protected]>wrote: From: Kieran Kelleher <[email protected]>Subject: Re: JasperReports progressTo: "Theodore Petrosky" <[email protected]>Cc: [email protected]: Tuesday, April 3, 2012, 6:34 PMThe NPE is at: atcom.as.application.ui.components.PageWrapper.bodyClass(PageWrapper.java:27) that is your component ..... so why don't you lookthere tosee what is causing the NPE? On Apr 3, 2012, at 4:00 PM, Theodore Petroskywrote: So I've made progress but am stumped. I createdacustomcomponent and used a rule to make one of thedisplayPropertyKeys a hyperlink. I am basically using the JasperReportExample. Icreateda hyperlink as one of the property keys. this willfire offthe method that starts the jasper reports process: public WOActionResults printBrief(){ BrieftheBrief =(Brief)object(); Callable<File> reportTask =Reports.createBriefReportTask(theBrief); CCAjaxLongResponsePage nextPage =pageWithName(CCAjaxLongResponsePage.class); // Pushthe taskinto the long response page nextPage.setTask(reportTask); //Controller forhandling the Callable result in the long responsepage FileTaskDownloadController nextPageController =newFileTaskDownloadController(); //Hyperlink texton the "Your file is downloaded page" to get backhere nextPageController.setReturnLinkText("ReportsMenu"); // Thefilenamefor the download nextPageController.setDownloadFileNameForClient("BriefReport.pdf"); nextPage.setNextPageForResultController(nextPageController); NSLog.out.appendln("*** nextPage = ***** " +nextPage); returnnextPage; } Here is the Reports method: public staticCallable<File>createBriefReportTask(Brief b) { StringreportDescription = "Printed Brief"; HashMap<String, Object> parameters = newHashMap<String, Object>(); parameters.put("reportDescription",reportDescription); parameters.put("userName", "User From session"); EOQualifierqualifier = ERXQ.equals(Brief.JOB_NUMBER_KEY,b.jobNumber()); ERXFetchSpecification<Brief> fs = newERXFetchSpecification<Brief>(Brief.ENTITY_NAME,qualifier, null); ERJRFetchSpecificationReportTask reportTask = newERJRFetchSpecificationReportTask(fs,jasperCompiledReportFileName, parameters); returnreportTask; } indeed it goes out and starts to create thepdf. I seethe the pdf in/var/folders/2d/23408oihsdvh08r23/T/Brief3234987239872398472.pdf However, just when DownloadIsComplete'sappendToResponse method is called I get errors: Apr 03 15:33:34 ASBriefsD2W[57285] WARN NSLog -<com.webobjects.appserver._private.WOComponentRequestHandler>:Exception occurred while handling request:java.lang.NullPointerException[2012-4-3 15:33:34 EDT] <WorkerThread0>java.lang.NullPointerException atcom.as.application.ui.components.PageWrapper.bodyClass(PageWrapper.java:27) atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) atjava.lang.reflect.Method.invoke(Method.java:597) atcom.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636) atcom.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134) atcom.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324) atcom.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736) atcom.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447) atcom.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212) atcom.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804) atcom.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) atcom.webobjects.appserver._private.WOHTMLDynamicElement.stringValueInContext(WOHTMLDynamicElement.java:537) atcom.webobjects.appserver._private.WOHTMLDynamicElement.classInContext(WOHTMLDynamicElement.java:542) atcom.webobjects.appserver._private.WOHTMLDynamicElement._appendClassAndIdToResponse(WOHTMLDynamicElement.java:518) I can provide more but I have to startsomewhere. I don't know what else to says otherthan'HELP'!!! i'm drowning. Ted_______________________________________________Do not post admin requests to the list. Theywill beignored.Webobjects-dev mailing list ([email protected])Help/Unsubscribe/Update your Subscription:https://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com This email sent to [email protected] _______________________________________________Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list ([email protected])Help/Unsubscribe/Update your Subscription:https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com This email sent to [email protected]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
