May 20th, 2011, 02:36 AM
blank report displayed at design & runtime
QLSTR = "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
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))
Dim ReportForm As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument
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
May 20th, 2011, 09:51 AM
Re: blank report displayed at design & runtime
I'm not sure if Crystal Reports accepts that kind of sql 'query'
Could you try removing the 'Insert into Temp' part of the sql clause?
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!