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

ianfouldsx-act.co.uk

Members
  • Posts

    12
  • Joined

  • Last visited

ianfouldsx-act.co.uk's Achievements

Apprentice

Apprentice (3/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. In the Community Edition, you can assign users and roles. The repository folders, reports and resources can be assigned permissions based on roles so you can manage access to individual reports or grouped reports in a folder. This does mean that users will have to log in to the report server with app specific credentials, https://community.jaspersoft.com/documentation/jasperreports-server-administration-guide/v550/overview-users-and-roles Apparently you can also integrate JasperReports with LDAP. I haven't done this but I did find a post where someone has been through the pain of getting it working and shared their experience. https://community.jaspersoft.com/wiki/easily-integrate-tibco-jasperreports-server-community-edition-kerberosldap-sso-ms-ad Hope this helps.
  2. I'm getting an error when I run a report on JasperReports Server that uses my custom functions library. I'm trying to get JasperReports Server CE 7.8.1 running in a docker container to roughly match the environment of my customer. Here is my setup: Host: Windows 11 Container: Ubuntu 22.04.1 LTS google-chrome-stable_current_amd64.deb TIB_js-jrs-cp_7.8.0_linux_x86_64.run TIB_js-jrs_cp_7.8.1_sp.zip All the above are installed and running after a lot of time debugging numerous crashes when trying to run the report server. It was lengthy and painful! However there are some custom functions that I need to install on the server. I am pretty sure I've got this right, it was a long time ago I originally did this for my customer, and there is not a good concise document that really clearly explains how to go about this! The problem occurs when I run a report that uses these custom functions. The JAR file for the functions is a copy of the running JAR on my customers installation, I can however rebuild this in JS Studio, currently 6.17.0. For reference this is what I've done to install them: 1. Copy the custom functions JAR to WEB-INF/lib. 2. Append the following to WEB-INF/classes/jasperreports_extension.properties: net.sf.jasperreports.extension.registry.factory.functions=net.sf.jasperreports.functions.FunctionsRegistryFactory net.sf.jasperreports.extension.functions.cmtcustomfunctions=cmt.customfunctions.CMTCustomFunctions This is the error I get in the jasperserver.log: ERROR DefaultExtensionsRegistry,http-nio-8080-exec-4:213 - Error instantiating extensions registry for functions from file:/opt/jasperreports-server-cp-7.8.1/apache-tomcat/webapps/jasperserver/WEB-INF/classes/jasperreports_extension.properties net.sf.jasperreports.engine.JRRuntimeException: Could not load class net.sf.jasperreports.functions.FunctionsRegistryFactory . at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:72) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:298) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:274) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:194) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:157) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:129) at net.sf.jasperreports.engine.DefaultJasperReportsContext.getExtensions(DefaultJasperReportsContext.java:277) at net.sf.jasperreports.engine.component.ComponentsEnvironment.findBundles(ComponentsEnvironment.java:111) at net.sf.jasperreports.engine.component.ComponentsEnvironment.getCachedBundles(ComponentsEnvironment.java:101) at net.sf.jasperreports.engine.component.ComponentsEnvironment.getBundles(ComponentsEnvironment.java:89) at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.getSchemaLocations(JRReportSaxParserFactory.java:103) at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.configureParser(BaseSaxParserFactory.java:163) at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.createParser(BaseSaxParserFactory.java:118) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1601) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1570) ..... I have grepped the WEB-INF folder for FunctionsRegistryFactory and it's found in a JAR file: grep -r FunctionsRegistryFactory grep: lib/jasperreports-6.14.0.jar: binary file matches I would be grateful if someone could point me towards why this is crashing. This may have something to do with the 7.8.1 update as I'm sure this worked OK in 7.8.0. I'll try and see if I can test this, but honestly I've already wasted 2 days getting to this point and it is costing me a lot of lost time on various projects. We really could do with a more robust installation process and clearer documentation about all of this. It's very patchy or old. Many thanks in anticipation.
  3. I discovered another cause of this as a result of using systemd to run the reports server as a service. I had used this article as a guide to configure the service - http://sharpe-s-ux.blogspot.com/2017/04/how-to-run-jasperserver-630-via-systemd.html However the PID file specified did not exist so systemd restarted the report server every 15 minutes. You need to use the PID of the Catalina Tomcat server which is generally located in the installation apache-tomcat folder. In my case it was /opt/jasperreports-server-cp-7.8.0/apache-tomcat/temp/catalina.pid Check out your /var/log/messages file and look for systemd starting and stopping the jasper service. [unit] Description=Jasper Server 7.8.0 After=syslog.target After=network.target [service] Type=forking User=apache Group=apache Restart=on-failure PIDFile=/run/jasper_server.pid ***** THIS IS THE ERROR LINE ***** PIDFile=/opt/jasperreports-server-cp-7.8.0/apache-tomcat/temp/catalina.pid ***** IT SHOULD BE THIS FOR 7.8.0 ***** KillMode=mixed ExecStart=/opt/jasperreports-server-cp-7.8.0/ctlscript.sh start ExecStop=/opt/jasperreports-server-cp-7.8.0/ctlscript.sh stop RestartSec=10s TimeoutSec=900 ***** THIS IS WHAT MAKES IT RESTART EVERY 15 MINUTES IF IT CAN'T FIND THE PID FILE ***** [install] WantedBy=multi-user.target
  4. Many thanks for the comment. I've created a bug report here, http://community.jaspersoft.com/jaspersoft-studio/issues/4746. I did look for the bug report submission page in the menus but couldn't find it. I must have been suffering from temporary blindness as it's very obvious at the bottom of the page!
  5. Hi, I'm using Jaspersoft Studio 6.0.1 final and I would like to get return values from a sub-dataset used in a table element within the main report. Looking at the settings there is clearly a feature that should allow this but it seems to be functiong in compeltely the wrong way, and the UI seesm to suggest it works the same way as parameters. From my understanding the flow should be as follows: Main dataset parameters -> (Paramters mapping) -> sub-dataset parameters Sub dataset variables -> (Return Values mapping) -> main report variables If you look at the settings for a Table Dataset definition you will see 'Return Values which are configured just the same as those of a Sub-Report, however they seem to be working the wrong way: When you open up the 'Return Values' dialog and add new new value it seems ot be working the wrong way round, the 'From Variable' list is empty and expects you to type in a name - I think this should be a list of variables in the Sub-Dataset. The 'To Variable' lists the variables in the Sub-Dataset and not the variables in the Main Report, see what I mean about the wrong way round: You may think I've got it wrong - Jaspersoft must know what they are doing, right? - but if you type the name of a variable in your main report into 'From Variable' it wont compile and fails with an error 'Return value destination value not found'. If you then create a variable in the Sub-Dataset to match the name of the 'From Variable' and a variable in the Main Report to match the 'To Variable' the report compiles. You may think your now onto a winner - wrong! All you seem to get are null values at either end of the link, nothing seems to be propergating between the sub dataset and the main report in any direction. Another problem seems to be with the Incrementer Factory Class, having saved your return value as above it creates an empty attribute in the JRXML which fails to compile: <returnValue fromVariable="w_test" toVariable="amount_total" incrementerFactoryClass=""/>[/code]If you remove the incrementerFactoryClass attribute your report will compile, you can also manually change the to and from variabke names here to work the way it should, this also solves the 'Return value destination value not found' error but still nothing is propergated between the dataset and main report. I don't think I'm going mad, I may be though, but this seems like an unfinished, untested forgotten about feature that needs some work. I'd really like to be able to use it to save writing bunches of sub queries in my main report to return values that I get in my sub-datasets. I'd love to see this fixed please.
  6. Hi Rajesh Many thanks for your reply and test reports. They did indeed work when I tried them, I also managed to get another test report working without too much effort as well using your example as a base model. I think my problem was using the incorrect data source linkage from the main report to the sub report, then experimenting with connections to the tables all of which ended in a total mess. So for anyone else having similar nightmares with this, I'd like to summarise what Rajesh sorted out for me and what I am trying to do: 1. Create a main report with an MS SQL datasource, this main report does not list any records its self, just pulls in the subreports. 2. All the reports reports in my scenario are using the same MS SQL datasource. 3. The main report Dataset is filled with the query: 'SELECT NULL AS Empty;', this returns one record only ** Important** 4. I have 2 subreports, each in a seperate detail band in the report **important if you have more than one subreport** 5. The subreports connections are linked with: Connection Expression $P{REPORT_CONNECTION} 6. The tables in the subreports also use the same SQL connection. The table Datasets in each subreport are linked with 'Use the same connection used to fill the master report'. Rajesh once again thank you very much, this is all now working as I intended. It's a pity we can't attach files to posts as your test case would be invaluable I think as a simple demonstration of linking a main report to a sub report with tables. Regards
  7. Hi, I'm hoping someone can point me in the right direction here, I'm having problems with subreports that contain tables. The reports are not neccesarily complex, the datasource in all cases is MS SQL and all the reports and tables use the same source but with different queries. I have managed to link the main report and subreport and get data to be displayed for simple cases, i.e. no tables using $P{REPORT_CONNECTION} in the Data Source Expresson in the top level report. Using an SQL select for the results in the detail section all is working well. However when I introduce a table into the sub report it just does not work when run as a subreport, everything works OK when the subreport is viewed as a stand-alone but not when run from the main report. Again just to emphasise, Main report -> subreport is OK and data is shown, main report -> subreport -> table does not display any results. For the Dataset definition of the table in the subreport I have tried all of the obvious things, 'Use the same connection as the master report, $P{REPORT_CONNECTION}, blah blah, clearly there is some guru magic required here to get it work. The whole scenario of subreports not working out of the box seems utterly bizare to me, if a report is designed with a datasource and datasets surely by default it should use these definitions. However I can see a flaw in this in that when a subreport is imported into JasperServer it is stored just as a resource with no definition as is a normal report. I would suggest that the datasource deletion that must occur when a subreport is run is because of this design flaw in the JasperServer, if subreports had definitions just like normal reports you wouldn't have this constant headache for developers. Subreports in my mind should just run without requiring any bizarre changes from running as a stand-alone report. Any help would be appreciated, this has been causing me grief now for several days and I'm beginning to think about looking for another BI system. Many thanks.
  8. Changed Assigned User from - to @User_306070 I too spent a very frustrating day trying to get custom functions working in 5.6.2 without any success. I installed 5.5.2 and I saw the custom functions in the expression editor, I then installed 5.6.1 and again all was well.This is a bug in 5.6.2. If you use custom functions do not use 5.6.2, use 5.6.1 and it will work.
×
×
  • Create New...