Author Topic: Using Ireport With PHP??? Posible ba?  (Read 148 times)

0 Members and 1 Guest are viewing this topic.

Offline MrSpecialist

  • Sr. Member
  • *
  • Posts: 342
  • Karma: +1/-0
  • I'm an expert!
    • View Profile
Using Ireport With PHP??? Posible ba?
« on: April 25, 2010, 10:11:23 PM »
Using Ireport With PHP
Hi

Iam using php. i found a new report tool Ireport. its an open source tool. there is inbuild support for java. do u anybody knw how to use ireport with php. if so plz help me or tell me anyother compact tool for report designing for php

Techronnati | where technology never sleeps

Using Ireport With PHP??? Posible ba?
« on: April 25, 2010, 10:11:23 PM »

Mountain View

Offline GBTalk

  • Full Member
  • *
  • Posts: 182
  • Karma: +0/-0
    • View Profile
Re: Using Ireport With PHP??? Posible ba?
« Reply #1 on: April 25, 2010, 10:13:25 PM »
How to create report use IReport and Hibernate

Hi, all

How to create report use IReport and Hibernate
I have tried, like this :
:

1. create file hibernate.cfg.xml
Help with Code Tags
Java Syntax (Toggle Plain Text)
Code: [Select]
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.url">jdbc:mysql://localhost/a6</property>
<property name="connection.username">root</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.password"></property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<!-- thread is the short name for
org.hibernate.context.ThreadLocalSessionContext
and let Hibernate bind the session automatically to the thread
-->
<property name="current_session_context_class">thread</property>
<!-- this will show us all sql statements -->
<property name="hibernate.show_sql">true</property>
 
<!-- mapping files -->
<mapping resource="mst/hrd/model/hibernate/hbmxml/T_Karyawan_Ms.hbm.xml"/>
 
</session-factory>
</hibernate-configuration>

2. create file T_Karyawan_Ms.java
Help with Code Tags
Java Syntax (Toggle Plain Text)
Code: [Select]
package mst.hrd.model.hibernate.hbmxml;
 
import java.io.Serializable;
import java.util.Date;
 
public class T_Karyawan_Ms implements Serializable{
private String kodePt;
private String karyawanId;
private String namaKaryawan;
 
public T_Karyawan_Ms() {
 
}
 
public String getKodePt() {
return kodePt;
}
 
public void setKodePt(String kodePt) {
this.kodePt = kodePt;
}
 
public String getKaryawanId() {
return karyawanId;
}
 
public void setKaryawanId(String karyawanId) {
this.karyawanId = karyawanId;
}
 
public String getNamaKaryawan() {
return namaKaryawan;
}
 
public void setNamaKaryawan(String namaKaryawan) {
this.namaKaryawan = namaKaryawan;
}
 
 
}

3. create file T_Karyawan_Ms.hbm.xml
Help with Code Tags
Java Syntax (Toggle Plain Text)
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
<hibernate-mapping package="mst.hrd.model.hibernate.hbmxml">
<class name="T_Karyawan_Ms" table="t_karyawan_ms">
 
<composite-id>
<key-property name="kodePt" type="string" column="KODE_PT" />
<key-property name="karyawanId" type="string" column="KARYAWAN_ID"/>
</composite-id>
 
<property name="namaKaryawan" type="string" column="NAMA_KARYAWAN"/>
</class>
 
</hibernate-mapping>


4. create HibernateProperties.java
Help with Code Tags
Java Syntax (Toggle Plain Text)
public static void hibernateProperties(String typeDb){
CVariable var = new CVariable();
String user=var.getUserMst();
String pwd=var.getPwdMst();
 
configuration = new Configuration()
.addClass(mst.hrd.model.hibernate.hbmxml.T_Karyawan_Ms.class)
.setProperty("hibernate.dialect","org.hibernate.dialect.MySQLInnoDBDialect")
.setProperty("hibernate.connection.driver_class", "com.mysql.jdbc.Driver")
.setProperty("hibernate.connection.url", "jdbc:mysql://"+var.host+ "/"+var.dbGlobal+"")
.setProperty("hibernate.connection.username", user)
.setProperty("hibernate.connection.password", pwd);
}

In iReport I used step :
1. Seting classpath OptionsClasspathadd folder  all folder src
3. Data Connection/Data SourceNew Hibernate connection Next type conhibernate
4. click test  show error
Error : component class not found: mst.hrd.model.hibernate.hbmxml.T_Karyawan_Ms

what step must i doing ?

I using ireport 2.0
Thanks,
« Last Edit: August 17, 2016, 07:33:32 AM by GBTalk »

Offline Corps

  • Sr. Member
  • *
  • Posts: 273
  • Karma: +0/-0
    • View Profile
Re: Using Ireport With PHP??? Posible ba?
« Reply #2 on: October 20, 2016, 01:25:07 AM »
Using Ireport With PHP
Hi

Iam using php. i found a new report tool Ireport. its an open source tool. there is inbuild support for java. do u anybody knw how to use ireport with php. if so plz help me or tell me anyother compact tool for report designing for php

I think this is possible, provided that you have access to libraries in PHP. minsan kasi restricted e. Di mo tuloy maexpose yung mga classes

Offline MrSpecialist

  • Sr. Member
  • *
  • Posts: 342
  • Karma: +1/-0
  • I'm an expert!
    • View Profile
Re: Using Ireport With PHP??? Posible ba?
« Reply #3 on: November 25, 2016, 09:53:46 AM »
Bukod ba sa ireport meron pa ba kayong alam na reporting tool for PHP?

Offline JusticeLeague

  • Sr. Member
  • *
  • Posts: 352
  • Karma: +1/-0
    • View Profile
Re: Using Ireport With PHP??? Posible ba?
« Reply #4 on: June 12, 2017, 11:36:44 AM »
actually yan din gamit ko sa codes ko ngayon

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
165 Views
Last post August 27, 2008, 01:56:15 AM
by h2obubbler
0 Replies
184 Views
Last post August 31, 2008, 11:11:47 PM
by JusticeLeague
0 Replies
75 Views
Last post June 30, 2009, 02:24:10 PM
by MrSpecialist
0 Replies
27 Views
Last post April 25, 2010, 10:10:20 PM
by rpmolecule
7 Replies
59 Views
Last post October 29, 2014, 09:45:25 AM
by TDelight

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.