Anonymous_User Absent Member.
Absent Member.
950 views

Problem while passing report parameters?


Hi,

I am developing a custom report that lists the current configuration of
SLM (i.e. the list of collectors and event sources).

I can run the report from the iReport (using the active connection to
potgresql db of SLM) and get the PDF output without any problem.

When I try to run the report from SLM I get the following error:

java.lang.String cannot be cast to
net.sf.jasperreports.engine.JRValueParameter

Any suggestions on how to to get rid of the error?

Thanks,
Hakan


--
hkalyoncu
------------------------------------------------------------------------
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
9 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


My first thoughts on that error is that the report is expecting a
parameter of some type other than a "String", however, SLM is passing
the parameter as a "String".

Did you add any new parameters for your report and if so, are you
expecting the parameter to have something other than a "String" value?

One thing you could do is compare the types of the parameters in your
report plug-in's package.xml with those in your actual report.

That is, go ahead and open your report plug-in's package.xml and look
at the "PluginParameterDefinition" elements, you'll see something like
this for each parameter:

<PluginParameterDefinition>
<Type>String</Type>
<DisplayName>Test String</DisplayName>
<InternalName>TestString</InternalName>
<Description>Enter a String.</Description>
<DefaultValue>Hello World!!!</DefaultValue>
<IsForPrompting>1</IsForPrompting>
</PluginParameterDefinition>

Now open your report's TemplateReport.jrxml file and look at the
parameters located near the top of that file, you'll see something like
this for each parameter:

<parameter name="TestString" isForPrompting="true"
class="java.lang.String">
<parameterDescription><![CDATA[Enter a
String.]]></parameterDescription>
<defaultValueExpression ><![CDATA["Hello
World!!!"]]></defaultValueExpression>
</parameter>

Note the type/class of the parameters. The type of the parameter in
the package.xml should match the class of the parameter in the .jrxml
file.

Based on your error, it sounds like you might hava parameter in your
package.xml of type "String", but the corresponding parameter in your
.jrxml file is of some type other than string.

I know this is kinds of low level... in that you are looking at these
two .xml files... but it is probably the most straight forward way to
find any such problems. Once you see which parameter is having the
problem, you can either correct the parameter type in your report .jrxml
using iReport... or you can correct how the parameter is defined in your
report's "parameters" subdirectory that you should see within eclipse.

For more on available report parameter types, visit:

http://www.novell.com/developer/report_parameters.html

And for more general information about defining parameters using the
SDK, visit:

http://www.novell.com/developer/parameters.html

And let me know if you need any assistance looking at your parameters.

Thanks and good luck!


--
bweiner12345
------------------------------------------------------------------------
bweiner12345's Profile: http://forums.novell.com/member.php?userid=55576
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


Hi,

Thank you for the reply.

After checking the files as you suggested:
* The three parameters that I defined via the release.pml file seems to
be OK, all of them have matching parameter types.
* But there are two additional parameters at package.xml file
(PLUGIN_DIRECTORY, and locale) which do not exist in
TemplateReport.jrxml file.

I don't know if these make any sense!

Best regards,
Hakan


--
hkalyoncu
------------------------------------------------------------------------
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


Those two parameters (PLUGIN_DIRECTORY and locale) are just standard
parameters used by the backend. They won't affect the actual report.

So... getting back to the problem.... so the types of those three
parameter correspond to the actual parameters in the .jrxml file?
Ok...

A couple more questions:

1) What "types" are those parameters?

2) When running the report through iReport, are you prompted to enter
values for each of those parameters?

3) And when trying to run the report on an actual SLM system, are you
prompted for the values on the Run Report UI?

Perhaps the problem has to do with the default values for those
parameters.

I would suggest triple-checking the fields of each of the parameters in
the report's package.xml file. Especially make sure the "InternalName"
of each of those parameters in the package.xml match exactly to the
parameter names used in your .jrxml file. If one of those names are
off... the parameter could be defaulting to something unexpected.

Otherwise, is there any way I can view the parameter portion of your
TemplateReport.jrxml file? And also take a look at your report's
package.xml file? Maybe I could spot the problem.


--
bweiner12345
------------------------------------------------------------------------
bweiner12345's Profile: http://forums.novell.com/member.php?userid=55576
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


