Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
PHPmaster PHPmaster is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 332
Rep Power: 15
PHPmaster mempunyai hidup yang Normal
Default [ASK]Refresh CrystalReport di VB.NET

gini gan

ane pake VB.NET 2005 sqlsrvr 2000 n crystalreport8.5



ane mw tanya cara supaya kalo kita update isi dr database misal "kita hapus atau kita tambah k dalem datagrid/database"

nah pas kita mw liat laporannya tuh udah ke refresh otomatis gitu gan

tanpa harus refresh n save dr crystalreportnya





ini percobaan yang ane lakukan


Spoiler for code:






Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared



Public Class Siswa



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Laporan.Show()

'Laporan.CRV.ReportSource = Nothing

'Laporan.CRV.RefreshReport()

'Laporan.CRV.ReportSource = "Laporan.rpt"



Dim cryRpt As New ReportDocument

Dim crtableLogoninfos As New TableLogOnInfos

Dim crtableLogoninfo As New TableLogOnInfo

Dim crConnectionInfo As New ConnectionInfo

Dim CrTables As Tables

Dim CrTable As Table

cryRpt.Load("laporan.rpt")

With crConnectionInfo

.ServerName = "namapc"

.DatabaseName = "namadatabase"

.UserID = "sa"

.Password = ""

End With

CrTables = cryRpt.Database.Tables

For Each CrTable In CrTables

crtableLogoninfo = CrTable.LogOnInfo

crtableLogoninfo.ConnectionInfo = crConnectionInfo

CrTable.ApplyLogOnInfo(crtableLogoninfo)

Next

Laporan.CRV.ReportSource = cryRpt

Laporan.CRV.Refresh()

Laporan.Show()

'Laporan.CRV.ReportSource = Nothing

'Laporan.CRV.RefreshReport()

End Sub

End Class











percobaan diatas itu waktu tampil di formLaporan gak langsung terupdate ato ke refresh gan.. harus ane refresh n save dr program crystal reportnya..



apakah ada yg salah penempatan posisi coding ato ada yang kurang gan di situ ??

tolong bantuannya gan ..

thanks

</div>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Terkait
Thread Thread Starter Forum Replies Last Post
JUAL WTS : Amp. Macrom &amp; DR coustic (refresh) MukaMacho Power Amplifier 0 12th December 2013 08:29 AM
[ask] refresh crystal report JagoVB Programming 0 20th November 2011 09:22 AM
Datagridview.refresh() pada vb.net JagoVB Programming 0 20th November 2011 09:14 AM
refresh your mind coreunstable Gossip & Gallery 2 14th January 2010 02:04 PM

 


All times are GMT +7. The time now is 02:03 PM.