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

yama818

Members
  • Posts

    173
  • Joined

  • Last visited

Community Answers

  1. yama818's post in How to limit the number of columns printed in cross table? was marked as the answer   
    'Crosstab Wizard' I thought it was feasible only to select only 3 columns.


  2. yama818's post in Summarized data with multiple rows was marked as the answer   
    I know this is not a smart solution, but it could be accomplished by using a wrist component for the summary band.
    * Preview


    * Design

     
    * SQL
    To use the list component, a sub-dataset is required.
    The SQL for this sub-dataset should be written as follows
    select class,sum(animalqty) as classqtyfrom test.t27group by class
     
  3. yama818's post in pagination problem was marked as the answer   
    I most likely do not understand your requirements.
    However, you can use the 'Report Books' feature to achieve page-by-page resizing.
    * Manual
    https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v790/report-books
    * YouTube

     
     
  4. yama818's post in How to avoid the login page when the report is send as link in the email body ? was marked as the answer   
    I have not tried it, but there is a way to view reports without logging in.
    https://community.jaspersoft.com/wiki/allow-anonymous-access-reports
      --> Allow Anonymous Access to Reports
  5. yama818's post in Problems migrating from IReport 3.0 to Jaspersotf studio 6.18.1 was marked as the answer   
    I tried to mimic your CASE statement and it worked as expected.
    select * from test.t1where prod = case when'$P!{SIZE}' = 'P1' then 'P01' else 'P99' end[/code]
    My version of Jaspersoft Studio is 6.18.1.
    I used MySQL 8.0 as my database.

    It might be faster to debug by creating a very simple report to isolate the problem.
    By the way, I was a little concerned that the parameter 'SIZE' is not present in your jxml source.
     
  6. yama818's post in How to make this kind of Table? was marked as the answer   
    I think it can be done by using groups as gustavofarias said.
    If you want to group by date as well, it would be difficult to do so without adding one more line for the date.
    In other words, add one more group and place the date there.
    - Report preview image

     
    - Report design image

     
    I hope this is useful to you.
     
  7. yama818's post in bar chart series configuration was marked as the answer   
    This is an example configuration for the Chart component.
    It is different for the Html5 Charts component.
     
    - Preview image

    - series1 settings


    - series2 settings


     
    I hope this is useful to you.
  8. yama818's post in Fields name in Columns could not be shown in crosstable report was marked as the answer   
    I found a solution here.
    https://community.jaspersoft.com/wiki/missing-column-titles-when-exporting-ad-hoc-crosstab-view
    I hope this is useful to you.
     
  9. yama818's post in provide logged-in users to the ad hoc view was marked as the answer   
    If your requirement is to control the data reference range for each logged-in user, the 'Domain Security File' may be useful.
    The configuration is a bit confusing, but the manual below explains it.
    Creating a Domain Security File (JRS7.9.0)
    https://community.jaspersoft.com/documentation/tibco-jasperreports-server-data-management-using-domains/v790/creating-domain-security
    You will need to read the manual for the version of JRS you are using, as different versions have different ways of writing and uploading files.

    I hope this is useful to you.
     
  10. yama818's post in Customize Jasper server interface (repository menu) was marked as the answer   
    If you simply want to hide it permanently, I think you can do it with 'overrides_custom.css' using the theme file.
    Changing the UI With Themes
    https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v790/changing-ui-themes
      -->Hiding UI Elements
         https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v790/hiding-ui-elements
    - Default theme is enabled.


    - Image of the display when the custom theme is enabled (copy is hidden)

     
    - Example of 'overrides_custom.css' in the above example (Not guaranteed to work. It may affect other items as well)
    #copy { display:none;}
    I hope this is useful to you.
     
  11. yama818's post in AdHoc Cache in Jasper Reports server was marked as the answer   
    I haven't tried it, but the 'Data Snapshots' setting may be useful.
    https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v790/enabling-data-snapshots
    Normally, StudioReport does not have a cache like AhohcView/Report.
    However, with this setting, it seems that snapshots can be used instead of cache for StudioReport.
    Ad hoc caches are fast because they are stored in memory.
    However, snapshots are stored in the repository database.
    Therefore, it seems that the speedup is only due to the fact that the process of re-fetching data is omitted.
    In other words, it is important to note that this is different from so-called 'in-memory' caching.
    And it seems that we need to consider the timing of the snapshot update according to the system requirements.

    I hope this is useful to you.
     
  12. yama818's post in Jasper Report, crosstab manipulation was marked as the answer   
    I changed the input to a json file.

    - Preview image

    - Sample source
    <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 7.5.0.final using JasperReports Library version 6.11.0-0c4056ccaa4d25a5a8c45672d2f764ea3498bebb --><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="W20210727_crosstab" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="df1676c4-d142-482a-87c3-ec841361a022"> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="test_json3"/> <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> <style name="Crosstab_CH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Crosstab_CG" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Crosstab_CT" mode="Opaque" backcolor="#005FB3"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Crosstab_CD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <queryString language="JSON"> <![CDATA[anomalyList]]> </queryString> <field name="GruppiAnomalie" class="java.lang.Integer"> <property name="net.sf.jasperreports.json.field.expression" value="GruppiAnomalie"/> <fieldDescription><![CDATA[GruppiAnomalie]]></fieldDescription> </field> <field name="Code" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="Code"/> <fieldDescription><![CDATA[Code]]></fieldDescription> </field> <field name="Name" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="Name"/> <fieldDescription><![CDATA[Name]]></fieldDescription> </field> <field name="Class" class="java.lang.Integer"> <property name="net.sf.jasperreports.json.field.expression" value="Class"/> <property name="com.jaspersoft.studio.field.label" value="Class"/> <property name="com.jaspersoft.studio.field.tree.path" value="t6"/> <fieldDescription><![CDATA[Class]]></fieldDescription> </field> <field name="Severity" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="Severity"/> <fieldDescription><![CDATA[severity]]></fieldDescription> </field> <field name="Value" class="java.math.BigDecimal"> <property name="net.sf.jasperreports.json.field.expression" value="Value"/> <fieldDescription><![CDATA[Value]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <summary> <band height="283" splitType="Stretch"> <staticText> <reportElement x="0" y="50" width="100" height="21" uuid="8c281303-39bd-456a-bf6b-511bcc71fb3d"/> <box leftPadding="2"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Class]]></text> </staticText> <staticText> <reportElement x="0" y="70" width="100" height="21" uuid="3a67121c-326b-43ba-bb90-d8c8f04cc9be"/> <box leftPadding="2"/> <textElement verticalAlignment="Middle"> <font isBold="true"/> </textElement> <text><![CDATA[Codice Anomalia]]></text> </staticText> <staticText> <reportElement x="0" y="10" width="180" height="30" uuid="1f0196ba-f401-4809-8409-d9ab752f11da"/> <textElement verticalAlignment="Middle"> <font size="16" isBold="true"/> </textElement> <text><![CDATA[Gruppo Anomalie .....]]></text> </staticText> <crosstab> <reportElement x="2" y="50" width="798" height="130" uuid="d529e7c9-8838-4ff3-a819-783a70e85f5d"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/> <property name="com.jaspersoft.studio.crosstab.style.header" value="Crosstab_CH"/> <property name="com.jaspersoft.studio.crosstab.style.group" value="Crosstab_CG"/> <property name="com.jaspersoft.studio.crosstab.style.total" value="Crosstab_CT"/> <property name="com.jaspersoft.studio.crosstab.style.detail" value="Crosstab_CD"/> </reportElement> <crosstabDataset> <dataset resetType="Report"/> </crosstabDataset> <rowGroup name="Severity" width="100"> <bucket class="java.lang.String"> <bucketExpression><![CDATA[$F{Severity}]]></bucketExpression> </bucket> <crosstabRowHeader> <cellContents mode="Opaque" style="Crosstab_CH"> <textField> <reportElement x="0" y="0" width="100" height="20" uuid="e56deaa8-0432-4ea8-ae0c-44476ef2e450"/> <box leftPadding="4"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$V{Severity}]]></textFieldExpression> </textField> </cellContents> </crosstabRowHeader> <crosstabTotalRowHeader> <cellContents mode="Opaque" style="Crosstab_CT"> <staticText> <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="a9422fc4-9fd4-4af2-bf13-183cf7f50247"/> <text><![CDATA[Total Severity]]></text> </staticText> </cellContents> </crosstabTotalRowHeader> </rowGroup> <columnGroup name="Class" height="20" totalPosition="End"> <bucket class="java.lang.Integer"> <bucketExpression><![CDATA[$F{Class}]]></bucketExpression> </bucket> <crosstabColumnHeader> <cellContents mode="Opaque" style="Crosstab_CH"> <textField> <reportElement x="0" y="0" width="60" height="20" uuid="4998cf69-a4eb-46ea-9571-1252ed35dc1b"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$V{Class}]]></textFieldExpression> </textField> </cellContents> </crosstabColumnHeader> <crosstabTotalColumnHeader> <cellContents mode="Opaque" style="Crosstab_CT"> <staticText> <reportElement x="0" y="0" width="60" height="40" forecolor="#FFFFFF" uuid="e9cd7912-54c5-4822-90aa-d42d46c8ddb4"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[%]]></text> </staticText> </cellContents> </crosstabTotalColumnHeader> </columnGroup> <columnGroup name="Code" height="20"> <bucket class="java.lang.String"> <bucketExpression><![CDATA[$F{Code}]]></bucketExpression> </bucket> <crosstabColumnHeader> <cellContents mode="Opaque" style="Crosstab_CH"> <textField> <reportElement x="0" y="0" width="60" height="20" uuid="2d368a8a-100b-4ece-b242-7f7100c8ea41"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$V{Code}]]></textFieldExpression> </textField> </cellContents> </crosstabColumnHeader> <crosstabTotalColumnHeader> <cellContents mode="Opaque" style="Crosstab_CG"> <staticText> <reportElement x="0" y="0" width="60" height="20" uuid="3b9b5b72-0f96-45fd-acfd-df0c708cc295"/> <text><![CDATA[Total Code]]></text> </staticText> </cellContents> </crosstabTotalColumnHeader> </columnGroup> <measure name="Value_MEASURE" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{Value}]]></measureExpression> </measure> <crosstabCell width="60" height="20"> <cellContents mode="Opaque" style="Crosstab_CD"> <textField pattern="0.00"> <reportElement x="0" y="0" width="60" height="20" uuid="945a8120-7e38-474b-9e2a-b90b9e62e0e4"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$V{Value_MEASURE}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" columnTotalGroup="Class"> <cellContents mode="Opaque" style="Crosstab_CT"> <textField pattern="0.00"> <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="b0400007-1abd-44c9-9106-f124b32062b4"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$V{Value_MEASURE}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" columnTotalGroup="Code"> <cellContents mode="Opaque" style="Crosstab_CG"> <textField> <reportElement x="0" y="0" width="60" height="20" uuid="10cb4cfe-19a4-4a7f-a474-0379b739a9b7"/> <textFieldExpression><![CDATA[$V{Value_MEASURE}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" rowTotalGroup="Severity"> <cellContents mode="Opaque" style="Crosstab_CT"> <textField> <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="a46eba72-7a92-4e20-9c0a-9b9437bc93f2"/> <textFieldExpression><![CDATA[$V{Value_MEASURE}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" rowTotalGroup="Severity" columnTotalGroup="Class"> <cellContents mode="Opaque" style="Crosstab_CT"> <textField> <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="5345354d-89e0-4d00-b6bd-70f1d5c64343"/> <textFieldExpression><![CDATA[$V{Value_MEASURE}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" rowTotalGroup="Severity" columnTotalGroup="Code"> <cellContents mode="Opaque" style="Crosstab_CT"> <textField> <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="5d54a4af-9196-4f78-9732-65eb07429fd9"/> <textFieldExpression><![CDATA[$V{Value_MEASURE}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> </crosstab> </band> </summary></jasperReport>I hope this is helpful.
  13. yama818's post in Programatically Refresh Report was marked as the answer   
    Let me tell you that I may not have understood your requirement.
    I have solved this before by auto-pressing the standard reload button from javascript embedded in the report.
    Note that it is not picked up by the 'click' event, but by the 'mouseup'.
    var mouseupEvent = new Event('mouseup');document.getElementById('dataRefreshButton').dispatchEvent(mouseupEvent);[/code]Also, depending on the version of JRS, it may not work.
    The JRS I had success with was JRS 6.4.2.
    I hope this helps.
  14. yama818's post in How to insert a value into a report from a different sql query? was marked as the answer   
    This may not be the best way to do it, but I was able to achieve this by using the table component.
    Tie a new dataset to the table component and write SQL to return only one item in this dataset.
    ex) select email from email_table where id = $P{xxxx}
    preview image


    Design image


     
    I hope this is helpful.
     
     
×
×
  • Create New...