Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3167

VB.NET - Crystal Report blank database

$
0
0

I've created a simple report application that view our monthly payment. But when I click the button view. It prompts the Database Login.

Server name: HAS VALUE

Database: NO VALUE

Login ID: HAS VALUE

Password: HAS VALUE

The problem is, the Database field is blank. But I've checked the SQL Database. The database is existing.


Me.Text =""& oCompany.CompanyName &" - Payment Schedule Report"
  
Dim iCon AsNew System.Drawing.Icon(xPath &"\AppIcon1.ico")
  
Me.Icon = iCon
  
Me.WindowState = FormWindowState.Maximized
  ComboBox1
.Text ="Choose Export Format"

  
Dim oConnectInfo AsNew ConnectionInfo
  
Dim oCRTableInfos AsNew TableLogOnInfos
  
Dim oCRTableInfo AsNew TableLogOnInfo
  
Dim oTables As Tables
  
Dim oTable As Table

  cryRpt
=New ReportDocument

  cryRpt
.Load(xPath &"\Rpt\App_BuyerLedger.rpt")

  
With oConnectInfo
  
'MsgBox(oCompany.CompanyDB)
  
.ServerName =""& oCompany.Server &""
  
.DatabaseName = oCompany.CompanyDB
  
.UserID =""& oCompany.DbUserName &""
  
.Password ="p@ssw0rd"
  
.Type = ConnectionInfoType.SQL
  
EndWith

  oTables
= cryRpt.Database.Tables
  
ForEach oTable In oTables
  
'oCRTableInfo = oTable.LogOnInfo
  oCRTableInfo
.ConnectionInfo = oConnectInfo
  oTable
.ApplyLogOnInfo(oCRTableInfo)
  
Next

  oCRTableInfos
.Add(oCRTableInfo)

  oParameter
()

  CrystalReportViewer1
.EnableRefresh =True
  CrystalReportViewer1
.LogOnInfo = oCRTableInfos
  CrystalReportViewer1
.ReportSource = cryRpt
  
'CrystalReportViewer1.Refresh()


Viewing all articles
Browse latest Browse all 3167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>