![](http://content.invisioncic.com/i328763/set_resources_3/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
dprogrammer
-
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
-
-
Giulio , this is exactly what I was also looking for. Thanks for this post.
-
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.
-
<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?
-
Hi, Is it possible to dynamically change band height?
For example:
If Condition A = True Then BandHeight=20 Else 0
-
Hi, Is it possible to have a parameter with a list of values so that end users can pick from the list instead of typing it? I did try couple things but its not working. Any ideas? Thanks
-
Thanks for your reply,Nghia!. I was able to do it right after I posted my question and did some googling.
-
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
-
Any ideas?
-
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?
-
Its been a while since I used that code with version 1.2. I was able to compile it and run it through command prompt and was able to generate a pdf. Make sure you have all the jars in your path. I think these jars should be used:
commonsxxx, and itext-1.3.1.jar
-
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?
-
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);
}
}
}
-
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.
-
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?
-
Hi, I would like to find out if its possible to change the look and feel of the JasperServer1.2.1 OLAP UI and customize it per our needs. If yes, will that be a too much of an effort or that can be done easily? Thanks.
-
I have a working install of JasperServer1.2 and instead of installing new version 1.2.1, I would like to upgrade/update the older version. Is it possible to do it? If not, I will have to go through a nightmare of installing it again as I went through with v1.2.
-
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?
-
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>
-
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?
-
Thank you so much Sebastian for explaining it in detail. I hope this would benefit lot of other new comers in this field.
Thanks.
-
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,
-
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.
-
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.
-
I still have this issue. Any more ideas please?
Io Exception: The Nework adapter could not establi
in Products
Posted
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?