Jump to content

dstevens_2

Members
  • Posts

    19
  • 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

Posts posted by dstevens_2

  1. I have the same question that another person posted on stackoverflow. Re-posting his question here to see if anyone has an answer:

    "There is a concern within my organization with regard to having business logic embedded within jasper reports for performing certain calculations. Obviously in order to create reports you need to utilize expressions and variables. Is there a good method for sharing these expressions/variables among different developers by say defining them within an external class that can then be accessed by everyone. Comes down to having the expression defined in a singular place that everyone can then pull into their reports when needed rather then having the same expression living within multiple reports as that could lead to inconsistencies in the way it's being calculated due to human error, etc.....Just looking for feedback on how folks may be accomplishing this within their own organizations.   stackoverflow.com/questions/9082649/jasper-reports-sharing-expressions-variables"

  2. Hello.

    I have a chart with 6 series. I want the first three series to be stacked bar, and the last 3 to be lines.

    In JasperServer 6.4 I selected stacked column line. 

    Currently the first 5 series are stacked bars on yAxis = 0, and the 6th series is a line on yAxis=1.

    How can I tell jasperserver to make the last three series type = line?

    Amongst other things, i have tried:

    • plotOptions.series: [{type: 'column', yAxis: 0}, {type: 'column', yAxis: 0}, {type: 'column', yAxis: 0}, {type: 'line', yAxis: 1},{type: 'line', yAxis: 1},{type: 'line', yAxis: 1}]
    • series.type: ["line","line","line","column","column","column"]

    Thanks!

  3. Within the report, I believe you use java-based syntax, for example:

    OR($F{field}.equals("Value1"), $F{field}.equals("Value2") )

    I think the $X{IN, $F{field}, $P{param}} syntax is only used when filtering an Input Control (the server-side object, not the corresponding parameter in the studio report), or if you want to use a Filter Expression in the Dataset and Query Dialog.

  4. Hello

    • I am trying to create a modified version of the "Recently Viewed" report that is on the default Jaspersoft Home Page.
    • My goal is to generate a poor-man's version of a Favorites table, that displays the top 10 report objects (dashboards, ad hocs or reports) that have been viewed over the past 30 days (as opposed to the last 10 viewed with no date-range aggregation).
    • What would be really awesome: Is there a way to access the extant Recently Viewed table on the Home Page, and modify its date ranges?
    • If I must continue down the less preferable path of building a custom table:

    What i have so far:

    • An enhanced Audit domain that pulls in fields from public_jiResource, public_jiResourceFolder, and public_AuditEvent
    • A table in a studio-generated report
    • The table displays jiResource.Label, sorted descending by COUNT(jiAuditEvent.ID) for event_date BETWEEN MONTH and DAY
    • A java.lang.String variable that gives a (hard coded) report or adhoc URL depending on if jiAuditEvent.resource_type is AdhocDataView or ReportUnit:
      • <variable name="Var_hyperlink" class="java.lang.String" resetType="Group" resetGroup="Group_ResourceID">            <variableExpression><![CDATA[iF($F{public_jiauditevent.resource_type}.equals("ReportUnit"), "http://ddevrpt:8080/jasperserver-pro/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FUser_Content%2FDharol%2FDashboards%2FProductionVariance&reportUnit=%2FUser_Content%2FDharol%2FDashboards%2FProductionVariance%2FProduction_Variance_Time_Series&standAlone=true",IF($F{public_jiauditevent.resource_type}.equals("AdhocDataView"), "http://ddevrpt:8080/jasperserver-pro/flow.html?_flowId=adhocFlow&resource=%2Fpublic%2Faudit%2Freports%2FAudit_Report_AdhocDataView&ParentFolderUri=%2Fpublic%2Faudit%2Freports", "D"))]]></variableExpression>[/code]
    • A reference hyperlink using ${Var_hyperlink} that works for my hard-coded URLs:
      •  
        <jr:cell style="Table 3_CH" height="30" rowSpan="1">     <property name="com.jaspersoft.studio.unit.width" value="px"/>           <textField hyperlinkType="Reference" hyperlinkTarget="Blank">                <reportElement x="0" y="0" width="100" height="30" uuid="8e0205ca-0254-47c8-80e6-723dea64e5b0"/>                <textFieldExpression><![CDATA[$F{Resource_DerivedTable.resourcelabel}]]></textFieldExpression>                <hyperlinkReferenceExpression><![CDATA[$V{Var_hyperlink}]]></hyperlinkReferenceExpression>                <hyperlinkTooltipExpression><![CDATA[$F{Resource_DerivedTable.description}]]></hyperlinkTooltipExpression>           </textField> </jr:cell>[/code]

    My Question:

    • I don't know how to dynamically construct the URL for the Adhocs/Reports.
    • I have the various resource attributes in my Audit Domain, but don't know a way other than incredibly tedious parsing of the attributes and then compiling them into the URL.
    • Is there some Web Util function I can use?
      • Possibly something like:  public static final java.lang.String PROPERTY_REPORT_EXECUTION_PATH
      • I have very little experience with java.
      • My admin is also not super friendly about changing config files, if this is relevant to your proposed solution.
    • Could someone give me the syntax I would use in my $V{var_hyperlink}? What are the inputs of the REPORT_EXECUTION_PATH, if this is a possible solution.

    Many thanks!

  5. For anyone searching for answer to this:

    Footer band does not print on every page that a summary band takes up.

    Solution 1: If it works for your data, put the contents of the summary band into any other band type (Title, Detail, Group Header, etc.)

    Solution 2: If your data really needs to be in the summary band to aggregate correctly, you can

    1. Create a subreport.
    2. Put the data content in the summary band of your subreport.
    3. In your main report, reference the subreport in a non-summary band type.
  6. I am trying to use the Audit Data Domain to figure out which user created reporting objects (domains, adhocs, reports).

    I see in the "Events being audited and monitored" jasper documentation that there is a field "Create report in Adhoc Editor", with values of "Field added as a column" or "Field added as a group".

    However, I cannot find a field in any of the audit domains called "Create report". I am using jasper 6.3. Is this field in this domain somewhere?

     

    I do see a field [EventType] in the Audit Events table of the Audit Archive domain, and one of the values for this field is [saveResource]. Is a [saveResource] event indicate that the resource was created, or is [saveResource] event logged anytime the user saves the resource, for example, if they edit and then save the updated resource?

    If EventType = saveResource is logged for creating or updating, what table and what field indicates that the resource was Created?

    thx!

     

  7. I am having trouble implementing a highchart property. Specifically i have implemented the following code, and the report will run but nothing happens when i click the data series:

                            <jrhc:chartProperty name="plotOptions.series.events.click">                            <jrhc:propertyExpression><![CDATA["function() { window.open('http://www.google.com');}"]]></jrhc:propertyExpression>                        </jrhc:chartProperty>[/code]

    I also have this line in my jrxml:

        <property name="com.jaspersoft.jasperreports.highcharts.function.properties.allowed" value="true"/>[/code]

    I have read in a couple forums that this line of code needs to be added to WEB-INFclassesjasperreports.properties.

    Is this true for version 6.3.0? Do I need to get my admin to add "com.jaspersoft.jasperreports.highcharts.function.properties.allowed" value="true" to \WEB-INFclassesjasperreports.properties to access highchart event functions?

  8. Our site has a lot of content and a deep hierarchy.

    I am looking for a way to display to users where they are in this hierarchy, by adding bread or cookie crumbs somewhere in the UI.

    Is it possible to do any of the following:

    1. Add a bar below the Main Menu Bar and put bread crumbs in it
    2. Add bread crumbs in the bar right below the Main Menu Bar (the grey-ish bar that contains the word "Home", "Repository", or the name of the Report/Ad Hoc/Dashboard being viewed)?

    If none of this is possible, any alternative suggestions most welcome.

  9. I wasn't able to find a way to add a column without a group, so did the following work around:

    In my last column

    • I added a second text field element in the Column Group header
      • CrossTab > Column Groups > Total DateData.Date: This section contains two text fields
                    <columnGroup name="dateSet.RecordDate" height="20" totalPosition="End">                    <bucket order="Descending" class="java.sql.Timestamp">                        <bucketExpression><![CDATA[$F{dateSet.RecordDate}]]></bucketExpression>                    </bucket>                    <crosstabHeader>                        <cellContents>                            <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>                        </cellContents>                    </crosstabHeader>                    <crosstabColumnHeader>                        <cellContents mode="Opaque" style="Crosstab_CH">                            <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>                            <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                            <textField pattern="MMM d, yyyy">                                <reportElement mode="Opaque" x="0" y="0" width="70" height="20" forecolor="#FFFFFF" backcolor="#0096D1" uuid="b9639ac1-d6ff-41fd-b066-534a881548a2"/>                                <textFieldExpression><![CDATA[$V{dateSet.RecordDate}]]></textFieldExpression>                            </textField>                        </cellContents>                    </crosstabColumnHeader>                    <crosstabTotalColumnHeader>                        <cellContents mode="Opaque" style="Crosstab_CT">                            <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>                            <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                            <textField>                                <reportElement mode="Opaque" x="0" y="0" width="60" height="20" forecolor="#FFFFFF" backcolor="#0096D1" uuid="b7d8e730-8fca-4b37-b6c0-6d2732444fea"/>                                <textFieldExpression><![CDATA["u0394"]]></textFieldExpression>                            </textField>                            <textField>                                <reportElement mode="Opaque" x="60" y="0" width="60" height="20" forecolor="#FFFFFF" backcolor="#0096D1" uuid="b6884931-0695-4142-9d49-34989de70de2"/>                                <textFieldExpression><![CDATA["Abs " + "u0394"]]></textFieldExpression>                            </textField>                        </cellContents>                    </crosstabTotalColumnHeader>                </columnGroup>[/code]

     

    • I added a second text field element in the Column Group Detail section
      • CrossTab >  DateData.Date/Detail: This section contains two text fields, with each of my $V{Variable_Measures}
    <crosstabCell width="120" height="20" columnTotalGroup="dateSet.RecordDate">    <cellContents mode="Opaque" style="Crosstab_CT">        <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>        <textField pattern="#,##0.00">            <reportElement mode="Opaque" x="0" y="0" width="60" height="20" forecolor="#000000" uuid="a753ecb5-d682-4ffc-8f41-3b4e8f6cce98"/>            <textElement textAlignment="Right" verticalAlignment="Middle">                <font fontName="DejaVu Sans" size="10"/>            </textElement>            <textFieldExpression><![CDATA[$V{Diff_Measure}]]></textFieldExpression>        </textField>        <textField pattern="#,##0.00">            <reportElement mode="Opaque" x="60" y="0" width="60" height="20" forecolor="#000000" uuid="01e6bcd2-b0e4-4bb7-a353-6221af88415b"/>            <textElement textAlignment="Right" verticalAlignment="Middle">                <font fontName="DejaVu Sans" size="10"/>            </textElement>            <textFieldExpression><![CDATA[$V{AbsDiff_Measure}]]></textFieldExpression>        </textField>    </cellContents></crosstabCell>[/code]
    • Apologies, i don't seem to have permission to upload a screenshot, but src code above
    • Im sure it's more complicated when your crosstab contains totals, mine was fortunately a very simple crosstab

     

     

  10. Doesn't look like there are too many answers to be had for this problem, but i am encountering a similar issue for which closing ide did not work.

    Thx in advance

     

    net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Variable WellID_Return is not assignable from source variable WellID.
        at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:537)
        at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:512)
        at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:393)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: net.sf.jasperreports.engine.JRException: Variable WellID_Return is not assignable from source variable WellID.
        at net.sf.jasperreports.engine.fill.AbstractVariableReturnValueSourceContext.check(AbstractVariableReturnValueSourceContext.java:77)
        at net.sf.jasperreports.engine.fill.FillReturnValues.checkReturnValues(FillReturnValues.java:233)
        at net.sf.jasperreports.engine.fill.JRFillSubreport.validateReport(JRFillSubreport.java:1043)
        at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:466)
        at net.sf.jasperreports.components.table.fill.FillTableSubreport.evaluateSubreport(FillTableSubreport.java:102)
        at net.sf.jasperreports.components.table.fill.FillTable.evaluate(FillTable.java:133)
        at net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:110)
        at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:381)
        at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2022)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)
        at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)
        at java.lang.Thread.run(Thread.java:745)
     

  11. I am trying to follow the tutorial Hello World Scriptlet Example by Sadakar Pochampalli.

    After following all the instructions, once i try to compile and run the report i get the error below.

    Help greatly appreciated!!

        net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
        1. com.sadakar.jasper.Test4 cannot be resolved to a type
                    value = ((com.sadakar.jasper.Test4)parameter_Hello_SCRIPTLET.getValue()).hello(); //$JR_EXPR_ID=8$
                              <---------------------->
        2. com.sadakar.jasper.Test4 cannot be resolved to a type
                    value = ((com.sadakar.jasper.Test4)parameter_Hello_SCRIPTLET.getValue()).hello(); //$JR_EXPR_ID=8$
                              <---------------------->
        3. com.sadakar.jasper.Test4 cannot be resolved to a type
                    value = ((com.sadakar.jasper.Test4)parameter_Hello_SCRIPTLET.getValue()).hello(); //$JR_EXPR_ID=8$
                             <---------------------->
        3 errors
            at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:206)
            at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:294)
            at com.jaspersoft.studio.editor.preview.view.control.ReportControler.compileJasperDesign(ReportControler.java:465)
            at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$15(ReportControler.java:442)
            at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:356)
            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

×
×
  • Create New...