bweiner12345;2159908 Wrote:
> Those two parameters (PLUGIN_DIRECTORY and locale) are just standard
> parameters used by the backend. They won't affect the actual report.
>
> So... getting back to the problem.... so the types of those three
> parameter correspond to the actual parameters in the .jrxml file?
> Ok...
>
> A couple more questions:
>
> 1) What "types" are those parameters?
>
> 2) When running the report through iReport, are you prompted to enter
> values for each of those parameters?
>
> 3) And when trying to run the report on an actual SLM system, are you
> prompted for the values on the Run Report UI?
>
> Perhaps the problem has to do with the default values for those
> parameters.
>
> I would suggest triple-checking the fields of each of the parameters in
> the report's package.xml file. Especially make sure the "InternalName"
> of each of those parameters in the package.xml match exactly to the
> parameter names used in your .jrxml file. If one of those names are
> off... the parameter could be defaulting to something unexpected.
>
> Otherwise, is there any way I can view the parameter portion of your
> TemplateReport.jrxml file? And also take a look at your report's
> package.xml file? Maybe I could spot the problem.


1) There are 3 parameters. All of type String

2) Yes. And from iReport the resulting report is as expected.

3) Yes. After entering the parameters and clicking on "Run" I get the
error. I can see the corresponding Java error logs at the
serwer_wrapper.log file.

Here are the parameter portion of the TemplateReport.jrxml file:

...
<parameter name="mysortfield" isForPrompting="true"
class="java.lang.String">
<parameterDescription><![CDATA[Specifies the field to be used for
sorting.]]></parameterDescription>
<defaultValueExpression
><![CDATA["evt_src_mgr_name"]]></defaultValueExpression>

</parameter>
<parameter name="searchfield" isForPrompting="true"
class="java.lang.String">
<parameterDescription><![CDATA[Specifies the field to be used for
searching.]]></parameterDescription>
<defaultValueExpression
><![CDATA["evt_src_mgr_name"]]></defaultValueExpression>

</parameter>
<parameter name="searchvalue" isForPrompting="true"
class="java.lang.String">
<parameterDescription><![CDATA[Specifies the SQL search expression to
be used on the search field.]]></parameterDescription>
<defaultValueExpression ><![CDATA["%"]]></defaultValueExpression>
</parameter>
...

Sure, if you need I can send the package.xml file, but unfortunately my
forum permissions do not allow posting attachments.


--
hkalyoncu
------------------------------------------------------------------------
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


Hakan,

I've "approved attachments" which may allow you to add them. Can you
give it a shot? Please also post your TemplateReport.jrxml.


--
DCorlette
------------------------------------------------------------------------
DCorlette's Profile: http://forums.novell.com/member.php?userid=4437
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Highlighted
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


DCorlette;2162789 Wrote:
> Hakan,
>
> I've "approved attachments" which may allow you to add them. Can you
> give it a shot? Please also post your TemplateReport.jrxml.


Hi David,
It still says "You may not post attachments" at "Posting Permissions"
area 😞
I wil send the files to your e-mail then.
Thanks


--
hkalyoncu
------------------------------------------------------------------------
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


Hi, I still could not solved the problem.
I am copying the TemplateReport.jrxml, pacjage.xml files and also the
error log.
Please help...
Thanks..

TemplateReport.jrxml file:

Code:
--------------------

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="TemplateReport"
columnCount="1"
printOrder="Vertical"
orientation="Landscape"
pageWidth="842"
pageHeight="595"
columnWidth="782"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="AllSectionsNoDetail"
scriptletClass="com.novell.sentinel.content.reports.TemplateReportScriptlet"
isTitleNewPage="false"
isSummaryNewPage="false"
resourceBundle="TemplateReport">
<property name="ireport.scriptlethandling" value="2" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />
<import value="java.text.*" />

