Jump to content

dprogrammer

Members
  • Posts

    171
  • 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 dprogrammer

  1. Hi, I am getting this error: 'The Nework Adapter Could Not Establish Connection' when I am trying to create a new connection and hit Test. Before this error I was getting error "ClassNotFoundError: oracle.jdbc.driver.OracleDriver" Then I added classes12.jar" in iReport (1.2.x) and now I am getting the network adapter error. Here is my connection string info:

    Type of connection: Database JDBC connection
    JDBC Driver: oracle.jdbc.driver.OracleDriver
    JDBC URL: jdbc.oracle:thin@my_db_location:1521:my_db_instance_name
    Server Address: my_db_location
    Database: my_db_instance_name
    User Name: uid
    Password: pwd

     

    What could be the reason for this error?

     

     

  2. Hi, I know how to create a simple class with few functions but don't khow how to plug-it in the iReport or use those functions in the iReport. I am using version 1.2.8. Any sample code or document or link will be highly appreciated. Thanks in advance.

  3. <Quote> Only way i can think of is to load the JRXML into a java object using JAXB/other and then manipulating based on the condition mentioned above. Youll need to recompile programatically though which is a bit of a performance hit. </Quote>

    Ggalang, I have not done it before so I am not sure how to do it. Do you have a sample or a thread which guides to how to do this?

  4. Hi, I have a report that has only two columns, ID and Name. To save space I want the columns to first go top to bottom till end of first page, then start over again at top and go to bottom. Just like a news paper columns. In Crystal reports there is a property called 'Format with Multiple Columns" that does that automatically. Is there anything like that in Ireport? Or any alternate way of achieving the same out put? I am using version 1.2.8. Thanks in advance.

    Desired sample out put:

    ------------------------------------------------------------

    ID           Name                               ID          Name

    1           abc                                   4             hij

    2          cde                                   5             klm

    3         efg                                    6              nop

    Page 1 of 1

    ------------------------------------------------------------

    ID           Name                               ID          Name

    7           qrs                                   10             z

    8          tuv                                   11            zzz

    9         wxy                                   

     

  5. Hi, I have created a group by putting a conditional statement in a variable and then using that variable as a group. But The groups keep repeating for different sets of data. I want to see each group only once and then all its details.

    The conditional stmt in a variable is like as following:

    $P{P1}.equals "Yes" || $P{P2}.equals "Yes" ? $F{Field1}:$F{Field2}

    Results I am getting:

    Group1

    A

    B

    C

    Group 1

    D

    E

    Group 2

    A

    B

    C

    I am expecting it to work like this:

    Group 1

    A

    B

    C

    D

    E

    Group 2

    A

    B

    C

    Any ideas please?

  6. Hi, I have two quick questions: I am using version ireport 1.2.8.

    1 - What is the synatax for writing two conditions in the if part?

    This is current code which checks one condition:
    $P{P1}.equals("Y") ? $F{OBJECTID} : $F{OBJECTDESC}

    I need to add this condition:

    if parameter P1=Y And P2=N then ....this else that

    If its not clear , please let me know.

    2- How to split details band into two bands, so we get Details1 and Details2 or Detailsa and Detailsb (just like Crystal Reports).? Is it possible?

     

  7. Naveen, hope this helps. /*
     * User links:
     * http://jasperreports.sourceforge.net/tutorial/index.html
     * http://jasperreports.sourceforge.net/documentation.html
     * http://jasperreports.sourceforge.net/quick.how.to.html
     */
    package com.mycompany.generator;

    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.util.HashMap;

    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;

    // import com.mycompany.helper.* ;
    // import com.mycompany.dbi.*;

    public class ReportGenerator {
     public static void main(String[] args) {
      HashMap hm = null;
      // System.out.println("Usage: ReportGenerator ....");

      try {
       System.out.println("Start ....");
       // Get jasper report
       String jrxmlFileName = "C:/reports/C1_report.jrxml";
       String jasperFileName = "C:/reports/C1_report.jasper";
       String pdfFileName = "C:/reports/C1_report.pdf";

       JasperCompileManager.compileReportToFile(jrxmlFileName, jasperFileName);
       
       // String dbUrl = props.getProperty("jdbc.url");
       String dbUrl = "jdbc:oracle:thin:@localhost:1521:mydbname";
       // String dbDriver = props.getProperty("jdbc.driver");
       String dbDriver = "oracle.jdbc.driver.OracleDriver";
       // String dbUname = props.getProperty("db.username");
       String dbUname = "mydb";
       // String dbPwd = props.getProperty("db.password");
       String dbPwd = "mydbpw";

       // Load the JDBC driver
       Class.forName(dbDriver);
       // Get the connection
       Connection conn = DriverManager
         .getConnection(dbUrl, dbUname, dbPwd);

       // Create arguments
       // Map params = new HashMap();
       hm = new HashMap();
       hm.put("ID", "123");
       hm.put("DATENAME", "April 2006");

       // Generate jasper print
       JasperPrint jprint = (JasperPrint) JasperFillManager.fillReport(jasperFileName, hm, conn);

       // Export pdf file
       JasperExportManager.exportReportToPdfFile(jprint, pdfFileName);
       
       System.out.println("Done exporting reports to pdf");
       
      } catch (Exception e) {
       System.out.print("Exceptiion" + e);
      }
     }
    }
     

     

  8. Hi, I need to add three fields in a variable to sum their values. If all three fields have values, sum shows correctly, but if any one of them is null, sum is also null. I need to know what is the syntax for checking nulls. I tried this

    Field.doublevalue()== null? 0 : field.doublevalue

    but it didnt' work.

     

    Also, I tried using / in a division variable , but it is also giving me errors. My syntax was:

    variable1.doublevalue() / variable2.doublevalue()

     

    Thanks in advance.

  9. I would like to hide some buttons, and possibly add new buttons if possible. I also would like to know how to call the functions from code rather than clicking the buttons, for example instead of clicking ->AZ to change the sort order, can we do it from the code. Can we change the skin of the UI to meet our colors?
  10. I have been searching for some free tools to test mdx queries against Oracle 9 database. All I found was ProCalarity and I think its not free. Does anybody know about any such tools where I can write and test an MDX query and then just copy and paste it in the query for adding an analysis view?
  11. Thanks Sebastian. I followd the example of SugarCRM. There are two files in olapschemas folder, SugarCRMOppsSchema.xml and SugarCRMOppsSchema.data.

    SugarCRMOppsSchema.data has following code:

     

    <?xml version="1.0" encoding="UTF-8"?>

    <fileResource dataFile="SugarCRMOppsSchema.data">

    <folder>/olap/schemas</folder>

    <name>SugarCRMOppsSchema</name>

    <version>0</version>

    <label>SugarCRM Opportunities DataMart</label>

    <description>SugarCRM Opportunities Data Mart Schema</description>

    <creationDate>2007-01-16T10:07:20.000-08:00</creationDate>

    <fileType>olapMondrianSchema</fileType>

    </fileResource>

     

    And SugarCRMOppsSchema.data has following code:

    (only first few lines are given)

     

    <Schema name="SugarCRM Sales Performance">

    <Dimension name="Sale State">

    <Hierarchy hasAll="true" allMemberName="All Types" primaryKey="id">

    <Table name="sales_state"/>

    <Level name="Sale State" column="sales_state" uniqueMembers="true"/>

    </Hierarchy>

    </Dimension>

    <Dimension name="Account Categorization">

    ...

    <Cube name="SalesAnalysis">

    </Cube>

    </Schema>

    So, I have two files too and top few lines of my .data schema file look like the following:

     

    <Schema name="SalesSchema">

    <Cube name="SalesCube">

    <Table name="Sales"/>

    <Dimension name="SALES.CUSTOMER">

    ....

    </Cube>

    </Schema>

  12. I am having problems in adding and running an analysis view. Here are the steps that I am taking:

     

    1- Create a schema and save it as .data file, copy it into schema folder

    2- Create an xml file and refrence that .data file in it and copy it in the same folder

    3- Create a jdbc connection for Oracle db and validate it successfully from JasperServer UI.

    3- From the JasperServer UI, add the xml file to schemas folder

    4- Add an analysis view using above connection and write this query:

     

    select {[Measures].[Quantity],[Measures].[unitPrice],[Measures].[Cost],[Measures].[salesPrice]} ON COLUMNS,

    {([Customer].[All customer],[Region].[All region], [state].[All state])}

    ON ROWS

    From

    [sales]

     

    Then I get this error:

    "The following is not a valid MDX Query: No suitable driver"

    And sometimes I get this error when I don't use above connection but use a connection on the fly.

    "The following is not a valid MDX Query: In element 'Schema': Attribute 'name' is unset and has no default value."

     

    Any ideas if my query is invalid or is something wrong with my connection?

  13. Please ignore this post as everything is working now. I had to uninstall the jasperserver and reinstall back and it worked this time. It appears that there is a bug in jasperserver. It will not work when you have either Tomcat or MySQL preinstalled. It will only work when you install all components together.

    Thanks,

  14. Have anybody seen this error before? I am trying to connect to jasperserver (http://localhost:8088/jasperserver) and getting this error.

     

    "WARN LoggerListener,http-8088-Processor24:55 - Authentication event AuthenticationFailureLockedEvent: jasperadmin; details: org.acegisecurity.ui.WebAuthenticationDetails@2eb76: RemoteIpAddress: 12x.x.x.x.; SessionId: 31C45BC1A66CDC4E3B7E9666BD55DCD1; exception: User account is locked"

     

    NOTE:

    This problem is related to the login problem with JasperServer from other post. Since this is a different error message and is from the log file, hence I started this new thread.

  15. Have anybody seen this error before? I am trying to connect to jasperserver (http://localhost:8088/jasperserver) and getting this error.

     

    "WARN LoggerListener,http-8088-Processor24:55 - Authentication event AuthenticationFailureLockedEvent: jasperadmin; details: org.acegisecurity.ui.WebAuthenticationDetails@2eb76: RemoteIpAddress: 12x.x.x.x.; SessionId: 31C45BC1A66CDC4E3B7E9666BD55DCD1; exception: User account is locked"

     

    NOTE:

    This problem is related to the login problem with JasperServer from other post. Since this is a different error message and is from the log file, hence I started this new thread.

×
×
  • Create New...