Hello, I want to make a crystal report from table relation.
I've make for a non relation table, and the record success shown in the crystal report.
But, when I try for a relation table, the record is not displayed in the crystal report. I try with the same way for non-relation table, but it's work.
Here is my code :
Option Explicit On
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.Data.SqlClient
Public Class PrintJadwalKuliah
Dim xKoneksi As New SqlConnection
Dim xAdapter As New SqlDataAdapter
Dim obj_RepDoc As New ReportDocument
Dim xDataset As New _FKIP_UNILAKDataSet()
Private Sub PrintJadwalKuliah_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
xKoneksi.ConnectionString = "Data Source=RAGAZ-PC\SQLEXPRESS;Initial Catalog=FKIP-UNILAK;Integrated Security=True"
xAdapter = New SqlDataAdapter("SELECT Hari.nama_hari , Jam.jam_kuliah , Jam.selesai , Ruang.Nama_Ruangan FROM slot INNER JOIN Hari ON slot.Id_hari = Hari.Id_hari INNER JOIN Jam ON slot.Id_Jam = Jam.Id_Jam INNER JOIN Ruang ON slot.Id_Ruangan = Ruang.Id_Ruangan", xKoneksi)
xAdapter.Fill(xDataset, "Jadwal")
obj_RepDoc = New CrystalReport_slotcoba
obj_RepDoc.SetDataSource(xDataset)
CrystalReportViewer1.ReportSource = obj_RepDoc
End Sub
End Class
When I try to show the "Select query" to datagrid view, the record succes shown ( I think my "select Query" is fine), So what is the solution for this one??
Sorry, my english bad, I'm an indonesian :)