<parameter name="mysortfield" isForPrompting="true" class="java.lang.String">
<parameterDescription><![CDATA[Specifies the field to be used for sorting.]]></parameterDescription>
<defaultValueExpression ><![CDATA["evt_src_mgr_name"]]></defaultValueExpression>
</parameter>
<parameter name="searchfield" isForPrompting="true" class="java.lang.String">
<parameterDescription><![CDATA[Specifies the field to be used for searching.]]></parameterDescription>
<defaultValueExpression ><![CDATA["evt_src_mgr_name"]]></defaultValueExpression>
</parameter>
<parameter name="searchvalue" isForPrompting="true" class="java.lang.String">
<parameterDescription><![CDATA[Specifies the SQL search expression to be used on the search field.]]></parameterDescription>
<defaultValueExpression ><![CDATA["%"]]></defaultValueExpression>
</parameter>
<parameter name="PLUGIN_DIRECTORY" isForPrompting="false" class="java.lang.String">
<parameterDescription><![CDATA[Location of plugin files]]></parameterDescription>
</parameter>
<parameter name="INITIATING_USER" isForPrompting="false" class="java.lang.String"/>
<queryString><![CDATA[SELECT
EVT_SRC_MGR_RPT_V."evt_src_mgr_name" AS esm_name,
evt_src_collector_rpt_v."evt_src_collector_name" AS collector_name,
evt_src_grp_rpt_v."evt_src_grp_name" AS grp_name,
evt_src_grp_rpt_v."state_ind" AS state_ind,
evt_src_rpt_v."evt_src_name" AS src_name,
evt_src_rpt_v."date_modified" AS date_modified,
evt_src_rpt_v."date_created" AS date_created,
evt_src_offset_rpt_v."offset_val" AS offset_val,
evt_src_offset_rpt_v."offset_timestamp" AS offset_timestamp,
evt_src_offset_rpt_v."date_modified" AS offset_modified,
$P!{mysortfield} as sort
FROM
"evt_src_mgr_rpt_v" EVT_SRC_MGR_RPT_V
LEFT JOIN
"evt_src_collector_rpt_v" evt_src_collector_rpt_v
ON EVT_SRC_MGR_RPT_V."evt_src_mgr_id" = evt_src_collector_rpt_v."evt_src_mgr_id"
LEFT JOIN
"evt_src_grp_rpt_v" evt_src_grp_rpt_v
ON evt_src_collector_rpt_v."evt_src_collector_id" = evt_src_grp_rpt_v."evt_src_collector_id"
LEFT JOIN
"evt_src_rpt_v" evt_src_rpt_v
ON evt_src_grp_rpt_v."evt_src_grp_id" = evt_src_rpt_v."evt_src_grp_id"
LEFT JOIN
"evt_src_offset_rpt_v" evt_src_offset_rpt_v
ON evt_src_rpt_v."evt_src_id" = evt_src_offset_rpt_v."evt_src_id"
WHERE
$P{searchfield} LIKE ($P!{searchvalue} || '%')
]]></queryString>

<field name="esm_name" class="java.lang.String"/>
<field name="collector_name" class="java.lang.String"/>
<field name="grp_name" class="java.lang.String"/>
<field name="state_ind" class="java.lang.String"/>
<field name="src_name" class="java.lang.String"/>
<field name="date_modified" class="java.sql.Timestamp"/>
<field name="date_created" class="java.sql.Timestamp"/>
<field name="offset_val" class="java.lang.String"/>
<field name="offset_timestamp" class="java.sql.Timestamp"/>
<field name="offset_modified" class="java.sql.Timestamp"/>
<field name="sort" class="java.lang.String"/>

<sortField name="sort" />

