bolsover
-
Posts
59 -
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 bolsover
-
-
I have defined a custom ReportDataSourceService that will be used to generate a specialised JRBeanCollectionDataSource from data retrieved from the database. The data needs to be extensively manipulated before it is presented to the user.
The problem I now face is that of applying some parameters to the data.
How do I pass parameters from Jasperserver to the ReportDataSourceService? For example, I need to pass two dates to the service so that I can use these BEFORE the JRBeanCollectionDataSource is passed to the report.
Regards, David
-
I'm using 5.5 also - but I did not use applicationContext-externalAuth-LDAP.xml
To help with my debugging, I did adjust the server logging levels as described here:
http://support.microsoft.com/kb/314980
-
I too went through LDAP authentication hell - but did eventually get this working. The first thing is to discover the correct value for the userDN property - it most likely is NOT at all obvious..
Use "dsquery user -samid YourUsername" at the domain server command line to get the correct value!!
The ONLY file I edited was applicationContext-security.xml Here are the relevant parts:
<bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager"> <property name="providers"> <list> <ref local="ldapAuthenticationProvider"/> <ref bean="${bean.daoAuthenticationProvider}"/> <!-- <ref local="anonymousAuthenticationProvider"/> anonymousAuthenticationProvider only needed if filterInvocationInterceptor.alwaysReauthenticate is set to true <ref bean="anonymousAuthenticationProvider"/> --> <!-- ref local="jaasAuthenticationProvider"/ --> </list> </property> </bean> <bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource"> <constructor-arg value="ldap://SERVER.DOMAIN:389/" /> <!-- userDn and password properties are not needed if LDAP server accepts anonymous lookup --> <property name="userDn"> <!-- results of dsquery user -samid usermane go here --> <value>CN=YourUser,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=yourdc,DC=local</value> </property> <property name="password"> <value>mypassword</value> </property> </bean> <bean id="ldapAuthenticationProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider"> <constructor-arg> <bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"> <constructor-arg> <ref local="ldapContextSource"/> </constructor-arg> <property name="userSearch" ref="userSearch"/> </bean> </constructor-arg> </bean> <bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch"> <constructor-arg index="0"> <value>OU=SBSUsers,OU=Users,OU=MyBusiness,DC=yourdc,DC=local</value> </constructor-arg> <constructor-arg index="1"> <value>(sAMAccountName={0})</value> </constructor-arg> <constructor-arg index="2"> <ref local="ldapContextSource" /> </constructor-arg> <property name="searchSubtree"> <value>true</value> </property> </bean>[/code]
-
$F{FieldA}.endsWith("01") ? "ValueIfTrue" : ValueIfFalse"
or
$F{FieldA}.contains("01") ? "ValueIfTrue" : ValueIfFalse"
or
$F{FieldA}.startsWith("01") ? "ValueIfTrue" : ValueIfFalse"
-
So you need a new Variable...
Assuming Java syntax:
$F{FieldA}.substring($F{FieldA}.length()-2, $F{FieldA}.length())
-
As the error says, your report .JRXML is invalid.
The problem arises when you try to find the cause - I recently saw this associated with a duplicate parameter in a sub-report - but there can be any number of reasons.
Just a suspicion - but I don't think the latest jasper studio (5.5.2) is as good at highlighting the problem as the previous (5.5.1) version or the beta 5.6 versions.
You could try posting your .jrxml - but there is no guarantee anyone will be able to spot the error!!
-
It would be helpful if you post the full query.
-
Instead of using the IF() function and assuming you are using Java as the language you could try:
$F{GENDER}.trim().equals("Men") ? 1 : 0
The IF() function will always return null when the argument is null.
To modify my suggestion to account for null values, you would need something like:
$F{GENDER} != null && $F{GENDER}.trim().equals("Men") ? 1 : 0 db
-
After much searching, I found a couple of references to using hibernate adapters - but no definitive 'this is how you configure jaspersoft studio to use hibernate'.
Is there any documentation? What version of hibernate does Jaspersoft studio support? What are the required .jars? Where do I put the required .jars?
I've been using Hibernate for years and have numerous working projects that use Hibernate with JasperReports - but I'm completely stuck with this - after hours of TargetinvocationExceptions, I've given up...
Any help or pointers would be most welcome.
db
-
I just managed to get hold of 5.5.1 - in some respects it 'appears' better than 5.5.0 - but has a SERIOUS problem - it does not save .jrxml.
Environment is win 8.1 x64 JRE/JDK 1.7.0_45
Going back to 5.5.0 for now.
-
I found that I could solve the problem I had by removing certain characters from the data field causing problems: , ,
For some reason, in some circumstances, these particular codes cause a CR without LF with resultant corrupted output.
When I get time, I'll test with a font extension.
db
-
Hi all
I have a main report that has it's data supplied by JRBeanCollectionDataSource with some additional data supplied from a Map of parameters, each of which is a POJO.
I now want to include some additional tabular data (as a subreport) in the foot of my report where the data is also supplied from a JRBeanCollectionDataSource but where the data is linked to a property of one of the main report parameters.
I understand how to insert a subreport and I can define the fields the subreport can contain - but how do I populate the subreport JRBeanCollectionDataSource?
db
-
Problem not fixed in 4.1.1 and spcace after field expression does not solve either.
:-(
-
Netbeans 7.0
iReport plugin 4.0.2
I'm having problems with the netbeans plugin; it will hang if I open the edit expression dialog - but is OK if I edit the expression in-place.
Has anyone elese seen this problem? How can I debug? - No IDE log errors availabe since the IDE is hung.
db
-
Should be possible although I've never actually done myself.
Have you got a working JDBC connection to the server? This is certainly possible - just needs the apropriate driver...
-
I've been working with iReport for some time now and have no particular problems passing collections of data to my reports..
ReportFrame rf = new ReportFrame("manufacture2.jasper", new JRBeanCollectionDataSource(data), parameters);
I can use fields within the passed data in the body of my report.
I now want to use the same data but presented within a table - but just end up with null values; do I need to do somthing special to use the data withing the table? or am I missing somthing fundamental?
db
How to Pass Parameters to a custom ReportDataSourceService
in Products
Posted
Problem solved
I got the solution.