Print Page | Close Window

blank reort displayed at design & runtime

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13272
Printed Date: 20 Apr 2025 at 7:35pm


Topic: blank reort displayed at design & runtime
Posted By: svibuk
Subject: blank reort displayed at design & runtime
Date Posted: 19 May 2011 at 8:33pm
SQLSTR = "INSERT into   temrp  SELECT *   FROM Table1 T" _
                   & " LEFT JOIN PRDT P ON T.PID = P.PID" _
                   & "  JOIN CUSTOMER C ON T.CID= C.CID" _
                   & "  where month= '" & Month(dtpmonth.Value) & "' and year= '" & Year(dtpyear.Value) "


 Dim cmd As New SqlCommand(SQLSTR, conn)
      dim da as new sqldataadapter(cmd)
dim table as new datatable
da.Fill(table)

   Dim ReportName As String = "myreport.rpt"
        ReportName = Application.StartupPath & "\" & ReportName & ""

        If Not IO.File.Exists(ReportName) Then

            Throw (New Exception("Unable to locate report file:" & vbCrLf & ReportName))

        End If
        Dim ReportForm As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument
        ReportForm.Load(ReportName)

        ReportForm.SetDataSource(Table)


this is the code i am using

i am using VS2005 with inbuilt crystal report

i do have few recorrds in the table , even in debugging in the immediate window if i check table.rows.count it displays the count as 10

but the crystal report appears blank


even when i browse the fields in design view i get the data





Print Page | Close Window