<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="68" isSplitAllowed="true" >
<frame> <reportElement
mode="Opaque"
x="0"
y="0"
width="780"
height="21"
backcolor="#000000"
key="frame-1"/>
<box></box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="5"
y="3"
width="565"
height="14"
forecolor="#FFFFFF"
key="textField-5"/>
<box></box>
<textElement textAlignment="Left" verticalAlignment="Middle" markup="html">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[java.text.MessageFormat.format($R{MARKUP_HEADER}, new Object[]
{DateFormat.getDateInstance(DateFormat.LONG,
$P{REPORT_LOCALE}).format(new Date()),
DateFormat.getTimeInstance(DateFormat.LONG, $P{REPORT_LOCALE}).format(new
Date())})]]></textFieldExpression>
</textField>
</frame> <frame> <reportElement
x="2"
y="25"
width="778"
height="41"
key="frame-2"/>
<box></box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="3"
y="4"
width="565"
height="21"
key="textField-4"/>
<box></box>
<textElement>
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="14" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$R{RPT_NAME}]]></textFieldExpression>
</textField>
</frame> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="5"
y="51"
width="775"
height="16"
key="textField-3"/>
<box></box>
<textElement textAlignment="Left">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$R{DESC1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="690"
y="3"
width="48"
height="14"
forecolor="#FFFFFF"
key="textField"/>
<box></box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[java.text.MessageFormat.format($R{HEADER4}, new Object[]{$V{PAGE_NUMBER}})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="740"
y="3"
width="34"
height="14"
forecolor="#FFFFFF"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[java.text.MessageFormat.format($R{HEADER5}, new Object[]{$V{PAGE_NUMBER}})]]></textFieldExpression>
</textField>
<line direction="TopDown">
<reportElement
x="150"
y="50"
width="0"
height="0"
key="line-2"/>
<graphicElement stretchType="NoStretch"/>
</line>
</band>
</title>
<pageHeader>
<band height="0" isSplitAllowed="true" >
</band>
</pageHeader>
<columnHeader>
<band height="16" isSplitAllowed="true" >
<staticText>
<reportElement
mode="Opaque"
x="0"
y="2"
width="100"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-1"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[CM NAME]]></text>
</staticText>
<staticText>
<reportElement
mode="Opaque"
x="103"
y="2"
width="136"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-2"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[COLLECTOR]]></text>
</staticText>
<staticText>
<reportElement
mode="Opaque"
x="241"
y="2"
width="127"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-3"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[CONNECTOR]]></text>
</staticText>
<staticText>
<reportElement
mode="Opaque"
x="370"
y="2"
width="198"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-4"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[SOURCE]]></text>
</staticText>
<staticText>
<reportElement
mode="Opaque"
x="689"
y="2"
width="91"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-6"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[OFFSET Timestamp]]></text>
</staticText>
<staticText>
<reportElement
mode="Opaque"
x="673"
y="2"
width="13"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-7"/>
<box></box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[ST]]></text>
</staticText>
<staticText>
<reportElement
mode="Opaque"
x="622"
y="2"
width="48"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-8"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[MOD DATE]]></text>
</staticText>
<staticText>
<reportElement
mode="Opaque"
x="570"
y="2"
width="50"
height="14"
forecolor="#FFFFFF"
backcolor="#A6A6A6"
key="staticText-9"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[CR DATE]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="23" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="2"
width="100"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{esm_name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="103"
y="2"
width="136"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{collector_name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="242"
y="2"
width="126"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{grp_name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="370"
y="2"
width="198"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{src_name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="624"
y="2"
width="45"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{date_modified}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="691"
y="3"
width="89"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{offset_timestamp}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="673"
y="3"
width="14"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{state_ind}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="571"
y="2"
width="49"
height="20"
forecolor="#808080"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{date_created}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="0" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="34" isSplitAllowed="false" >
<image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="5"
y="6"
width="72"
height="25"
key="image-1"/>
<box></box>
<graphicElement stretchType="NoStretch"/>
<imageExpression class="java.lang.String"><![CDATA["logo.jpg"]]></imageExpression>
</image>
<line direction="TopDown">
<reportElement
x="4"
y="3"
width="780"
height="0"
forecolor="#999999"
key="line-1"/>
<graphicElement stretchType="NoStretch"/>
</line>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="344"
y="6"
width="92"
height="14"
forecolor="#808080"
key="textField-6"/>
<box></box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$R{CONF}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="683"
y="6"
width="92"
height="14"
forecolor="#808080"
key="textField-21"/>
<box></box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Arial" size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$R{FOOTER1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="683"
y="17"
width="92"
height="14"
forecolor="#808080"
key="textField-22"/>
<box></box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Arial" size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$R{FOOTER2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
mode="Opaque"
x="344"
y="17"
width="57"
height="14"
forecolor="#808080"
key="textField-23">
<printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER}.intValue()!=1)]]></printWhenExpression>
</reportElement>
<box></box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Arial" size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[java.text.MessageFormat.format($R{HEADER4}, new Object[]{$V{PAGE_NUMBER}})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
mode="Opaque"
x="403"
y="17"
width="34"
height="14"
forecolor="#808080"
key="textField-24">
<printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER}.intValue()!=1)]]></printWhenExpression>
</reportElement>
<box></box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Arial" size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[java.text.MessageFormat.format($R{HEADER5}, new Object[]{$V{PAGE_NUMBER}})]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</jasperReport>

--------------------



package.xml file:


