Hello friends
I have made an medical app in vb.net 2008 and my back hand is sql server 2008? My problem is when i try to run my crystal report i have no problem when it is for single table.But for two table it shows me sql error and asking me login id and password?I have attached my code for your refrence.
CODE BEGINS:---
-------------------------------------------------------------------
Frm bill_print code dynamically
------------------------------------------------------------------
Imports System.Data.SqlClient
Imports System.Data
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.ReportSource
Public Class frmbillprint
Private Sub frmbillprint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
connectdb()
Dim ad As New SqlDataAdapter("Select * from sales_invoice", cn)
Dim ds As New DataSet
ds.Clear()
ad.Fill(ds, "sales_invoice")
Dim strReportPath As String = pth & "\billprint.rpt"
Dim cr As New ReportDocument()
cr.Load(strReportPath)
cr.SetDataSource(ds.Tables("sales_invoice"))
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.ReportSource = cr
End Sub
End Class
------------------------------------------------------------------------
It contain database Sales_invoice and Sales_details
Sales_invoice--(bilno,billdat,so_id,cust_code,cust_name,amount,vat,net_amount)
sales_details---(medi_code,qty,amt)
-------------------------------------------------------------------------
It show me error
Database Login
Ask every time for login id and password
___________________________________________________________________________
Friends plz help me out.....