TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Danish Habib
NA
694
243.4k
the report has no tables error in crystal reports in vb.net
Sep 1 2015 5:57 AM
I have created a stored procedure to bind a report for purposes i have a data set and in which i have datatable when using the below code i open the report it says "THE REPORT HAS NO TABLES "
Private Function GetData() As CDFSetDetailed
Dim constring As String = ConfigurationManager.ConnectionStrings("ConnStringDb1").ConnectionString
Dim cmd As SqlCommand = New SqlCommand("usp_Target_AchieveThirdFinal")
Dim con As SqlConnection = New SqlConnection(constring)
Dim sda As SqlDataAdapter = New SqlDataAdapter
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
sda.SelectCommand = cmd
cmd.Parameters.Add("@QuarterID", SqlDbType.TinyInt).Value = Integer.Parse(ddlQuarter.SelectedValue)
cmd.Parameters.Add("@YearID", SqlDbType.TinyInt).Value = Integer.Parse(ddlyear.SelectedValue)
cmd.Parameters.Add("@DistrictID", SqlDbType.TinyInt).Value = Integer.Parse(ddlDistrict.SelectedValue)
cmd.Parameters.Add("@QuestionID", SqlDbType.TinyInt).Value = Integer.Parse(ddlIndicators.SelectedValue)
Using dsCustomers As New CDFSetDetailed()
sda.Fill(dsCustomers, "DataTable1")
Return dsCustomers
End Using
' sda.Fill(DsCdf, "DataTable1")
' Return DsCdf
End Function
Protected Sub btnReport_Click(sender As Object, e As EventArgs) Handles btnReport.Click
Dim crystalReport As New ReportDocument()
crystalReport.Load(Server.MapPath("~/DetailReport.rpt"))
Dim dsCustomers As CDFSetDetailed = GetData()
crystalReport.SetDataSource(dsCustomers)
CrystalReportViewer1.ReportSource = crystalReport
End Sub
Reply
Answers (
0
)
Stored Proc vs EF vs NHibernate vs SQLCommands
How to work with pendrive on desktop application