Code:
--------------------

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<JasperReportPackage>
<Type>JASPER_REPORT</Type>
<DisplayName>Event Sources Configuration</DisplayName>
<Name>Event-Sources_Configuration_6.1r6</Name>
<Namespace>Event Sources</Namespace>
<Description>This report displays information on connected event sources and collectors with state and offset data.</Description>
<Version>6.1r6</Version>
<ReleaseDate>1326068111000</ReleaseDate>
<Author>Hakan Kalyoncu</Author>
<ReportFile>TemplateReport.jrxml</ReportFile>
<HelpFile>docs/plugin.pdf</HelpFile>
<SampleFile>TemplateReport.pdf</SampleFile>
<ID>E9248920-E62E-102E-81CC-000C293CD851</ID>
<Tags>
<Tag>
<Name>config</Name>
<Description>config</Description>
</Tag>
<Tag>
<Name>source</Name>
<Description>source</Description>
</Tag>
</Tags>
<SupportedSentinelPlatforms>
<SupportedSentinelPlatform>
<PlatformName>Sentinel Log Manager</PlatformName>
</SupportedSentinelPlatform>
</SupportedSentinelPlatforms>
<PluginParameterDefinitions>
<PluginParameterDefinition>
<Type>String</Type>
<DisplayName>PLUGIN_DIRECTORY</DisplayName>
<Description>Location of plugin files</Description>
<InternalName>PLUGIN_DIRECTORY</InternalName>
<DefaultValue></DefaultValue>
<IsForPrompting>0</IsForPrompting>
</PluginParameterDefinition>
<PluginParameterDefinition>
<Type>String</Type>
<DisplayName>Language</DisplayName>
<Description>Select the language in which the report will be generated.</Description>
<InternalName>REPORT_LOCALE</InternalName>
<DefaultValue>en</DefaultValue>
<IsForPrompting>1</IsForPrompting>
<Options>
<Property>
<Value>en</Value>
<Name>English</Name>
</Property>
<Property>
<Value>fr</Value>
<Name>French</Name>
</Property>
<Property>
<Value>de</Value>
<Name>German</Name>
</Property>
<Property>
<Value>it</Value>
<Name>Italian</Name>
</Property>
<Property>
<Value>ja</Value>
<Name>Japanese</Name>
</Property>
<Property>
<Value>zh_TW</Value>
<Name>Traditional Chinese</Name>
</Property>
<Property>
<Value>zh_CN</Value>
<Name>Simplified Chinese</Name>
</Property>
<Property>
<Value>es</Value>
<Name>Spanish</Name>
</Property>
<Property>
<Value>pt</Value>
<Name>Portuguese</Name>
</Property>
</Options>
</PluginParameterDefinition>
<PluginParameterDefinition>
<Type>String</Type>
<DisplayName>Sort Field</DisplayName>
<Description>Specifies the field to be used for sorting.</Description>
<InternalName>mysortfield</InternalName>
<IsForPrompting>1</IsForPrompting>
<DefaultValue>evt_src_mgr_name</DefaultValue>
<Options>
<Property>
<Value>evt_src_mgr_name</Value>
<Name>Collector Manager Name</Name>
</Property>
<Property>
<Value>evt_src_collector_name</Value>
<Name>Collector Name</Name>
</Property>
<Property>
<Value>evt_src_grp_name</Value>
<Name>Connector Name</Name>
</Property>
<Property>
<Value>evt_src_name</Value>
<Name>Event Source Name</Name>
</Property>
</Options>
</PluginParameterDefinition>
<PluginParameterDefinition>
<Type>String</Type>
<DisplayName>Search Field</DisplayName>
<Description>Specifies the field to be used for searching.</Description>
<InternalName>searchfield</InternalName>
<IsForPrompting>1</IsForPrompting>
<DefaultValue>evt_src_mgr_name</DefaultValue>
<Options>
<Property>
<Value>evt_src_mgr_name</Value>
<Name>Collector Manager Name</Name>
</Property>
<Property>
<Value>evt_src_collector_name</Value>
<Name>Collector Name</Name>
</Property>
<Property>
<Value>evt_src_grp_name</Value>
<Name>Connector Name</Name>
</Property>
<Property>
<Value>evt_src_name</Value>
<Name>Event Source Name</Name>
</Property>
</Options>
</PluginParameterDefinition>
<PluginParameterDefinition>
<Type>String</Type>
<DisplayName>Search Value</DisplayName>
<Description>Specifies the SQL search expression to be used on the search field.</Description>
<InternalName>searchvalue</InternalName>
<IsForPrompting>1</IsForPrompting>
<DefaultValue>%</DefaultValue>
</PluginParameterDefinition>
</PluginParameterDefinitions>
<PluginPackageFiles>
<PluginPackageFile>
<File>Color_RGB.csv</File>
<Size>753</Size>
<Hash>a0cc2385e104229a653bb745c763a4d9</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>Key_Color.csv</File>
<Size>2242</Size>
<Hash>6ad9dcfd7a94577dc0e114e20fa7b939</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>META-INF/MANIFEST.MF</File>
<Size>468</Size>
<Hash>b9bfdadfa35846bed51eba13de4db447</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>TemplateReport.jasper</File>
<Size>32565</Size>
<Hash>71d4a080a3828e46151e90d34e22df28</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>TemplateReport.jrxml</File>
<Size>19406</Size>
<Hash>0be83abd56c71399bff4b35bff7a5c71</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>TemplateReport.pdf</File>
<Size>82165</Size>
<Hash>8a8999f3d5746288666aaa6adc81309d</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>TemplateReport.properties</File>
<Size>491</Size>
<Hash>36cdeab83109a2aa6ff88eeab9d10708</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>chartcustomizer.jar</File>
<Size>47567</Size>
<Hash>df8f581853b8945f33bbd69d1a2b60b1</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>com/novell/content/reportRunner/impl/ReportingContentActivator.class</File>
<Size>2786</Size>
<Hash>35f9a8b3180060254f1ea50985369c4a</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>logo.jpg</File>
<Size>20607</Size>
<Hash>547e653246589c3cf1fa1de04e9fc604</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>master.jar</File>
<Size>399</Size>
<Hash>df1f863d3b8ed88c56bddb44ffebc2d6</Hash>
</PluginPackageFile>
<PluginPackageFile>
<File>package.xml</File>
<Size>761</Size>
<Hash>a7cffa29f3f3d735cad4bbee5b61afd3</Hash>
</PluginPackageFile>
</PluginPackageFiles>
<BaseJar>master.jar</BaseJar>
<IsQueryParameterized>0</IsQueryParameterized>
</JasperReportPackage>

