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

jmurray

Members
  • Posts

    401
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by jmurray

  1. 1) You can do it in your source query: SELECT FIELDNAME/100 as FIELDNAME FROM SOMEWHERE and set you TextField Expression to be simply $F{FIELDNAME}. or 2) you can do it your report TextField by setting the TextField Expression to something like new java.lang.Double($F{FIELDNAME}.doubleValue()/100) Either way you will need the TextField to be defined as a java.lang.Double or java.math.BigDecimal, depending on the size of your data. You can set the output format using a variation on the "#,##0.00" format string. For example, "#,##0" will display integer values. Have fun.
  2. Use the ! to force the literal value into the query and make sure you label the fields: Code:select 'Top 10' as myLabel, $P!{Usage_Percentage} as myValue from dual UNION select 'Rest' as myLabel, 100-$P!{Usage_Percentage} as myValue from dual
  3. It doesn't have anything to do with the way you've set up your subreport parameter. The problem is that the report engine can't find the subreport's .jasper file. This will happen for one of two simple reasons: 1) you haven't compiled the subreport so that the .jasper file is available. 2) the path to the subreports .jasper file is not valid in the main report. This can happen if you are building on a PC and publishing to Linux where the relative paths to the same directory are completely different. It can also happen if you have set your default compilation directory (under Options-Settings-Compiler) to anything other than the Reports Directory and you haven't explicitly pointed to the right path in your main report's design.
  4. Your main report would need a query that returns all the customer details, like: Code:SELECT CUST_ID, CUST_NAME, ADDRESS, SUBURB, PCODE, STATE FROM CUSTOMERS You would then link each subreport to the main report via (say) the CUST_ID field. To do that you modify the Subreport Parameters (under the Properties - Subreport (Other) tab). Enter the subreport Parameter name (eg. CUST_ID) and for the Expression enter $F{CUST_ID). Repeat this for all other subreports. Each subreport will need to have a suitable parameter defined (eg. $P{CUST_ID}), and their queries would need to be modified to make use of it. For example if one subreport was going to display transaction details for the customer then you would have a query like this: Code:[code]SELECT * FROM CUST_TRANSACTIONS WHERE CUST_ID=$P{CUST_ID} And that's all there is to it. Post edited by: jmurray, at: 2007/10/10 22:10
  5. You can use a PrintWhen Expression in the band's property settings to limit the display of content to the first page: new java.lang.Boolean($V{PAGE_NUMBER}.intValue()==1) Unfortunately I haven't found a way to reclaim the space reserved for the ColumnFooter band for use by the Detail band. Maybe someone else out there has...
  6. It might be better to create a simple string list such as "1,4,6,7,5,4,100" or "'CA','NY','MA','FL'" and then use it in an SQL 'IN' context, like this: SELECT FISCAL_YEAR, ACCT_STRUCTURE, ACCT_REGION, ACCT_STATUS_CODE, ACCT_STRUCTURE_DESC FROM ACCOUNT_STRUCTURE A WHERE ACCT_REGION IN ($P!{REGION}) AND LOCAL_STATUS = 'O' Of course you'll need to make sure that there is at least one value in the list, otherwise your report will die ungracefully. . Post edited by: jmurray, at: 2007/10/10 00:09 Post edited by: jmurray, at: 2007/10/10 00:10
  7. The following INSERT statements need to be issued to allow the repository manager to function correctly: Code:Insert into JIOBJECTPERMISSION (ID, URI, RECIPIENTOBJECTCLASS, RECIPIENTOBJECTID, PERMISSIONMASK) Values (1, 'repo:/', 'com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoRole', 2, 1); Insert into JIOBJECTPERMISSION (ID, URI, RECIPIENTOBJECTCLASS, RECIPIENTOBJECTID, PERMISSIONMASK) Values (2, 'repo:/', 'com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoRole', 1, 2); Insert into JIRESOURCEFOLDER (ID, VERSION, URI, HIDDEN, NAME, LABEL, DESCRIPTION, PARENT_FOLDER, CREATION_DATE) Values (1, 0, '/', 0, '/', 'root', 'Root of the folder hierarchy', NULL, SYSDATE); COMMIT; . Post edited by: jmurray, at: 2007/10/09 23:46
  8. JasperReports will try to load the .jasper files for the subreports, not the .jrxml. So run each of the subreports in iReport and publish the .jasper files to you project and all should work properly.
  9. It is not possible to set the column width of CSV output: there are no formatting properties (only data). Also, it is no possible to provide any other cell formatting either: Excel will always use its own default cell formatting (usually "General") NOT the formatting you specify in iReport.
  10. A good place to start is in the documentation area http://www.jasperforge.org/index.php?option=com_docman&task=cat_view&gid=25&Itemid=248 Start with the Flash Tutorial on SubReports
  11. It's not clear from here either. Is it correct to assume that "desc" is short for "description"? Perhaps your source query might help as a starting point.
  12. Tooltips don't really make much sense in a normal report scenario because the column headers should provide enough information by themselves. When you attach a hyperlink to a report element the tooltip should (usually) explain the action of the hyperlink, not the report element's content.
  13. FLOAT is your friend. In the main report select the first subreport and make sure that its Position Type is set to "Fix Relative To Top". That will pin it in the position that you want it to appear. The next two subreports need to have their Position Type set to "Float" so that they move down the page as objects above them grow. That's all there is to it.
  14. The templates in the attached Oracle for JasperServer 2.0.1 patch should get you out of trouble if you are having trouble finding all the information in one place, or if you are getting errors containing "URL=NULL or URL=''", "table or view not found" errors, or other Oracle errors. [file name=OraclePatchforJS201-c047792c207b836239bd2625b949dac0.zip size=10191]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/OraclePatchforJS201-c047792c207b836239bd2625b949dac0.zip[/file] . Post edited by: jmurray, at: 2007/10/09 05:26
  15. Keywords: JasperServer 2.0.1, Oracle, Patch, Schema, Build, hibernate.properties, web.xml, context.xml, applicationContext.xml, SQL, ddl . Post edited by: jmurray, at: 2007/10/09 05:14
  16. Turns out the problem was the Oracle Patch: very old and not compatible with JasperServer 2.0.1 META-DAT schema. . Post edited by: jmurray, at: 2007/10/09 05:25
  17. I'm stuck trying to get JasperServer to work on Linux using Oracle for the data source. Here's what I've done so far: Installed JS2.01 on the server and unpacked the WAR file, then renamed the WAR file so it doesn't get unpacked again. Made sure that ojdbc14.jar was in the lib directory. Modified META-INF/context.xml so that the resources point at Oracle instead of MySQL. The resource definitions were changed to Tomcat 5.0 format (refer to http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=16735&catid=10). Modified hibernate.properties to use Oracle9Dialect instead of MySQLInnoDBDialect Made sure that context.xml is copied to jasperserver.xml. Created database schema, created tables, and added some base user data/roles/etc. Jasperserver starts without error (finally!!) and I can get the login page up, but now I can't login. Fails with Oracle "Table or view does not exist" error, as if it's pointing in the wrong place. Unfortunately the error logging is pathetically ameteurish and doesn't specify the name of the offending table or view. Any ideas on what the problem might be? . Post edited by: jmurray, at: 2007/10/09 05:27
  18. It would probably be best to group by shipment number, order number and set the order number group to Start On a New Page.
  19. There is a good explanantion of lining up column headers and detail fields in the JasperReports FAQ: http://www.jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/FAQ9 If you want your headers to only display once then you need to set their printWhenExpression to something like new java.lang.Boolean($V{PAGE_NUMBER}.intValue()==1) . Post edited by: jmurray, at: 2007/09/03 23:20
  20. You need to let JasperReports do all the formatting for you. What you see in iReport is a design template. It is not a page of any specific length. The page setup parameters simply allow JasperReports to work out how much information can be rendered on the piece of paper that comes out of the printer. So if you setup your page as A4 with 20mm margins all around JasperReports will take that information plus the height of all the header and footers and use the remaining height to fill rows of detail. So the trick for you is to simply overflow the detail section. The best way to do that is to use subreports stacked one on top of the other in the detail section. The subreports don't even need to contain any headers or footers, just detail. You can put a page break on the main report in between the subreports, or you could use two fixed height subreports that don't shrink.
  21. Let's say your data source returns $F{linkURL} and $F{linkText}. You would use both in a single Text Field. The Text Field Expression would be set to $F{linkText}, and the Hyperlink would be configured as a "Reference" with the Hyperlink Reference Expression being set to $F{linkURL}. You can also add tooltip text if you need to. ------------- NOTE: Adobe Acrobat Reader has some quirky behaviour relating to the Hyperlink Target setting. If you set the target to "Blank" you would expect a new browser window to open when the hyperlink is clicked. That actually happens if you are using native Acrobat. But if you're using the AcroRead java plugin then it will always open in the same window. That's just the way the guys that wrote the plugin handle things, nothing to do with iReport or JasperReports
  22. There's a "Sort Options..." button at the bottom of the Report Query dialog box. It injects the Sortfield elements into your xml for you. Be careful though: any sorting specified within the source query will override Sortfield specifications.
×
×
  • Create New...