mercoledì 10 agosto 2011

SpagoBI - Documento con formato di output excel o pdf o...

Per determinare il formato di output di un documento SpagoBI è sufficiente aggiungere un parametro denominato outputType.
Questo paramentro determina il formato con cui il documento deve essere prodotto e può assumere i seguenti valori:
  • PDF
  • XLS
  • JPG
  • CSV
  • XML
  • TXT
  • PPT
  • RTF
  • JRXML
  • HTML
  • ...
Questo parametro può essere utilizzato anche quando si schedula un documento per determinare il formato del file da inviare via mail (o da salvare).

SpaboBI - Modificare le impostazioni di esportazione in excel

Aprire il file
\webapps\SpagoBIJasperReportEngine\WEB-INF\classes\jasperreport.properties

e aggiungere i parametri di esportazione excel impostandoli secondo le esigenze:
net.sf.jasperreports.awt.ignore.missing.font=true
net.sf.jasperreports.export.xls.create.custom.palette=false
net.sf.jasperreports.export.xls.one.page.per.sheet=false
net.sf.jasperreports.export.xls.remove.empty.space.between.rows=true
net.sf.jasperreports.export.xls.remove.empty.space.between.columns=true
net.sf.jasperreports.export.xls.white.page.background=false
net.sf.jasperreports.export.xls.detect.cell.type=true
net.sf.jasperreports.export.xls.size.fix.enabled=false
net.sf.jasperreports.export.xls.ignore.graphics=false
net.sf.jasperreports.export.xls.collapse.row.span=true
net.sf.jasperreports.export.xls.ignore.cell.border=true
net.sf.jasperreports.export.xls.ignore.cell.background=true
net.sf.jasperreports.export.xls.max.rows.per.sheet=0
net.sf.jasperreports.export.xls.wrap.text=true

è anche possibile aggiungere:
#net.sf.jasperreports.export.xls.password=pa22w0rd 

martedì 9 agosto 2011

JasperServer - Import / Export

./js-export.sh --everything --output-zip /mnt/backup/jasperRepository.zip

mysqldump


The most simple way is to issue this command:
mysqldump -u [user] -p [database_name] > [backupfile].dump
This command is going to ask you for the [user] password and then will create a script which later can be used to retore the data.
Another way is to use the optimized way.
mysqldump --opt -u [user_name] -p [database_name] > [backup_file].dump
This command will use an optimized method, and will include in the script MySQL commands that will erase (drop) tables that already exists and create them again before populate the data inside.
Maybe the best way to run this command is to use the option of gzip the output file. (for obvious reasons)
Once you have your backup file, you may want to restore it someday, this is the way to do it. (remember tu unzip your file, if zipped, before)
mysql [database_name] < [backup_file].dump
Remeber that you can run
man mysqldump
for more help.

Backuping a single table from a database
mysqldump -u user_name -p database_name table_name > /var/www/backups/table_name.sql
Restoring the table into another database
mysql -u -p database_name < /var/www/backups/table_name.sql

Installazione MySQL e InfoBright su Centos

Come verificare la versione del sistema operativo:
uname -a
MySQL
INSTALLAZIONE: yum -y install mysql mysql-server
REGISTRAZIONE SERVIZIO:/sbin/chkconfig mysqld on
START: /sbin/service mysqld start
STOP: /sbin/service mysqld stop
CONNESSIONE:  mysql -h localhost -u root -p
Configurazione: vi /etc/my.cnf

InfoBright
Scaricare e unzippare
START IB: /etc/init.d/mysqld-ib start
STOP IB: /etc/init.d/mysqld-ib stop
Configurazione: vi /etc/my-ib.cnf

lunedì 1 agosto 2011