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

baggypants

Members
  • Posts

    213
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by baggypants

  1. Right click the default2 folder in the repository tree and select "Set as Active Theme" this dosn't appear if it's alread set as the active theme.

     

    Also you don't have to download and install all the files as the new theme. just the ones you have changed. so in my theme folder I have the new logo in the Images directory, a new theme.css and PageSpecific.css and thats about it

    Finally, this forum is purely for help regarding creating jrxml report file. there is a forum for asking questions about JasperReports Server here:

    http://jasperforge.org/projects/jasperserver/forum/



    Post Edited by baggypants at 03/18/2011 10:23
  2. I just split the date into component parts using a view

    <Dimension type="TimeDimension" name="Period">
        <Hierarchy name="" hasAll="true" primaryKey="ID">
          <View alias="TIMEVIEW">
            <SQL dialect="generic">
              <![CDATA[sELECT
    TRANSACTIONS.ID AS ID,
    EXTRACT(YEAR FROM TRANSACTIONS.TRANS_DATE) AS YEAR,
    EXTRACT(MONTH FROM TRANSACTIONS.TRANS_DATE) AS MONTH,
    EXTRACT(DAY FROM TRANSACTIONS.TRANS_DATE) AS DAY
    FROM TRANSACTIONS]]>
            </SQL>
          </View>
          <Level name="YEAR" column="YEAR" type="String" uniqueMembers="true" levelType="TimeYears">
          </Level>
          <Level name="MONTH" column="MONTH" type="String" uniqueMembers="false" levelType="TimeMonths">
          </Level>
          <Level name="DAY" column="DAY" type="String" uniqueMembers="false" levelType="TimeDays">
          </Level>
        </Hierarchy>
      </Dimension>

  3. I find it's down to type casting. by putting the 1 in quotes you're trying to say it's a String when you want it to be a number. Try either not having any quotes at all or casting it properly with

    $F {Filed_Name}.equals(new BigDecimal(1))

    or

    $F {Filed_Name}.equals(new Integer(1))

  4. In iReport for nearly every visible element there is as "Print When Expression" property, you could have something in  there using something like

    ( $V{currentPage}.equals(new BigDecimal(1)) || $V{currentPage}.equals($V{pages}) ? new Boolean("False") : new Boolean("True")  )

    Or Something

  5. The advice on using Roles in JasperReports that I've found is cryptic and fragmented so I'm writing here how I got it working.

     

    In JasperServer 3.5 what I would do is create a parameter in the report which used com.jaspersoft.jasperserver.api.metadata.user.domain.Role)($P{LoggedInUser}.getRoles().toArray()[1])).getRoleName()

    Which did work but was difficult and cumbersome to use. The main step change is that in JasperReports Server 4 the LoggedInUserRole parameter isn't in the report jrxml, It's in the Input Control.

    You need to create either a "Single select Query" or "Multi select Query" which links to a parameter in the jrxml.

    At the Query stage you generate a statement somthing like

    SELECT column FROM table WHERE $X{IN, column, LoggedInUserRole}

    If we unpack this a little the $X{} part is an input control for the query. It will be expanded at runtime into

    column IN('ROLE_USER','CUSTOM_ROLE_1','CUSTOM_ROLE_n')

    as long as the ROLEs you have created match what is in column then you should see them appear in the Input Control when you run the query.

    If you change the query or what roles are assigned to the user you need to Log out of JasperReports Server each time as the server appears to cache the results.

  6. I Think when you generate the report initially it generates it in some complicated internal XML format which is stored either in MySQL or in memory or somewhere. Then this raw report is then transformed to be either the HTML or the PDF, XLS , etc on demand which dosn't take long at all.I don't think it re-runs the report for every export type.

  7. I thought I had this pinned down from doing it with version 3.5 and 3.7 but I've not.

    I've used the handily provided DDL files in the buildomatic folder to create the relevent tables in user jasperdb40 on a local server 192.168.2.203

    I've edited META-INF/context.xml to

    <Resource name="jdbc/jasperserver" auth="Container" type="javax.sql.DataSource"
            maxActive="100" maxIdle="30" maxWait="10000"
            username="jasperdb40" password="password"
            driverClassName="oracle.jdbc.driver.OracleDriver"
            url="jdbc:oracle:thin:@192.168.2.203:1521:ORCL" />

    I'e altered META-INF/jasperserver-DS-jdbc.xml to

      <jdbc-driver-params>
        <url>jdbc:oracle:thin:@192.168.2.203:1521:ORCL</url>
        <driver-name>oracle.jdbc.driver.OracleDriver</driver-name>
        <properties>
          <property>
            <name>user</name>
            <value>jasperdb</value>
          </property>
        </properties>
        <password-encrypted>password</password-encrypted>
      </jdbc-driver-params>

    I've changed WEBINF/hibernate.properties to

    metadata.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect

    and edited js.jdbc.properties to

    metadata.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect

    metadata.jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
    metadata.jdbc.url=jdbc:oracle:thin:@192.168.2.203:1521:ORCL
    metadata.jdbc.username=jasperdb40
    metadata.jdbc.password=password


    and yet in the apache stdout_<date> .log I still get things like

    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    and

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

    when I stat the MySQL database it all sets going like nothing has changed, even though I've deleted work\Catelina multiple times.


     

    what do you think? What did I miss?

  8. the the JasperReports repository there is a folder called Themes. There are two folders in it and you can download them as a zip file using the context menu. In these are a bunch of CSS files and an images foldler. Changes to these will alter the theme which you can then zip back up again and upload the the server.

     

×
×
  • Create New...