Jump to content

bolsover

Members
  • 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

  1. 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

     

  2. 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]

     

  3. 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!!

  4. 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

  5. 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 

     

  6. 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

     

  7. 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

     

     

  8. 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

     

  9. 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 

     

     

     

×
×
  • Create New...