Jump to content

mgeise

Members
  • Posts

    584
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by mgeise

  1. Yesterday, Jaspersoft announced JasperReports Server Professional Edition, our first commercial offering built precisely for those who require sophisticated reports, designed and developed professionally – and scheduled and delivered interactively. This new offering is architected to match the substantial rise in interest for affordable reporting for both stand-alone and embedded uses - in organizations of all sizes. Indeed, by engaging our community, and listening to their feedback, we designed a reporting server that could address their need for interactive reporting with security and scheduling, while providing the assurance of a commercial subscription. In addition to a robust feature set (for this reporting customer type), I am proud that we’re making this professional edition product available at a fraction of the price of any traditional competitor – delivering the most affordable and powerful reporting server available in the world today. JasperReports Server is our recommended product for organizations requiring an affordable reporting solution for interactive, operational, and production-based reporting. Deployed as a standalone reporting server or integrated inside another application, JasperReports Server is a flexible, powerful, interactive reporting environment for small or large enterprises. And, it’s powered by the world’s most popular reporting tools: JasperReports and iReport. Now, developers and users can take advantage of more interactivity, security, and scheduling of their reports with a remarkably cost-effective offering. I expect this to be the perfect complement to those who’ve been using JasperReports (and iReport) and so we’ve announced JasperReports Server Professional with a special introductory price and we’re making it very easy to learn more about this product. Here are some resources to do so: Product summary information, including a brief demonstration Product data sheet Webinar introducing JasperReports Server Professional Download a free 30-day trial version Comparison of all Jaspersoft product EditionsBecause Jaspersoft is so well-known for reporting, I’m watching the feedback and questions about this new product very closely. If you have comments or questions, I’d be eager to know. Brian Gentile Chief Executive Officer Jaspersoft
  2. I believe that, over time, Jaspersoft’s distinction will be less about it being an open source software company and more about its abilities as a great business intelligence software company. I expect declining distinction for our open source-ness will partly occur because the success of open source software and the benefit it brings the community and customers become better accepted and understood each year (and, therefore, less unique). I also believe that the most valuable aspect of the open source model will long endure, way after the sheen fades from the download, forum post or roadmap voting. That is, the principles of open source software are its most distinguishing characteristic and will eventually reach not just all technology companies, but all other industries as well. As I’ve described in many settings, the principles of open source software are Transparency, Participation and Collaboration. These principles stand, in many ways, in stark contrast to the aged, proprietary ways of doing business. I’ll briefly define and explain each of these three principles. Transparency Doing the right thing when no one is watching may be the best definition of integrity. You combine that with frankness and honesty and you have the first open source principle, Transparency. With open source software, anyone can watch. Jaspersoft software engineers and our community contributors know that every line of code they write will be made available for inspection and comment by a very large community. If they have any discomfort with transparency, they would choose a different vocation. This transparency transcends software engineering, though, to all aspects of the business. In every way possible, an open source company should be transparent; that is, frank, honest and operating with integrity. If a mistake is made – admit it, describe how you’ll make it right and move on. If an important milestone is reached that deserves celebration – announce it, enjoy the moment of pride and move on. This is the obligation an open source company maintains with its customers and community. And, those using the open source projects/products must be equally transparent through their actions and deeds. For example, the community must adhere to the terms of the particular open source license, using the software only as those terms allow, reflecting their transparency. In short, transparency is about doing what you know is right. In a community, the effects of transparency are amplified. Participation Actively giving back in a very tangible way is the heart of participation. Making the open source projects, of which each community member is part, more successful and more capable should be the common goal. Giving back can mean many things, including and especially either committing time through code contributions (for those community members with the skill and expertise) or purchasing / licensing the software if the project is in any way commercial open source. Code contributions can include not just feature advancements, but language translations, bug fixes, and quality assurance testing assistance, among others. Open source community distinction emerges because its members participate by using either their time (i.e., skill) or their money. Either is valuable and helps to make the open source project thrive. The only sin in open source is not participating. In other words, if a community member is using open source software and deriving real benefit from its existence, then participating by providing time or money should be seen as basic and reasonable reciprocity. Collaboration Collaboration is about collective engagement for the common good and is the fastest route to open source project success. If an open source project is a neighborhood, then collaboration is the barn raising. Distinguishing this from “participation”, collaboration is about helping others in the community because doing so advances the project and its usefulness for everyone. My favorite example of collaboration is knowledge sharing through forums, blogs and idea exchanges (in some circles, called ideagoras). On JasperForge, Jaspersoft’s open source community web site, there are more than 160,000 registered members who have collectively offered nearly 80,000 forum entries across all the listed top-level projects. The variety of questions and issues being addressed by and for community members within the forums is staggering. And, the vibrancy that emerges through this exchange of skill is core to large-scale community success. While forum activity remains brisk, I’m equally proud of our guided use of an idea exchange within JasperForge. Each top-level project includes a roadmap where community members can comment and vote on planned features. This not only allows many voices to be heard, but provides a valuable calibration for Jaspersoft and its community, ultimately yielding the most important product features and advancements in approximately the best priority order. There are many more examples of collaboration in action, across JasperForge and other leading open source sites, but these are some of my favorites. I talk about these three principles of open source regularly, and I’m fond of concluding that the real benefit of collaboration accrues to those who participate transparently. That’s just my clever way of mentioning all three the open source principles in one actionable sentence. What are your favorite examples of these open source principles in action? Your thoughts and comments are always welcome. Brian Gentile Chief Executive Officer Jaspersoft
  3. JasperForge is the open source community site for Jaspersoft. If you are downloading iReport from jasperforge, you are getting the open source project download which is not the same as the commercial version in that: * The community project downloads are not certified by Jaspersoft's QA team - they are tested lightly but do not go through the same rigorous testing as the commercial/pro downloads and therefore do not have the same support levels provided by Jaspersoft's technical support team. * The community project does not include certain professional features or plug-ins that work with the commercial editions of JasperServer or JasperReports, such as the domain plugin or the pro charts/widgets/maps If you have a software subscription with Jaspersoft, you should download your software packages from Jaspersoft's support portal to ensure that you are running versions that are compatible and supported by Jaspersoft Support I hope this helps.
  4. In my last post I focused on the emerging trends that will drive the next generation of data analysis. I cited four substantial shifts in both the technologies and customer uses that will be amplified in the next several years. I also mentioned that these trends and technologies are surely influencing our road map and plans at Jaspersoft. For this blog post, I’ll describe which technologies will likely fuel these changing usage patterns and some product categories that will, therefore, get a boost. Analytic Databases These are data stores that use sophisticated indexing, compression, columnar, and/or other technologies to deliver fast querying for large data sets. Increasingly, newer entrants in this category are less expensive that their enterprise data warehouse and OLTP counterparts. Although natively these databases require structured data formats, they provide a tremendous new capability to deal with large data volumes affordably and with greater processing power. When combined with a sophisticated analytic tool (such as a ROLAP engine or in-memory analysis techniques), an analytic database can deliver speed, volume, and sophisticated multi-dimensional insight – a powerful combination. For more on this product category, check out this prior post. Distributed Data Processing via Hadoop Large volumes of distributed data, typically generated through web activity and transactions, is the fastest growing data type. This data is commonly unstructured, semi-structured or complex, and holds great promise for delivering keen business insight if tapped properly. With the open source project Hadoop, and some upstart open source companies working to commercialize it, that previously untapped information capital is now ready to be unlocked. By enabling massive sets of complex data to be manipulated in parallel processes, Hadoop provides businesses a powerful new tool to perform “big data” analysis to find trends and act on data previously out-of-reach. Increasingly, big data will be a big deal and this is an important area to watch. Complex Event Processing On their own, large data volumes already create difficult analytic challenges. When that data is being created and updated rapidly (even imperceptibly to humans), a different approach to analysis is required. CEP tools monitor streaming data looking for events to help identify otherwise imperceptible patterns. I’ve referred to this technological concept elsewhere as the converse of traditional ad hoc analysis where the data persists and the queries are dynamic. With CEP, in a sense, the query persists and the data is dynamic. You can expect CEP-based, dynamic data analysis functionality to become more interesting and capable across a wider variety of uses each year. In-Memory Analysis More simple, integrated, multi-dimensional views of data should not be available only to those who spent two weeks in a special class (think ROLAP or MOLAP). They should exist alongside your favorite bar or line chart and tabular view of data. The analysis should also be constructed for you by the server, persist in memory as long as you need it (and no longer), and then get out of your way when finished. Interacting with it should be as straightforward as navigating a hyperlink report and pivot table -- although a variety of cross-tab types, charts, maps, gauges and widgets should be available for you to do so. Statistical Analysis Ever since IBM acquired SPSS, statistical modeling is cool again (since when is IBM cool, btw?). The truth is that the natural progression when analyzing past data is to project it forward. With the need to deal with larger volumes of data and at lower latency, it stands to reason that predicting future results becomes more important. This is why I believe the R revolution is here to stay (R is the open source statistical analysis tool used by many in the academic and scientific world). I predict a growing commercial need for this open source juggernaut, and by this I mean a growing demand for tools based on R with more robust features and a commercial business model – and a few software companies are delivering. Mashboards If you follow the Open Book on BI, you know I’m a big fan of mash-up dashboards. I expect these flexible, web-based constructs to deliver the most pervasive set of contextually relevant data, gaining broader use and enabling better decisions even without fancy predictive tools (although the output from a statistical model should be embeddable within a mashboard, maintaining its link back to the model and data source along with any relevant filters). Earlier this year, I wrote an article about making better, faster decisions through the clever use of mashboards. Making those good decisions is about understanding the past and recognizing current patterns, all while understanding the proper context. These relevant visual data elements should come together in a single, navigable view. Perfect for a mashboard. So, this is my short list of business intelligence product categories and technologies that stand to gain substantially in the next few years. Surely I’ve not covered them all so your comments and feedback are encouraged. Brian Gentile Chief Executive Officer Jaspersoft
  5. http://www.jaspersoft.com/images/jasper_logo.gif Jaspersoft is Hiring Customer Success Operations ManagerWork along side the engineers and architects of JasperReports, iReport, and JasperServerJaspersoft is looking for a motivated, resourceful, and solution focused engineer to help our customers acheive a high level of success and satisfaction with our products. This is a highly technical position requiring hands-on trouble shooting, customer guidance, and example building and an excellent way to really expand your knowledge of the most widely deployed BI software on the planet. SummaryThis is a customer/partner focused, hands-on technical support operations leadership position. This individual is involved in the day to day management of the Customer Success and Support processes – including: Management of customer escalations and targeted satisfaction efforts Representing our customers in Cross-departmental efforts to implement services and tools to drive customer success Developing, implementing, and measuring processes and tools to drive Customer Success team efficiency and effectivenessAs a leading open source software company, Jaspersoft relies on customer support excellence. This individual will work with others across the organization to innovate and break the boundaries of traditional “support” to develop a leading model for customer success. LocationJaspersoft Headquarters, San Francisco, CA, USA Essential Functions Participate in direct customer success management through: Customer escalation management Technical Account Management/Customer Success Management services Occasional Customer Support in a back-up/overflow capacity Occasional on-call weekend/holiday support coverage for support of severity 1 customer issues Hands-on development/implementation of Customer Success tools and workflow changes, including: Requirements definition, specification, hands-on development and testing, and documentation Salesforce.com workflow, field, and object customizations Customer Success Portal technologies such as search, document delivery/access, knowledge base content management, case management, wikis, blogs, and forums Customer Survey Tools Manage process and technology improvement projects including: Identifying and recommending process and technology changes Provide sufficient status to management on schedules, risks, roadblocks and dependencies Coordinating with product management, publications, development and quality assurance teams to implement enhancements to ensure customer success Measure process and team success through the development of critical metrics and establishment of goals Training and mentoring Customer Success staff Secondary Functions Provide architectural direction for customer facing systems implementation Conduct vendor evaluations and facilitate buy vs. build decisions Occasional contribution to documentation and product quality reviews Knowledge, Skills & Abilities Proven track record of defining and implementing successful technical support processes and tools 3 - 5 years technical experience with web-based enterprise business applications, J2EE technologies, and Operating systems such as Windows/Linux/Unix/AIX etc. 3+ years experience working directly with customers in a support or professional services capacity 2+ years of project lead/management experience Experience implementing workflows and processes within Salesforce.com 1+ years experience driving technical and geographically distributed teams Experience with the configuration of various J2EE application servers as well as relational database management systems a strong plus Experience deploying BI related software and building reports within BI related software a strong plus Experience with Web 2.0 collaboration and knowledge management tools and capabilities a plus Experience and understanding of Enterprise customer requirements, considerations, and limitations a plus Supervisory responsibilities Supervisory responsibilities of a global customer success engineering team Expected to act as a technical project and process improvement lead Success Factors Resourceful, fast learner Excellent problem determination and solving skills Excellent communication (verbal and written) and customer management skills Highly motivated, independent thinker with a drive to try and achieve new and great things and contribute to company success through the success of our customers Team player with the ability to work independently Ability to multi-task, effectively switch gears, and stay abreast of multiple issues, actions, and time-critical tasks. Detail oriented Self-starterIf Interested:Please email your resume to jobs@jaspersoft.com. Post Edited by mgeise at 03/23/2010 04:24 PM
  6. On April 8, 2010, Jaspersoft released a critical hotfix for JasperReports Server v3.7.0.0 and v3.7.0.1. This article covers some questions that you may have with respect to this critical patch. We uncovered an issue with JasperReports Server v3.7.0.0 and v3.7.0.1 releases where, under certain circumstances, filters defined within a domain may not be correctly applied to a report. While many of our customers do not use this type of filter to limit access to sensitive data, there may be customers that do. For this reason, Jaspersoft is taking the proactive approach of pushing out this hotfix to all customers. More information about the specifics of these issues are outlined below. What Jaspersoft product(s) and version(s) do these issue impact?These issues impact only the JasperReports Server Professional and Enterprise versions 3.7.0.0 and 3.7.0.1. They DO NOT impact the iReport Designer, JasperReports Library, or Jaspersoft ETL products or JasperReports Server version v3.5.1 and earlier. Under what scenario might I see these issues?The primary issue is seen only with domains that are created or modified within JasperReports Server 3.7.0.x that have multiple filters that correspond to fields across multiple tables. In this scenario, only the filter(s) from one of the tables may be properly applied to the joined table set, resulting in reports based on the domain behaving as if the filter(s) from the other table(s) did not exist. The secondary issue is seen only with domains that use specific groovy expressions in security file filters. The most common symptom seen has been an exception being thrown, however we are including this in the patch as there may be limited scenarios that expose data. Should I be concerned about domains that I created with previous versions of Jasperoft, or does this only impact new domains created since I upgraded?The primary issue will only affect domains that are created or modified using JasperReports Server v3.7.0.x. If you have domains that you created in prior versions and have not modified since upgrading to 3.7.0.x, they should continue to work as expected with respect to this issue. The secondary issue results in a failure of domains created in v3.5.x once upgraded to v3.7. What does the hotfix do to remedy these issues?The hotfix addresses the primary issue by correcting the way the domain designer applies filters at design time, ensuring that the combination of filters are properly applied to the joined dataset. The secondary issue is resolved by changing the default behavior to apply security filters in the SQL rather than in memory, falling back to the method employed in v3.5. Does the hotfix correct domains that may already be impacted by these issues?With respect to the primary issue, this fix will not correct domains that were created or modified in the v3.7.0.x domain designer prior to the patch. It is recommended that you review the domains that have been created or modified since you upgraded to ensure that the filters are properly applied and resave them. Behavior of all domains will be corrected with respect to the secondary issue and therefore no additional steps are required to resolve this issue. If I fix the domains, do I also have to change all of the topics and reports that use it?No, so long as you do not remove fields from the domain that the topics or reports depend upon, it should not be necessary to update the topics or reports. The topics and reports will operate against the most current domain. Where can I find the hotfix?Separate hotfixes have been posted to the Jaspersoft support portal (http://support.jaspersoft.com) for customers running 3.7.0.0 and 3.7.0.1. Please see the download page for the version of JasperReports Server that you are patching. What if I have customized my JasperReports Server Implementation? Can I get the source code for the hotfix so that I can apply it with my customizations?Yes, a source overlay as well as a binary overlay will be posted for each of the affected JasperReports Server versions. If you have customizations, this will allow you to identify the specific files impacted as well as the changes made based on a comparison of the same file(s) shipped with the original release. How do I apply the hotfix?Each of the hotfix packages includes a readme.txt file with instructions on how to apply the fix.
  7. [中文版本] The following is some basic guidance on how to add a custom palette item in iReport Designer. Note:This article was written for the iReport Designer v3.5.x and above - it is possible that this will work as far back as iReport 3.1 which is the first version based on the NetBeans platform. StepsCreate a NetBeans Plug-inCreate a new plugin in NetBeans with a dependency to the ireport-designer module Create the Palette Action codeCreate the Java class with the appropriate action to associate with your palette item - i.e. DoSomethingAction. Note: DoSomethingAction must extend PaletteItemAction (but there are many advanced implementations to create elements, so you can for instance extend CreateReportElementsAction which already extends PaletteItemAction). All depends by what you need to do. Create an iReport Item fileCreate an .irpitem file (i.e. my_item.irpitem) with the following content: name=My Itemtooltip=My Itemicon16=my/palette/item/icon-16.pngicon32=my/palette/item/icon-32.pngaction=my.palette.item.DoSomethingAction[/code]Modify the Layer.xml file to include your Palette ItemFinally, in the layer.xml of the module, you need to add this piece of xml: <folder name="ireport"> <folder name="palette"> <folder name="ReportElements"> <file name="my_item.irpitem" url="my_item.irpitem" /> </folder> </folder></folder>[/code]
  8. RequirementBoth standard and Ad Hoc reports can be used to produce long lists of data which could be exported to excel or csv for further processing. The html presentation of the data should be layout oriented. Requirements for a data oriented output are: no split cells no merged cells (excel can't sort accross cells) no repeating header and footer no export of the title bandThis you can achieve without changing the JasperReports Server source code. It can be solved by applying a few changes to these files: state2jrxml.js which creates a JRXML out of the ad hoc configuration optionally jasperreports.properties which contains global settings for the JasperReports configuration best practices for report developmentThe state2jrxml changes were applied in JasperReports Server 3.1. The file changed in newer versions so be careful when applying the changes. Where to find the filesIn the JasperReports Server application directory navigate to WEB-INFclassesjasperreports.properties and WEB-INFadhocstate2jrxml.js. Optimizing Standard Reports- columns don't overlap page width (design) - detail band property isSplitAllowed="false" - add for text fields the property stretchType="RelativeToTallestObject" You would also need to add all the custom properties mentioned above. (Optional) Setting Data Export Options GloballyIf you want to set the data oriented output by default you can achieve this by changing the JasperReports settings in JasperReports Server. Therefore you would add these settings to the jasperreports.properties files in WEB-INFclasses net.sf.jasperreports.export.xls.exclude.origin.band.1=title net.sf.jasperreports.export.xls.exclude.origin.band.2=summary net.sf.jasperreports.export.xls.exclude.origin.band.3=pageHeader net.sf.jasperreports.export.xls.exclude.origin.band.4=pageFooter net.sf.jasperreports.export.xls.collapse.row.span=false net.sf.jasperreports.export.xls.remove.empty.space.between.columns=true As custom property on report level (both for ad hoc and for standard reports) you need to set: <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.name" value="columnHeader"/> Configuring Ad Hoc ReportsAvoiding Split Cells In ExcelBy default an ad hoc report is set to A4 or Letter format (portrait or landscape). If the column width exceeds the page width a split of the column which overlapped happens. To avoid this I changed the page width to the width of the content plus the margins. @@ -125,7 +125,7 @@ function getReport(state) { columnCount="1" printOrder="Vertical" orientation={ state.pageOrientation } - pageWidth={ state.pageWidth } + pageWidth={ contentWidth + state.horizontalMargin + state.horizontalMargin } pageHeight={ state.pageHeight } columnWidth={state.getContentWidth()} columnSpacing="0" Another split is caused because of the word "Totals" in the summary band. This gets generated as soon as a sum function is added to the report. The easiest way to solve it is simply removing the text filed from the summary band. @@ -699,25 +708,11 @@ function addTablesSummaries(report, state) { key="frame-3"> <property name="net.sf.jasperreports.export.pdf.tag.tr" value="full"/> </reportElement> - <staticText> - <reportElement - style="TableSummaries" - x={GROUP_INDENT} - y="0" - width={totalLabelWidth} - height={standardHeaderBandHeight} - key="staticText-1" - stretchType="RelativeToBandHeight"> - <property name="net.sf.jasperreports.export.pdf.tag.td" value="full"/> - </reportElement> - <text>Totals:</text> - </staticText> {summaries} </frame> </band> </summary>; //summaryBand.band.frame.reportElement += invisibox(); - summaryBand.band.frame.staticText.reportElement += invisibox(); report.appendChild(summaryBand); } Another split can be caused when a column is affected by a page break. Avoid this to set the detail band property isSplitAllowed to false. Avoiding Merged Cells In ExcelThere are a couple of merged cells: header and footer bands, summary, title etc. Also there is a merge if a cell value contains line breaks which happens e. g. when the cell length is less then the content length. To avoid this simply set the stretchType for the detail fields. @@ -613,6 +621,7 @@ function getDetailField(x, column) { y="0" width={column.getWidth()} height={DETAIL_BAND_HEIGHT} + stretchType="RelativeToTallestObject" key="textField"> <property name="net.sf.jasperreports.export.pdf.tag.td" value="full"/> </reportElement> General Settings For CSV And Excel ExportI've added custom properties which configure the behaviour of certain bands while exporting. @@ -149,10 +149,18 @@ function getAdHocProperties(state) var props = <property name="com.jaspersoft.ji.adhoc" value="1"/>; props += <property name="net.sf.jasperreports.export.pdf.tagged" value="true"/>; props += <property name="net.sf.jasperreports.export.pdf.tag.language" value="EN-US"/>; - if (state.printsChart()) { - props += <property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/> - props += <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="false"/> - } + props += <property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="title"/> + props += <property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="summary"/> + props += <property name="net.sf.jasperreports.export.xls.exclude.origin.band.3" value="pageHeader"/> + props += <property name="net.sf.jasperreports.export.xls.exclude.origin.band.4" value="pageFooter"/> + props += <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1" value="columnHeader"/> + props += <property name="net.sf.jasperreports.export.xls.collapse.row.span" value="false"/> + props += <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/> + props += <property name="net.sf.jasperreports.export.csv.exclude.origin.band.csvSummary" value="summary"/> + props += <property name="net.sf.jasperreports.export.csv.exclude.origin.band.1" value="title"/> + props += <property name="net.sf.jasperreports.export.csv.exclude.origin.band.2" value="pageFooter"/> + props += <property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.1" value="columnHeader"/> + return props; } Further Reading The JasperReports Configuration Reference available here The JasperReports Ultimate Guide, Element Properties
  9. This guide is based on a business case from Defining a Domain Security File. How-to insert a profile attribute (deprecated)UPDATE: This section is only relevant to JasperReports Server v4.7 and below. Starting with JasperReports Server v5.0+ the profile attributes can be added from the Manage User page (see online Documentation Section on editting user profile attributes) in the Server UI while logged in with an admin account (jasperamdin or superuser). There is no need to add these are the database level. A profile attribute is a name-value pair defined at the user or role level; in this example, it is set on the user and corresponds to value in the data returned by the Domain. Retrieve the User IDs in the RepositoryLaunch your SQL client (depending on your database).Launch the following SQL queries to retrieve Jasper and Repsaj IDs:SELECT * FROM jiuserrole WHERE roleId = (SELECT id FROM jirole WHERE rolename = "ROLE_MYDOMAIN_STORE_MANAGER") AND userId = (SELECT id FROM jiuser WHERE username = "jasper");SELECT * FROM jiuserrole WHERE roleId = (SELECT id FROM jirole WHERE rolename = "ROLE_MYDOMAIN_STORE_MANAGER") AND userId = (SELECT id FROM jiuser WHERE username = "repsaj");[/code]Jasper user ID is 42. Repsaj user ID is 43. Inserting Attributes into Profile Attribute TableLaunch the following SQL queries to insert Jasper and Repsaj profile attribute: INSERT INTO jiprofileattribute (attrName,attrValue,principalobjectclass,principalobjectid) VALUES ("Cities","Los Angeles", "com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoUser",42);INSERT INTO jiprofileattribute (attrName,attrValue,principalobjectclass,principalobjectid) VALUES ("Cities","San Diego", "com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoUser",43); [/code]Note: after inserting attributes, go to JasperServer, Manage > Users. You can see the new profile attributes for Jasper and Repsaj. Creating a Security FileOpen your XML editor (eg: notepad++ or XMLBuddy) and create a new XML file. Add the following lines and save your document: <securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted"> <resourceAccessGrants> <resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1"> <resourceAccessGrants> <resourceAccessGrant id="Jointree_1_row_access_grant_1"> <principalExpression> <!CDATA[authentication.getPrincipal().getAttributes().any{ it.getAttrName() in ['Cities']]]> </principalExpression> <filterExpression> store.store_city in (groovy( 'authentication.getPrincipal().getAttributes().find{ it.attrName == "Cities" } .attrValue.split(",").collect {"<em>" + it + "</em>"} .join(",").replaceFirst("^<em>","").replaceFirst("</em>$","")' )) </filterExpression> </resourceAccessGrant> </resourceAccessGrants> </resourceAccessGrantList> </resourceAccessGrants></securityDefinition>[/code]Applying a Security FileAs the Repository Administrator (eg: jasperadmin), log into JasperReports Server.On the Home page, click View > Repository.In the Repository manager, select the Domains folder, select your domain and click the Edit icon. Click on RESOURCES section and click on Add Security.In Local File tab, click on Browse to specify your security file path. Then do OK and Save. TestLet's create a basic report to test the row-level security rules. As the Repository Administrator, click on Create > Ad Hoc Report. In Domains tab, select your domain, and on the right select Table as the report type. In Choose Ad Hoc Data, drag employee and store items and drop them on your right in Selected Items frame. Then do Done. Create your report as below then save it in the Repository. Run the new report as jasperadmin. You will notice the report displays stores' information from all location. Run the new report as Jasper user. The report only displays stores' information related to Los Angeles. Run the new report as Repsaj user. The report only displays stores' information related to San Diego. (Optional) Multiple values for Profile AttributesA profile attribute can contain multiple values, separated by commas. See the below example for Jasper user: INSERT INTO jiprofileattribute (attrName,attrValue,principalobjectclass,principalobjectid) VALUES ("Cities","Los Angeles,Alameda,Acapulco","com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoUser",42);[/code](Optional) Modifying Profile AttributesHere is the SQL query to modify a profile attribute. This example is for Jasper user: UPDATE jiprofileattribute SET attrValue = "Los Angeles,Alameda,Acapulco" WHERE attrName = "Cities" AND principalobjectid = 42;[/code]Run the new report as Jasper user. Now the report displays stores' information related to Los Angeles, Alameda and Acapulco. NotesA Profile Atribute value is not case-sensitive(eg: SAn FrAnCisco).More ExamplesSee Basic Domain Security File Examples.See also...Defining a Domain Security FileSetting up Column-Level Security
  10. Categorization in JRXML<columngroup height="20" name="country" totalposition="End"> <bucket> <bucketexpression class="java.lang.String"> $F{country} </bucketexpression> </bucket>...</columngroup>[/code]Each different value of the country field will show up in a new column. If you want to group various values together (for example, dates or number ranges), the expression must be defined such that values going in the same bucket result in the same bucket expression value. The following example groups numbers by ranges of 100: <columngroup height="20" name="FreightColumn" totalposition="End"> <bucket> <bucketexpression class="java.lang.Integer"> new Integer($F{Freight}.intValue()/100) </bucketexpression> </bucket> ...</columngroup>[/code]Once this is done, you need to define text field expressions and formatting for all the combinations of header and detail cells. Categorization in Ad HocAd Hoc takes care of all the JRXML needed to define column and row groups. It has a framework which you can use to modify the options available under the "Change grouping" group menu option. These options are defined a Spring configuration file called "applicationContext-adhoc.xml" under the WEB-INF directory of the JasperServer Pro webapp. The bean defining the categorization options is called categorizerFactory. Here is the default definition for this bean: <property name="categorizerFactory"> <bean class="com.jaspersoft.commons.dimengine.CategorizerFactory"> <property name="typeMap"> <map> <entry key="null"> <list> <bean class="com.jaspersoft.commons.dimengine.NullCategorizer" /> </list> </entry> <entry key="NaN"> <list> <bean class="com.jaspersoft.commons.dimengine.DefaultCategorizer"> <property name="name" value="all" /> <property name="label" value="ADH_230_CAT_all" /> </bean> </list> </entry> <entry key="int"> <list> <bean class="com.jaspersoft.commons.dimengine.DefaultCategorizer"> <property name="name" value="all" /> <property name="label" value="ADH_230_CAT_all" /> </bean> </list> </entry> <entry key="dec"> <list> <bean class="com.jaspersoft.commons.dimengine.DefaultCategorizer"> <property name="name" value="all" /> <property name="label" value="ADH_230_CAT_all" /> </bean> </list> </entry> <entry key="date"> <list> <bean class="com.jaspersoft.commons.dimengine.YearCategorizer"> <property name="name" value="year" /> <property name="label" value="ADH_230_CAT_year" /> </bean> <bean class="com.jaspersoft.commons.dimengine.YearQuarterCategorizer"> <property name="name" value="quarter" /> <property name="label" value="ADH_230_CAT_quarter" /> <property name="default" value="true" /> </bean> <bean class="com.jaspersoft.commons.dimengine.YearMonthCategorizer"> <property name="name" value="month" /> <property name="label" value="ADH_230_CAT_month" /> </bean> </list> </entry> </map> </property> </bean></property>[/code]The keys in the typeMap property correspond to groups of types: null: special case used only when no groups are definedint: all integral typesjava.lang.Bytejava.lang.Shortjava.lang.Integerjava.lang.Longjava.lang.BigIntegerdec: all floating point typesjava.lang.Floatjava.lang.Decimaljava.lang.Numberjava.lang.BigDecimaldate: date typesjava.util.Datejava.sql.Datejava.sql.Timejava.sql.TimestampNaNjava.lang.Stringanything else not included in other groupsConfiguring a predefined categorizerEach bean in one of the lists in typeMap is a subclass of com.jaspersoft.commons.dimengine.Categorizer. If there is only one bean in a list, it's used all the time, and there won't be a "Change grouping" menu item shown. If there are more than one, clicking on the Change Grouping menu will show all the listed categorizers. Some of the common properties used in configuring categorizers are below: name: A name used to refer to the categorizer internally. It just needs to be different for each categorizer in a listlabel: This refers to a message defined in the message catalog /WEB-INF/bundles/adhoc_messages.properties which is used to represent the grouping option in the menu.default: If set to true, this will be used as the default grouping choice
  11. Set your page width to be larger...crosstabs automatically break at the page margins. Since the number of dimensions is unknown until run time, you may continue to run into this if you get more and more dimensions.
  12. Looks like your database is missing some quartz tables. You probably want to go back through the install guide and make sure you ran all of the steps to set up the database.
  13. If you don't want to buy the documentation, I would recommend taking a look at the wiki pages under the iReport documentation. The community contributes tutorials, etc. here.
  14. Addressed NeedIn cases where a report is defined with several groups, you may want to split those groups out to different tabs in an excel spreadsheet. Related PropertiesThere are 2 custom element properties available in JasperReports in order to support this kind of requirement: net.sf.jasperreports.export.xls.break.before.row net.sf.jasperreports.export.xls.break.after.row [toc]net.sf.jasperreports.export.xls.break.before.rowIf net.sf.jasperreports.export.xls.break.before.row is true for a given element, then the generated sheet will break before the row displaying that element. net.sf.jasperreports.export.xls.break.after.rowIf net.sf.jasperreports.export.xls.break.after.row is true, the sheet will break after the row containing the element. Possible SolutionsIf one needs to have each group in a separate sheet, depending on report specific design requirements, there are 3 possibilities: In the first <reportelement> contained in the group header set the net.sf.jasperreports.export.xls.break.before.row property as below: <property name="net.sf.jasperreports.export.xls.break.before.row" value="true" /> In the last contained in the group footer set the net.sf.jasperreports.export.xls.break.after.row property as below: <property name="net.sf.jasperreports.export.xls.break.after.row" value="true" /> Execute both 1) and 2) steps above
  15. If you are getting the following error messages: Error instantiating extensions registry for fcharts org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from URL [jar:file:/c:/jasperserver-pro-3.1/apache-tomcat/webapps/jasperserver-pro/WEB-INF/lib/jasperreports-ofc-component-0.0.2.1.jar!/com/jaspersoft/sample/ofc/chart_beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'. Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) .......... The error is caused by the Open Flash Chart POC JasperReports component jar. The error is not blocking as JasperReports logs it and then simply ignores the extensions in the jar. To workaround this, you simply delete the jasperreports-ofc-component-0.0.2.1.jar from WEB-INF/lib as this jar is only required to execute the OFC sample report.
  16. ResumenEste artículo proporciona consejos para la resolución de problemas relacionados con la recepción de un error Se encontraron errores al compilar expresiones de informe error / excepción de archivo de clase . Al crear informes en iReport Designer, puede experimentar un error: Se encontraron errores al compilar el archivo de clase de expresiones de informe. Esto suele ser causado por un campo de texto sin comillas, una expresión no válida en printWhenExpression, etc. Este mensaje de error es más común con las expresiones basadas en Groovy ya que los mensajes de error pueden no ser tan claros como con las expresiones basadas en Java. Síntomas:Los errores recibidos en iReport pueden tener el siguiente aspecto: Excepciones de compilación: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@7f3ccc net.sf.jasperreports.engine.JRException: Se encontraron errores al compilar el archivo de clase de expresiones de informe: org.codehaus.groovy.control.MultipleCompilationErrorsException: falló el inicio, calculator_report3_1250582718895_776003: 157: token inesperado: Report @ line 157, column 41.1 error en net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits (JRGroovyCompiler.java:92) en net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport (JRAbstractCompiler.javaports:192) en net.sf.Compiler.javaports:192 .compileReport (JasperCompileManager.java:219) en net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile (JasperCompileManager.java:135) en com.jaspersoft.ireport.designer.compiler.IReportCompiler.run (IReportCompiler.java:516) a org.openide.util.RequestProcessor $ Task.run (RequestProcessor.java:561) en org.openide.util.RequestProcessor $ Processor.run (RequestProcessor.java:986) Causas:Campos de texto a los que les faltan comillas, es decir, ""PrintWhenExpression que no es válido y no se evalúa como un booleanoResoluciones:Busque y corrija la expresión ofensiva que no es válida.
  17. Note: This article is based on the JasperServer Professional 3.5.x installation package. In some cases, you may find that there are database connection parameters that you would like to add to your connection string that are not yet supported by the WAR file install scripts (buildomatic). This article covers some basic information that may assist in making modifications to enable additional database connection string settings within the buildomatic installation process. Finding the Database Connection String TemplateThe JasperServer Professional WAR file installation package contains some database specific template files. For example, for oracle, you will find the following file: buildomatic/conf_source/db/oracle/db.template.properties Within this file, you will find connection string templates like the following: admin.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}:${sid} js.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}:${sid} sugarcrm.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}:${sid} foodmart.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}:${sid} Making ModificationsIf you find that there are parameters that are not supported by the default_master.properties file for your database, you may be able to do the following: Modify the buildomatic/conf_source/db//db.template.properties file to hard code the additional values into the connection string cd js-install/buildomatic Run js-ant clean-config Run js-ant gen-config Look in js-install/buildomatic/build_conf/default/db.template.properties to confirm that the properties are there.After following these steps, you should be able to continue with the buildomatic installation.
  18. Installation using the WAR File Distribution Please see the JasperServer Professional Installation Guide for the steps to install the WAR File Distribution for specific environment combinations. Understanding the Installation Process Jaspersoft has created a series of scripts to assist in the automation of installation and configuration of the WAR file and installation into the Application Server as well as the creation and initial population of the JasperServer repository. The installation consists primarily of the following steps: Unpack the WAR file Distribution Zip file. Keep the root path short, extract all files from the WAR Distribution Zip File Into a separate folder. Configuration of environment properties for use by the configuration and installation scripts DB Information Application Server Information Create Repository Database Initialize the Database objects Import initial repository information (default users, etc.) Deploy Web Application Install the License File Start the Server Performing Installation Steps Manually Note: This information is based on the 9.0 installation package. The following is an example of some available scripts and steps that may help you should you need to separate installation responsibilities between a system administrator and a database administrator: Performing Installation Steps Manually: A. Buildomatic Steps: You need to install the WAR file manually when you cannot use the js-install scripts. The manual buildomatic steps described in this procedure execute the same Ant targets as the js-install script (js-install.sh/.bat). The procedure shows which buildomatic targets to run manually if you are unable to use the js-install scripts. To install the WAR file distribution using manual buildomatic steps 1. Start your database server. 2. Stop your application server. 3. Create and edit a default_master.properties file to add the settings in for your database and application server as described in Installing the WAR File Using js-install Scripts. 4. Open a Command Prompt as Administrator on Windows or open a terminal window on Linux or Mac. Run the following commands. Buildomatic Targets to Execute to Install the WAR File Commands Description Makes the buildomatic directory your current directory. cd <js-install>/buildomatic Creates the JasperReports Server repository database. js-ant create-js-db (Optional) Creates the sample databases. js-ant create-sugarcrm-db js-ant create-foodmart-db (Optional) Loads sample data into the sample databases. js-ant load-sugarcrm-db js-ant load-foodmart-db (Optional) Initializes the sample databases js-ant update-foodmart-db Initializes the jasperserver database, loads core application data. Running js-ant import-minimal-pro is mandatory. The server needs this data to function. js-ant init-js-db-pro js-ant import-minimal-pro (Optional) Loads the demos that use the sample data. js-ant import-sample-data-pro Configures and deploys the WAR file to Tomcat or JBoss. js-ant deploy-webapp-pro Deploys only JasperReports Web Studio apps into the application server configured using the appServerDir, jrws.repo.url and jrws.jrio.url properties in the default_master.properties file. js-ant deploy-jrws js-ant create-audit-db (Optional) Creates the audit database. Required only for the Split installation. js-ant init-audit-db-pro (Optional) Initializes the audit database. Required only for the Split installation. B: Manually Creating the JasperReports Server Database If you can’t use the js-install scripts to create the JasperReports Server database and the sample databases, you can create them manually. Follow the instructions for your database to create the repository database and optional sample databases: Please refer the documentation section for it: https://community.jaspersoft.com/documentation/jasperreports-server/tibco-jasperreports-server-installation-guide/v900/jrs-install-guide-_-manual-db-_-manually_creating_the_jasperreports_/#additional_646152231_1159858
  19. This article covers how you can disable certain frequency options within the report scheduling page within JasperReports Server. For scalability reasons, you may want to keep your users from scheduling reports at a fast frequency. The frequency options are currently managed within the Java code within JasperServer. The recommended approach would be to modify the reportJobTrigger.jsp to either test the values being added to the input by addiing a <c:if...> type scriptlet tag to pull out those values you do not want or, since they come in a particular order, you may be able to set an index in the <c:forEach... tag to eliminate the first few options, for example.
  20. Some customers may wish to disable the ability of their users to attach report output to the email notifications that come out of the execution of scheduled reports. While this is not specifically supported, it is possible to make a simple change to the code to do this. The "attach files" checkbox is in the following file: : jasperserver-pro/WEB-INF/jsp/reportScheduling/reportJobOutput.jsp Making the following change here should remove the checkbox from the user interface: comment out the attach file labelchange the attach file input type from "checkbox" to "hidden"<!-- <spring:message code="report.scheduling.job.edit.email.label.attachFiles" /> --><input type="hidden" name="${status.expression}" value="${status.value}" /><input type="hidden" name="attachFilesCheckbox" <c:if test="${status.value == 2}">checked</c:if> class="fnormal" onclick="document.fmEditJob['${status.expression}'].value = this.checked ? 2 : 1" />[/code]
  21. This article assumes that you've already implemented a custom query executor and you only need to add it to JasperReports Server. Adding JRQueryExecuterFactoryTo add a custom JRQueryExecuterFactory to JasperReports Server all you have to do is add it into jasperreports.properties file under the /Jasperserver-pro/WEB-INF/classes/ folder as follows: net.sf.jasperreports.query.executer.factory.sql= com.jaspersoft.commons.util.JSControlledJdbcQueryExecuterFactory where last part of the key - sql - is a language your executer is going to understand.
  22. SummaryNullPointerException while running multiple reports thru the report scheduler in JasperReports Server. Failure appears random but occurs most commonly on heavily loaded multi-processor machines. SymptomThe error stack is as the following: [toc]Job: 422797 (ID: 2865)Report unit: /SampleNameQuartz Job: ReportJobs.job_2865Quartz Trigger: ReportJobs.trigger_2863_0Exceptions:An error occurred while executing the report.java.lang.NullPointerExceptionat sun.font.GlyphLayout$EngineRecord.init(GlyphLayout.java:565)at sun.font.GlyphLayout.nextEngineRecord(GlyphLayout.java:439)at sun.font.GlyphLayout.layout(GlyphLayout.java:362)at sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:267)at sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:252)at sun.font.ExtendedTextSourceLabel.createLogicalBounds(ExtendedTextSourceLabel.java:163)at sun.font.ExtendedTextSourceLabel.getAdvance(ExtendedTextSourceLabel.java:85)at java.awt.font.TextLine.init(TextLine.java:245)at java.awt.font.TextLine.(TextLine.java:99)at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:467)at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:598)at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:427)at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:395)at net.sf.jasperreports.engine.fill.TextMeasurer.renderNextLine(TextMeasurer.java:505)at net.sf.jasperreports.engine.fill.TextMeasurer.renderParagraph(TextMeasurer.java:338)at net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:291)at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:987)at net.sf.jasperreports.engine.fill.JRFillTextField.prepare(JRFillTextField.java:528)at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:344)at net.sf.jasperreports.engine.fill.JRFillFrame.prepare(JRFillFrame.java:215)at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:344)at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:346)at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:305)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1382)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:692)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:275)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:879)at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:123)at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:420)at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:661)at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:356)at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:788)at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:60)at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:288)at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeReport(ReportExecutionJob.java:441)at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.executeReport(ReportOptionsExecutionJob.java:103)at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:369)at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:188)at org.quartz.core.JobRunShell.run(JobRunShell.java:195)at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)[/code]CauseThis issue appears to be caused by a multithreading bug in the Sun AWT code. See the following: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6367148 The issue appears most commonly in very active multi-processor environments. ResolutionJaspersoft has implemented a workaround to the Sun AWT defect by reattempting the failed action. The fix consists of a custom text measurer that catches NPEs thrown by the JDK GlyphLayout class, and reattempts to measure the text field. The fix is external to JasperReports (note still that JR >= 2.0.3 is required). You may need to add the following line to jasperreports.properties file under WEB-INF/classes sub directory to make the code work: net.sf.jasperreports.text.measurer.factory=net.sf.jasperreports.engine.util.JdkGlyphFixTextMeasurerFactory[/code]The custom text measurer is itself configurable via the following JR properties: net.sf.jasperreports.jdk.glyph.fix.text.measurer.attempts - gives the number of attempts to measure a text before giving up; the default value is 20 (which should be enough given that my test never went beyond 2 attempts).net.sf.jasperreports.jdk.glyph.fix.text.measurer.sleep - the number of milliseconds to sleep between attempts; the default value is 0, i.e. no sleep (according to my tests, no sleep is actually required).net.sf.jasperreports.jdk.glyph.fix.text.measurer.catch.empty.stakctrace - specifies whether NPEs with no stacktrace should be considered as GlyphLayout exceptions or not. This last property is meant to address the fact that the Sun server VM might omit the stacktrace from NPEs thrown from GlyphLayout, which makes it impossible to determine whether en exception was actually thrown from GlyphLayout or not. If using a server VM (java -server), this property should be set to true, or the -XX:-OmitStackTraceInFastThrow VM options should be used to force the VM to always set exception stacktraces (more details at http://java.sun.com/j2se/1.5.0/relnotes.html#hotspot).
  23. ObjectiveOn this page you could find interesting expressions to create formulas for calculated fields in domains. Hope this could be populated by many good and useful formulas. How to insert a formula for a calculated fieldStop JasperReports ServerEdit applicationContext-semanticLayer.xml (could be found in jasperserver-proWEB-INF)Find the SQLGenerator that matches the database engine used by the domain. For MySQL locate this line: <bean class="com.jaspersoft.commons.semantic.dsimpl.SQLGenerator" id="defaultSQLGenerator" scope="prototype"> Then add your expression formula in this bean : it should be represented like this : <entry key="MagicFunction"> <value> "your expression" </value> <!-- Note :use sqlArgs[0] for first value in your formula, then sqlArgs[1] for the second and so ... --> </entry> The expression formulasConditions : commission calulation MySQL<value> "IF(" + sqlArgs[0] + " > 100," + sqlArgs[1] + "*1.33," + sqlArgs[1] + "*0.66)" </value> Dates : Differences between dates MySQL<value> "datediff('" + sqlArgs[0].value + "','" + sqlArgs[1].value + "')" </value>UNIXTIME : Convert unix times to timestamps MySQL<value> "FROM_UNIXTIME(" + sqlArgs[0] + ")" </value>save and restart serverNow, in domains, create a calculated field using your fomula, MagicFunction(field1,field2...)See AlsoSection 8.2 of the JasperReports Server User Guide for a more concise description of DomEL
  24. [toc on_off::hide=0] When you schedule a recurring job to run a report, you can now specify the timestamp pattern in the filename. To do so, create a new scheduled job and enter the following information on the Output page: Select the Sequential File Names checkbox.Enter a valid pattern in the Timestamp pattern field.The timestamp pattern is the same as java.text.SimpleDateFormat. However, not all SimpleDateFormat patterns are accepted since this pattern is used to make up a JS resource name, so it cannot contain arbitrary characters such as spaces or slashes. Valid patterns can only contain letters, numbers, dashes, underscores and dots. Here is a link to the Java documentation: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html Here is a list of some useful pattern elements: ComponentPatternOutputYearyyyy yy1999, 2009 99, 09MonthM MM MMM MMMM1, 12 01, 12 Jan, Dec January, DecemberWeek in yearw ww1, 52 01, 52Day in yearD DDD1, 366 001, 366Day of monthd dd1, 31 01, 31Day of weekEEE EEEEMon Monday24-hourH HH0, 1, 23 00, 01, 2312-hourha hha12AM, 1AM, 11PM 12AM, 01AM, 11PMMinutem mm0, 59 00, 59Seconds ss0, 59 00, 59MillisecondsS SSS1, 999 001, 999Time zonez ZPDT -0800The default pattern is yyyyMMddHHmm, for example 200906150601. Note: When sequential file names are not used, the output file name is .. With sequential file names, the output file name is -.. Note the hyphen (-) between the base name and the timestamp, which is not part of the timestamp pattern.
  25. SummaryWhen creating calculated fields in Domains and Ad Hoc reports, JasperReports Server returns an exception if the calculated field returns data of type Boolean. This problem only occurs when the data source underlying the Domain or report points to a source that does not natively support the Boolean datatype, most notably Oracle and DB2. ResolutionWhile there are workarounds at the database level, JasperReports Server does not yet support them (as of July 7th, 2009). References: http://thinkoracle.blogspot.com/2005/07/oracle-boolean.html
×
×
  • Create New...