Audzubillah himinasyaitonirrajim Bismillahirrahmanirrahiim ...., Kalau report, langsung dibuka via browser, menurut saya belum bisa. Kita harus bikin coding report itu di dalam PHP atau bahasa apa saja (web base) yang mempunyai fungsi melakukan koneksi ke database. Contohnya begini: - Buka Control Panel
- Buka administrative tool
- Buka data source (ODBC)
- Klik system DNS
- Klik Add
- Pilih Driver do Microsoft Acces (*.mdb) > Finish
- Isi Data source name (Misalnya CONTOH), discription CONTOH
- Klik Select > pilih data base mdb yang akan di akses ke web
- Kalau diperlukan klik Advance, untuk mengisi username dan password
- Bikin file (untuk koneksi ke database) pakai notepad atau makromedia dan simpan dengan nama odbc_acces.php:
<? $odbc = odbc_connect ('CONTOH', '', '') or die('Could Not Connect to ODBC Database!'); ?> - Buat file (untuk menayangkan) pakai notepad atau makromedia dan simpan dengan nama index.php:
<? require_once("odbc_acces.php"); $sql = "SELECT t.NRBU, t.Nama, t.Pimpinan, Count(t.Nama) AS jm FROM [SELECT TOP 50 DRP_ORI.NRBU, DRP_ORI.Nama, DRP_ORI.Pimpinan FROM DRP_ORI]. AS t GROUP BY t.NRBU, t.Nama, t.Pimpinan"; //silahkan ubah sql diatas sesuai keinginan $query = odbc_exec($odbc, $sql) or die (odbc_errormsg()); //silahkan ubah tabel sesuai keinginan dibawah ini echo "<table border='1' cellpadding='4' cellspacing='0'>"; echo "<tr><td>NRBU</td><td>NAMA BUJK</td><td>Pimpinan</td><td>Jumlah Sub Bidang</td></tr>"; while($row = odbc_fetch_array($query)) { $nrbu = "".$row['NRBU'].""; $bu = "".$row['Nama'].""; $bos = "".$row['Pimpinan'].""; $jm = "".$row['jm'].""; echo "<tr><td align=center>$nrbu</td><td>$bu</td><td>$bos</td><td align=center>$jm</td></tr>"; } echo "</table>"; odbc_close($odbc); ?> - Letakkan kedua file tersebut di htdocs/atau file yang dikehendaki untuk mencoba.
- Masuk ke browser localhost. Bila kedua file diletakkan di htdocs, akan langsung keluar laporan yang dikendaki...
Semoga bisa membantu dan memberi semangat.... --- On Thu, 3/3/11, Ivan Leonardo <ivan@pttdp.com> wrote:
From: Ivan Leonardo <ivan@pttdp.com> Subject: [belajar-access] OOT: Report dari Browser To: belajar-access@yahoogroups.com Date: Thursday, 3 March, 2011, 4:40 PM
Saya ada aplikasi pakai MDB BE+FE, gimana ya caranya kalo khusus utk report bisa lihat dari browser. Misal begitu buka website bisa pilih report/masukan periode tgl yg diinginkan lalu OK dan kelluar deh reportnya.
Apakah harus pakai aplikasi tambahan pakai VB atau gimana ya ? blm ada pengalaman webbase nih
Thanks
---------------------------------------------------------- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
|
No comments:
Post a Comment