--------------------



Lastlt the portion of server?wrapper.log with the Java error log:


Code:
--------------------

2012/01/09 00:19:41 | INFO | jvm 1 | Mon Jan 09 00:19:41 GMT+00:00 2012|SEVERE|Thread-4656|esecurity.base.ccs.comp.BaseRemoteObjectTask.execute
2012/01/09 00:19:41 | INFO | jvm 1 | Error obtaining AccessChecker for method _generateReportById_ of object ReportingService; Exception java.lang.reflect.InvocationTargetException; ; Caused by java.lang.String cannot be cast to net.sf.jasperreports.engine.JRValueParameter; java.lang.ClassCastException;
2012/01/09 00:19:41 | INFO | jvm 1 | Mon Jan 09 00:19:41 GMT+00:00 2012|SEVERE|Thread-4656|esecurity.base.ccs.comp.BaseRemoteObjectTask.execute
2012/01/09 00:19:41 | INFO | jvm 1 | java.lang.reflect.InvocationTargetException
2012/01/09 00:19:41 | INFO | jvm 1 | at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
2012/01/09 00:19:41 | INFO | jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2012/01/09 00:19:41 | INFO | jvm 1 | at java.lang.reflect.Method.invoke(Method.java:597)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.base.ccs.comp.BaseRemoteObjectTask.execute(BaseRemoteObjectTask.java:113)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.base.ccs.comp.GenericRemoteObjectTask.processRequest(GenericRemoteObjectTask.java:86)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.base.ccs.comp.GenericTask.process(GenericTask.java:91)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.base.ccs.comp.GenericTask.process(GenericTask.java:65)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.base.ccs.comp.BaseTask.run(BaseTask.java:52)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.base.ccs.comp.threadpool.TaskThreadPool$RunWrapper.run(TaskThreadPool.java:89)
2012/01/09 00:19:41 | INFO | jvm 1 | at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
2012/01/09 00:19:41 | INFO | jvm 1 | at java.lang.Thread.run(Thread.java:619)
2012/01/09 00:19:41 | INFO | jvm 1 | Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to net.sf.jasperreports.engine.JRValueParameter
2012/01/09 00:19:41 | INFO | jvm 1 | at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:491)
2012/01/09 00:19:41 | INFO | jvm 1 | at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getParameterValue(JRAbstractQueryExecuter.java:436)
2012/01/09 00:19:41 | INFO | jvm 1 | at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getParameterValue(JRAbstractQueryExecuter.java:448)
2012/01/09 00:19:41 | INFO | jvm 1 | at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.appendParameterClauseChunk(JRAbstractQueryExecuter.java:291)
2012/01/09 00:19:41 | INFO | jvm 1 | at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.appendQueryChunk(JRAbstractQueryExecuter.java:212)
2012/01/09 00:19:41 | INFO | jvm 1 | at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.parseQuery(JRAbstractQueryExecuter.java:197)
2012/01/09 00:19:41 | INFO | jvm 1 | at com.novell.reports.jasper.data.AutoDetectingDataProvider$QuerySubstitutionUtility.<init>(AutoDetectingDataProvider.java:178)
2012/01/09 00:19:41 | INFO | jvm 1 | at com.novell.reports.jasper.data.AutoDetectingDataProvider.setFullReportQueryString(AutoDetectingDataProvider.java:157)
2012/01/09 00:19:41 | INFO | jvm 1 | at com.novell.reports.jasper.data.AutoDetectingDataProvider.create(AutoDetectingDataProvider.java:68)
2012/01/09 00:19:41 | INFO | jvm 1 | at com.novell.reports.jasper.JasperReportManager$AsynchronousReportGenerator.runReport(JasperReportManager.java:597)
2012/01/09 00:19:41 | INFO | jvm 1 | at com.novell.reports.jasper.JasperReportManager$AsynchronousReportGenerator.startGeneration(JasperReportManager.java:398)
2012/01/09 00:19:41 | INFO | jvm 1 | at com.novell.reports.jasper.JasperReportManager.generateReport(JasperReportManager.java:225)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.ccs.comp.reporting.jasper.EJasperReportingService.generateReport(EJasperReportingService.java:258)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.ccs.comp.reporting.EReportingService.generateReport(EReportingService.java:529)
2012/01/09 00:19:41 | INFO | jvm 1 | at esecurity.db.object.ReportingServiceServerStub._generateReportById_(ReportingServiceServerStub.java:327)
2012/01/09 00:19:41 | INFO | jvm 1 | ... 11 more
2012/01/09 00:19:41 | INFO | jvm 1 |

