#1 2018-09-17 14:06:42

zach.mathew
Member
Registered: 2015-04-17

Getting an error when I'm running a jasper report with a stored proc

The JRXML has been uploaded on RS and the parameters have been configured correctly. We use postgresql. The query works fine off the DB (using PGAdmin) and the report is displayed correctly in the Preview Tab of JasperSoftStudio.

This is the error on RS :


Error: An error occurred during report execution.
The report could not be executed: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: MainStoreStockBalanceAsOfDt_MainStoreStockBalanceDS_1537192375401_868996.
To get help please contact an administrator.
Details
net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: MainStoreStockBalanceAsOfDt_MainStoreStockBalanceDS_1537192375401_868996. at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:218) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:119) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exeucteReport(ReportExportServlet.java:535)
at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doExportReport(ReportExportServlet.java:416) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReport(ReportExportServlet.java:346) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReportViaSession(ReportExportServlet.java:339) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doGet(ReportExportServlet.java:168) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$535e5d3.CGLIB$doGet$9() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$535e5d3$$FastClassByGuice$$3903e5d5.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at

net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$535e5d3.doGet() at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$535e5d3.CGLIB$service$18() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$535e5d3$$FastClassByGuice$$3903e5d5.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at

net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$535e5d3.service() at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) at

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: MainStoreStockBalanceAsOfDt_MainStoreStockBalanceDS_1537192375401_868996. at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:886) at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport(FillTableSubreport.java:172) at net.sf.jasperreports.components.table.fill.FillTable.prepare(FillTable.java:419) at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:150) at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:352) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:421) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:396) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2028) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:752) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:259) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:119) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558) at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:91) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:456) at net.datenwerke.rs.base.service.reportengines.jasper.JasperReportEngine.executeReport(JasperReportEngine.java:291) at net.datenwerke.rs.base.service.reportengines.jasper.JasperReportEngine.doExecute(JasperReportEngine.java:104) at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:148) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186) ... 57 more Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: MainStoreStockBalanceAsOfDt_MainStoreStockBalanceDS_1537192375401_868996. at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:342) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1129) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696) at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:437) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:526) at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:742) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:58) at

net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:216) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ... 1 more Caused by: org.postgresql.util.PSQLException: ERROR: cannot execute CREATE TABLE AS in a read-only transaction Where: SQL statement "CREATE TEMP TABLE period_batches ON COMMIT DROP AS    select 'MAIN STORE' as store, cast(null as varchar) as itemtype, cast(null as varchar) as genericname, cast(null as varchar) as brandname, verfstoreb7_.id as msb_id, cast(null as varchar) as batch, 0.00 as cost_org_uom, 0.00 as gst_rate, deptstoret3_.mainStoreqtyAvbl as open_bal, case when deptstoret0_.bTransferIn=true then -deptstoret3_.qtyTransferred else deptstoret3_.qtyTransferred end as trans_qty, 'TRANSFER' as trans_type, deptstoret3_.createTime as last_trans_time    from DEPTStoreTransferInOut deptstoret0_ inner join DEPTStoreTransferInOut_DEPTStoreTransferInOutDetail lineitems2_ on deptstoret0_.id=lineitems2_.DEPTStoreTransferInOut_id inner join DEPTStoreTransferInOutDetail deptstoret3_ on lineitems2_.lineItems_id=deptstoret3_.id left outer join VERFStoreBalances verfstoreb4_ on deptstoret3_.mainStoreItem_id=verfstoreb4_.id left outer join DEPTStoreBalance deptstoreb5_ on deptstoret3_.deptStoreBalance_id=deptstoreb5_.id left outer join VERFStoreBalances verfstoreb6_ on deptstoreb5_.mainStoreBalance_id=verfstoreb6_.id, VERFStoreBalances verfstoreb7_ where (verfstoreb7_.id = verfstoreb4_.id or verfstoreb7_.id = verfstoreb6_.id) and deptstoret3_.createTime < close_date and verfstoreb7_.lastupdatetime > close_date order by verfstoreb7_.id" PL/pgSQL function closing_balance_main_store(timestamp without time zone) line 8 at SQL statement at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1418) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:332) ... 11 more


