#1 2021-03-24 10:21:53

AChater
Member
Registered: 2021-03-23

Substitutions error

Welcome everyone,

by following the instructions on the link : https://reportserver.net/en/guides/conf … Scheduler/
I wanted to schedule a report under the name : ${report.getId()} - ${RS_CURRENT_DATE} - §{now} - ${report.getName()} - Madrid - ${user.getUsername()}

but I get the following error:


javax.el.MethodNotFoundException: Method not found: class java.lang.String.getName()
    at javax.el.Util.findWrapper(Util.java:352)
    at javax.el.Util.findMethod(Util.java:214)
    at javax.el.BeanELResolver.invoke(BeanELResolver.java:174)
    at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161)
    at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161)
    at de.odysseus.el.util.SimpleResolver.invoke(SimpleResolver.java:135)
    at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:91)
    at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:100)
    at de.odysseus.el.tree.impl.ast.AstEval.eval(AstEval.java:51)
    at de.odysseus.el.tree.impl.ast.AstComposite.eval(AstComposite.java:35)
    at de.odysseus.el.tree.impl.ast.AstNode.getValue(AstNode.java:31)
    at de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122)
    at net.datenwerke.rs.utils.juel.JuelServiceImpl.evaluate(JuelServiceImpl.java:191)
    at net.datenwerke.rs.utils.juel.JuelServiceImpl.evaluate(JuelServiceImpl.java:177)
    at net.datenwerke.rs.utils.juel.SimpleJuel.parseAsObject(SimpleJuel.java:36)
    at net.datenwerke.rs.utils.juel.SimpleJuel.parse(SimpleJuel.java:28)
    at net.datenwerke.rs.scheduleasfile.service.scheduleasfile.action.ScheduleAsFileAction.execute(ScheduleAsFileAction.java:76)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeAction(SchedulerTask.java:495)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeActions(SchedulerTask.java:385)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.safeCall(SchedulerTask.java:209)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:101)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)


note that when I replace the name with §{now} - Madrid, I don't get an error and the report runs normally.

thank you in advance for your reply

Version of ReportServer is 3.0.2

Offline

#2 2021-03-24 10:55:04

Tobias F
Administrator
Registered: 2020-02-07

Re: Substitutions error

Hi AChater,

instead of §{now} try ${now}. There is a typo.

Regards,
Tobias

Offline

#3 2021-03-24 15:06:11

AChater
Member
Registered: 2021-03-23

Re: Substitutions error

Hello
thank you for your response.

I try it without ${now} I wrote just the name : ${report.getId()} - ${RS_CURRENT_DATE}  - ${report.getName()} - Madrid - ${user.getUsername()} and I have it return an error :


javax.el.MethodNotFoundException: Method not found: class java.lang.String.getId()
    at javax.el.Util.findWrapper(Util.java:352)
    at javax.el.Util.findMethod(Util.java:214)
    at javax.el.BeanELResolver.invoke(BeanELResolver.java:174)
    at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161)
    at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161)
    at de.odysseus.el.util.SimpleResolver.invoke(SimpleResolver.java:135)
    at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:91)
    at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:100)
    at de.odysseus.el.tree.impl.ast.AstEval.eval(AstEval.java:51)
    at de.odysseus.el.tree.impl.ast.AstComposite.eval(AstComposite.java:35)
    at de.odysseus.el.tree.impl.ast.AstNode.getValue(AstNode.java:31)
    at de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122)
    at net.datenwerke.rs.utils.juel.JuelServiceImpl.evaluate(JuelServiceImpl.java:191)
    at net.datenwerke.rs.utils.juel.JuelServiceImpl.evaluate(JuelServiceImpl.java:177)
    at net.datenwerke.rs.utils.juel.SimpleJuel.parseAsObject(SimpleJuel.java:36)
    at net.datenwerke.rs.utils.juel.SimpleJuel.parse(SimpleJuel.java:28)
    at net.datenwerke.rs.scheduleasfile.service.scheduleasfile.action.ScheduleAsFileAction.execute(ScheduleAsFileAction.java:76)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeAction(SchedulerTask.java:495)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeActions(SchedulerTask.java:385)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.safeCall(SchedulerTask.java:209)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:101)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

Also I need please to be able to adjust the period for which I want the data in all reports and know the possible options
thank you in advance for your reply

Version of ReportServer is 3.0.2

Last edited by AChater (2021-03-24 15:16:47)

Offline

#4 2021-03-24 15:33:18

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Substitutions error

Hi AChater,

I tried the following in scheduler.cf:

<attachment>
    <name>${report.getId()} - ${RS_CURRENT_DATE}  - ${report.getName()} - Madrid - ${user.getUsername()}</name>
</attachment>

and it works as expected. I get an attachment with this name for example:
108285 - 24.03.2021 0431 - RS_USER_VAR - Madrid - root.pdf

I tried with the newest 3.4.0 version, pls try with this version.

Also, don't forget to either reload configuration (config reload) or restart ReportServer after each change in scheduler.cf.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB