Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a report and trying to load to my web form

ASP.NET
<td>



               <CR:CrystalReportViewer ID="CrystalReportViewer1"  runat="server"
                   AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="1202px"
                   ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl=""
                   ToolPanelWidth="200px" Width="1104px" />
               <CR:CrystalReportSource ID="CrystalReportSource1"  runat="server">
                   <Report FileName="Gp.rpt">
                   </Report>
               </CR:CrystalReportSource>
               </td>


in button click I am trying to set data source .


VB
Dim dt As New DataTable
        startDate = txtStart.Text.Trim()
        endDate = txtEnd.Text.Trim()
        dt = BO.GenerateGrossProfit(startDate, endDate)

        Dim rptA As ReportDocument = New ReportDocument()


        '//
        Dim str As String = ""
        Dim ds As New DataSet
        str = "Select ID,BRANCHCODE from Report_HDR_History"
        ds = DL.ExecuteNonQueryforGP(str)
        rptA.Load(Server.MapPath("") & "/Gp.rpt")
        rptA.FileName = Server.MapPath("/Gp.rpt")
        rptA.SetDataSource(ds.Tables(0))
        rptA.SetDatabaseLogon("SMUSER", "SMUser@123")
        CrystalReportViewer1.DisplayToolbar = True
        CrystalReportViewer1.ReportSource = rptA
        CrystalReportViewer1.DataBind()
        CrystalReportViewer1.RefreshReport()


No error is showing but my report viewer no data ..

please help here my development now in stuck ..
Posted

1 solution

Check it out


http://forums.asp.net/t/2004329.aspx?ReportViewer+Control+shows+no+data
 
Share this answer
 
Comments
ganeshbdas 27-Aug-15 1:52am    
not helping

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900