--------------------


--
hkalyoncu
------------------------------------------------------------------------
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


The subject of this thread is misleading, because the problem came out
to be about using parameter values within SQL query.

Therefore I switched to a new thread: 'Bug while using string parameter
values in postgresql query'
(http://forums.novell.com/showthread.php?t=450687&p=2167593#post2167593)


--
hkalyoncu
------------------------------------------------------------------------
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=448853

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem while passing report parameters?


Hi

i'm trying to create a custom report for computer that includes the
number of days since the last logon and the number of days since the
last modification.

The Case i'm using for User Report is as followed:


CASE
WHEN COMPUTERS.lastLogonTimestamp > '01/01/1970' THEN DATEDIFF("d",
[lastLogonTimestamp], GETDATE())
ELSE NULL
END AS [Last Logon Days],


But it if i'm trying to use this case for Computer the report failed.
So I tried this case:


CASE
WHEN COMPUTERS.lastLogon > '0' THEN
convert(nvarchar(25),DATEDIFF(day, DATEADD(mi,([USERS].PWDLASTSET/
600000000) - 157258080 + DATEDIFF(Minute,GetUTCDate(),GetDate()),0) ,
GETDATE()))
ELSE NULL
END AS [Last Logon Days],


Even the report runs successful the results were more than stranges.


For Example:

Name: User1
Time Modified: 8/1/2013
Last Logon Timestamp: 8/1/2013
Last Logon: 130016939473877359
Last Logon days: 211 <=THIS SHOULD BE 5 DAYS.. :confused:


I'm pretty sure the first case on top with
[COMPUTERS.lastLogonTimestamp] would show the correct number of days,
but for some reason it works for Users report, but not for Computer
report.

Could you help me creating a report that displays the number of days of
[COMPUTERS.lastLogonTimestamp] and [COMPUTERS.WHENCHANGED].

Actually, if the make the case work for [COMPUTERS.lastLogonTimestamp],
then i guess i could easily copy the case and change the Attribute to
[COMPUTERS.WHENCHANGED], since they have the same date format.

Thanks,
Steven


--
Graf2134
------------------------------------------------------------------------
Graf2134's Profile: https://forums.netiq.com/member.php?userid=5626
View this thread: https://forums.netiq.com/showthread.php?t=2449

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.