Any Ideas ?

Offline

#2 2018-09-18 09:18:01

palacio
Member
Registered: 2018-06-27

Re: Getting an error when I'm running a jasper report with a stored proc

zach.mathew wrote:

Error: An error occurred during report execution.
The report could not be executed: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: MainStoreStockBalanceAsOfDt_MainStoreStockBalanceDS_1537192375401_868996.
To get help please contact an administrator.
Details
net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: MainStoreStockBalanceAsOfDt_MainStoreStockBalanceDS_1537192375401_868996. at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:218) at


Hi zach,

I have not yet had this error but some analysis points can help you.

  - Does your main report have sub-reports?
  - Your RS version?

NB:  RS is a very good tools. Note that your reports can run correctly in JasperReports tools but you have to make sometime a few change to adapt it in RS concept.
       That is my little experience.

Regards,
El Palacio

Offline

#3 2018-09-19 06:40:46

zach.mathew
Member
Registered: 2015-04-17

Re: Getting an error when I'm running a jasper report with a stored proc

Hi palacio,

Thanks for your reply.

To answer your questions :

1. No, I'm not using subreports for this particular report
2. My RS version is
RS3.0.2-5855
2016-05-29-17-55-24

Please feel free to ask any more details.

Thanks,

Zach

Offline

#4 2018-09-25 07:40:20

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Getting an error when I'm running a jasper report with a stored proc

Hi Zach,

check here https://forum.reportserver.net/viewtopic.php?id=127 (#3) for some information on stored procedures with reportserver.

If this does not help, please post a *minimal* report that throws the error you say.
Can you please also try with the latest 3.0.4 reportserver version?

Regards,
Eduardo

Offline

#5 2018-10-03 06:29:04

zach.mathew
Member
Registered: 2015-04-17

Re: Getting an error when I'm running a jasper report with a stored proc

Hi Eduardo,

Thanks for your reply. I have a stored procedure called closing_balance_main_store. I call this procedure in the table dataset query (in the jrxml) and put the output in a table.

Here is a stripped down version of the report I'm trying to run :

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports [url=http://jasperreports.sourceforge.net/xsd/jasperreport.xsd]http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"[/url] name="MainStoreStockBalanceAsOfDt" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="744" leftMargin="56" rightMargin="42" topMargin="42" bottomMargin="20" uuid="7cdc4034-026f-4b2b-ae26-14f88ea1cd07">
	<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="ecdb"/>
	<property name="com.jaspersoft.studio.unit.topMargin" value="mm"/>
	<property name="com.jaspersoft.studio.unit.leftMargin" value="mm"/>
	<property name="com.jaspersoft.studio.unit.rightMargin" value="mm"/>
	<property name="com.jaspersoft.studio.unit." value="pixel"/>
	<property name="com.jaspersoft.studio.report.description" value="Ability to enquire the stock balance as of a date in the past"/>
	<subDataset name="MainStoreStockBalanceDS" uuid="5f483c19-3db7-42de-99c5-0615d0c73ec3">
		<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
		<property name="com.jaspersoft.studio.data.defaultdataadapter" value="DataAdapter.xml"/>
		<parameter name="startdate_t" class="java.util.Date"/>
		<queryString language="SQL">
			<![CDATA[select * from closing_balance_main_store($P{startdate_t})]]>
		</queryString>
		<field name="store" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="store"/>
		</field>
		<field name="itemtype" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="itemtype"/>
		</field>
		<field name="genericname" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="genericname"/>
		</field>
		<field name="brandname" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="brandname"/>
		</field>
		<field name="batchnumber" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="batchnumber"/>
		</field>
		<field name="cost_org_uom" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="cost_org_uom"/>
		</field>
		<field name="gst_rate" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="gst_rate"/>
		</field>
		<field name="closing_balance" class="java.lang.Integer">
			<property name="com.jaspersoft.studio.field.label" value="closing_balance"/>
		</field>
		<field name="value" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="value"/>
		</field>
		<field name="tax_amt" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="tax_amt"/>
		</field>
		<field name="total_value" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="total_value"/>
		</field>
		<variable name="v_sumVal" class="java.math.BigDecimal" calculation="Sum">
			<variableExpression><![CDATA[$F{value}]]></variableExpression>
		</variable>
		<variable name="v_sumTax" class="java.math.BigDecimal" calculation="Sum">
			<variableExpression><![CDATA[$F{tax_amt}]]></variableExpression>
		</variable>
		<variable name="v_sumTotVal" class="java.math.BigDecimal" calculation="Sum">
			<variableExpression><![CDATA[$F{total_value}]]></variableExpression>
		</variable>
		<group name="store">
			<groupExpression><![CDATA[$F{store}]]></groupExpression>
		</group>
	</subDataset>
	<parameter name="startdate" class="java.util.Date">
		<parameterDescription><![CDATA[]]></parameterDescription>
	</parameter>
	<queryString language="SQL">
		<![CDATA[select 1]]>
	</queryString>
	<background>
		<band splitType="Stretch"/>
	</background>
	<detail>
		<band height="110">
			<textField>
				<reportElement x="0" y="3" width="554" height="16" forecolor="#006633" uuid="61628796-010a-4a60-88ae-d6474ecb73a7"/>
				<textElement verticalAlignment="Middle">
					<font fontName="Arial" size="10" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA["Detailed Report"]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="19" width="496" height="11" uuid="2d9c68ab-3f60-4d12-908d-db03732c9bd7"/>
				<textElement>
					<font fontName="Arial" size="8"/>
				</textElement>
				<text><![CDATA[The batch level detailed listing of the stock position in the Central Store]]></text>
			</staticText>
			<componentElement>
				<reportElement x="1" y="40" width="741" height="70" uuid="9d154df3-52b6-4d48-b783-58288db19272">
					<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
					<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
					<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
					<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
				</reportElement>
				<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components [url=http://jasperreports.sourceforge.net/xsd/components.xsd>]http://jasperreports.sourceforge.net/xsd/components.xsd">[/url]
					<datasetRun subDataset="MainStoreStockBalanceDS" uuid="4cc826ea-311e-4d5a-8906-1b6096b6bf31">
						<datasetParameter name="startdate_t">
							<datasetParameterExpression><![CDATA[$P{startdate}]]></datasetParameterExpression>
						</datasetParameter>
						<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					</datasetRun>
					<jr:column width="90" uuid="1e96f94b-f40b-46c9-856a-cde8d2df88ba">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
						<jr:columnHeader height="20" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="90" height="20" uuid="42c51c8a-68c2-47ac-9637-cd4590e01b6e"/>
								<text><![CDATA[Item Type]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell height="20">
							<textField>
								<reportElement x="0" y="0" width="90" height="20" uuid="2f72eda4-b738-4300-85c5-73c9a94ba394"/>
								<textFieldExpression><![CDATA[$F{itemtype}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="160" uuid="68de7e85-75cc-40b3-853b-4de28a7cd740">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
						<jr:columnHeader height="20" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="160" height="20" uuid="950c7c44-44c7-4043-8cd2-d677f747b27d"/>
								<text><![CDATA[Generic Name]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell height="20">
							<textField>
								<reportElement x="0" y="0" width="160" height="20" uuid="525722a2-adbe-4fda-9a60-1d06b66dbc0d"/>
								<textFieldExpression><![CDATA[$F{genericname}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="100" uuid="1cc288f5-f207-44ec-bd9e-d1656efbf88e">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
						<jr:columnHeader height="20" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="100" height="20" uuid="43a065fd-d5b0-40c0-adb6-d0346f1da024"/>
								<text><![CDATA[Brand Name]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell height="20">
							<textField>
								<reportElement x="0" y="0" width="100" height="20" uuid="53d65c1b-776b-4745-af39-09235d0a7845"/>
								<textFieldExpression><![CDATA[$F{brandname}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="48" uuid="bccaf441-630b-4a4a-b580-16ad5956fa17">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
						<jr:columnHeader height="20" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="48" height="20" uuid="c4a0612d-6bb7-4dc6-88d9-7f0be8409629"/>
								<text><![CDATA[Batch]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell height="20">
							<textField>
								<reportElement x="0" y="0" width="48" height="20" uuid="7725a29a-381f-401e-8069-01396cf016b3"/>
								<textFieldExpression><![CDATA[$F{batchnumber}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:columnGroup width="152" uuid="416b7820-5562-4055-8e79-6e5fa1b1112a">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Columns [3]"/>
						<jr:groupFooter groupName="store">
							<jr:cell height="20" rowSpan="1">
								<textField>
									<reportElement x="0" y="0" width="152" height="20" uuid="c1179dcd-5638-425d-9f81-e9a5b41bc43c"/>
									<textElement textAlignment="Right"/>
									<textFieldExpression><![CDATA["Central Store Stock Value"]]></textFieldExpression>
								</textField>
							</jr:cell>
						</jr:groupFooter>
						<jr:column width="50" uuid="db33aef6-8361-4e39-9494-76bfe4bbcfcf">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/>
							<jr:groupFooter groupName="store">
								<jr:cell height="0" rowSpan="1"/>
							</jr:groupFooter>
							<jr:columnHeader height="20" rowSpan="1">
								<staticText>
									<reportElement x="0" y="0" width="50" height="20" uuid="dd3a295d-5d9c-4b73-8a41-3677893c010a"/>
									<text><![CDATA[Cost]]></text>
								</staticText>
							</jr:columnHeader>
							<jr:detailCell height="20">
								<textField>
									<reportElement x="0" y="0" width="50" height="20" uuid="73e94f2d-6bbf-4562-95e3-3b8071ed78e0"/>
									<textFieldExpression><![CDATA[$F{cost_org_uom}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="50" uuid="fa9ef1c4-7305-42fa-a858-92240df7ff46">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column6"/>
							<jr:groupFooter groupName="store">
								<jr:cell height="0" rowSpan="1"/>
							</jr:groupFooter>
							<jr:columnHeader height="20" rowSpan="1">
								<staticText>
									<reportElement x="0" y="0" width="50" height="20" uuid="5c92d22e-f2cf-4d1c-94dd-9546736e3eff"/>
									<textElement textAlignment="Center"/>
									<text><![CDATA[GST %]]></text>
								</staticText>
							</jr:columnHeader>
							<jr:detailCell height="20">
								<textField>
									<reportElement x="0" y="0" width="50" height="20" uuid="9d672cf0-8a24-4d21-bd86-c8869a240c37"/>
									<textElement textAlignment="Center"/>
									<textFieldExpression><![CDATA[$F{gst_rate}.multiply(new BigDecimal(100))]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="52" uuid="602b4d1e-c74b-421f-9058-ce816108ef56">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column7"/>
							<jr:groupFooter groupName="store">
								<jr:cell height="0" rowSpan="1"/>
							</jr:groupFooter>
							<jr:columnHeader height="20" rowSpan="1">
								<staticText>
									<reportElement x="0" y="0" width="52" height="20" uuid="2dbf6dee-c98d-4fe0-a3e4-fc29f499f450"/>
									<text><![CDATA[Closing Bal]]></text>
								</staticText>
							</jr:columnHeader>
							<jr:detailCell height="20">
								<textField>
									<reportElement x="0" y="0" width="52" height="20" uuid="2eefda12-52df-4a74-aa24-124a4af39778"/>
									<textFieldExpression><![CDATA[$F{closing_balance}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
					</jr:columnGroup>
					<jr:column width="70" uuid="008da1a2-45ec-48c6-9a6d-110fa284abe4">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column8"/>
						<jr:groupFooter groupName="store">
							<jr:cell height="20" rowSpan="2">
								<textField pattern="#,##0.00#">
									<reportElement isPrintRepeatedValues="false" x="0" y="0" width="70" height="20" uuid="b8c19480-3764-4cbe-8175-a069b3ec449a"/>
									<textElement>
										<font isBold="true"/>
									</textElement>
									<textFieldExpression><![CDATA[$V{v_sumVal}]]></textFieldExpression>
								</textField>
							</jr:cell>
						</jr:groupFooter>
						<jr:columnHeader height="20" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="70" height="20" uuid="7dd47128-c15d-4090-a70b-d2d4a06da106"/>
								<text><![CDATA[Value]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell height="20">
							<textField>
								<reportElement x="0" y="0" width="70" height="20" uuid="d584c29c-21e3-4258-9a99-fbf07bab77b0"/>
								<textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="50" uuid="387d12eb-f9d6-45f1-a28f-6bfc11444fec">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column9"/>
						<jr:groupFooter groupName="store">
							<jr:cell height="20" rowSpan="2">
								<textField pattern="#,##0.00#">
									<reportElement isPrintRepeatedValues="false" x="0" y="0" width="50" height="20" uuid="656d76dd-52ea-4535-885a-adf0554ac22c"/>
									<textElement>
										<font isBold="true"/>
									</textElement>
									<textFieldExpression><![CDATA[$V{v_sumTax}]]></textFieldExpression>
								</textField>
							</jr:cell>
						</jr:groupFooter>
						<jr:columnHeader height="20" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="50" height="20" uuid="4c8eb47b-db6c-486c-9382-5fe3e1501584"/>
								<text><![CDATA[Tax Amount]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell height="20">
							<textField>
								<reportElement x="0" y="0" width="50" height="20" uuid="287a995d-442e-48f7-9d0f-9d770df8002b"/>
								<textFieldExpression><![CDATA[$F{tax_amt}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="71" uuid="ef8823e6-d741-423d-9849-5f2c237fe042">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column10"/>
						<jr:groupFooter groupName="store">
							<jr:cell height="20" rowSpan="2">
								<textField pattern="#,##0.00#">
									<reportElement isPrintRepeatedValues="false" x="0" y="0" width="71" height="20" uuid="a52d03d9-4d97-420b-a92b-6d5a63dcd0a5"/>
									<textElement>
										<font isBold="true"/>
									</textElement>
									<textFieldExpression><![CDATA[$V{v_sumTotVal}]]></textFieldExpression>
								</textField>
							</jr:cell>
						</jr:groupFooter>
						<jr:columnHeader height="20" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="71" height="20" uuid="95ca7793-2937-44a7-8591-f66725567f3a"/>
								<text><![CDATA[Total Value]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell height="20">
							<textField>
								<reportElement x="0" y="0" width="71" height="20" uuid="09b296d7-73ab-4ea9-be4b-5a7d35265951"/>
								<textFieldExpression><![CDATA[$F{total_value}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
				</jr:table>
			</componentElement>
		</band>
	</detail>
</jasperReport>

Last edited by zach.mathew (2018-10-03 09:32:32)

Offline

#6 2018-10-03 06:36:47

zach.mathew
Member
Registered: 2015-04-17

Re: Getting an error when I'm running a jasper report with a stored proc

I tried with the latest ReportServer 3.0.4 and I get the same error as before.

Thanks,

Zach

Offline

#7 2018-10-11 07:42:24

zach.mathew
Member
Registered: 2015-04-17

Re: Getting an error when I'm running a jasper report with a stored proc

Still have the issue...Can someone please respond ?

Offline

#8 2018-10-16 07:21:52

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Getting an error when I'm running a jasper report with a stored proc

Hi Zach,

we are looking into this in this ticket: RS-3084

I will update here when I have more information.

Regards,
Eduardo

Offline

#9 2018-10-16 07:31:10

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Getting an error when I'm running a jasper report with a stored proc

Hi Zach,

as I mentioned here: https://forum.reportserver.net/viewtopic.php?pid=4890
please try the script in the thread with reportserver enterprise evaluation.

Regards,
Eduardo

Offline

#10 2018-10-16 07:36:19

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Getting an error when I'm running a jasper report with a stored proc

Please post here the results of your tests. If this works, we may include an option in future versions of reportserver to allow this without scripting.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB