I've pasted the code below. I don't think it's the code that's the issue,
since it works fine on this machine, but blows up on the server. Here is is
either way;
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim dt As New dbTier
Dim ds As DataSet, dv As DataView
Dim dsA As New dsCourses
Dim i As Long
Dim r As DataRow
Dim t As Long
t = Date.Now.Ticks( )
ds = dt.GenericDS("S ELECT * FROM [viewCourses];")
'!!!!!! NOTE: The following line is where the code blows up on the server.
dv = ds.Tables(0).De faultView
'!!!!!!
For i = 0 To dv.Count - 1
' Check to see if this record is valid.
r = dsA.Tables("vie wCourses").NewR ow()
r("CourseID") = dv(i)("CourseID ")
r("Title") = dv(i)("Title")
r("Description" ) = dv(i)("Descript ion")
r("Safety") = dv(i)("Safety")
r("RetrainInter val") = dv(i)("RetrainI nterval")
dsA.Tables("vie wCourses").Rows .Add(r)
Next
ds.Dispose()
r = dsA.Tables("Hea ding").NewRow
r("Heading1") = "Western Forest Products Inc."
r("Heading2") = ""
dsA.Tables("Hea ding").Rows.Add (r)
' Load the report document and push in the data.
Dim fname As String
Dim rpt As New ReportDocument
Dim repName As String
'rpt.Load(Serve r.MapPath("rptT rainingRequired _I.rpt"))
repName = Request.Form("r epName")
rpt.Load(Server .MapPath(repNam e))
Dim exp As ExportOptions = rpt.ExportOptio ns
exp.ExportForma tType = ExportFormatTyp e.PortableDocFo rmat
exp.ExportDesti nationType = ExportDestinati onType.DiskFile
exp.Destination Options = New DiskFileDestina tionOptions
fname = GetNewFilename( ) & ".pdf"
exp.Destination Options.diskfil ename = Server.MapPath( "reports/pdf/"
& fname)
rpt.SetDataSour ce(dsA)
rpt.Export()
Link = "reports/pdf/" & fname
t = Date.Now.Ticks - t
ElapsedTicks = t
End Sub
"Patrick.O. Ige" <na********@hot mail.com> wrote in message
news:%2******** *******@TK2MSFT NGP14.phx.gbl.. .
Rico maybe try posting some code how you are trying to
write the report
Patrick
"Rico" <r c o l l e n s @ h e m m i n g w a y . c o mREMOVE THIS PART IN
CAPS> wrote in message news:Sw8Ef.4095 03$2k.312999@pd 7tw1no... Hello,
I have a web application that I developed in ASP.NET on one machine and
I'm trying to deploy it on a Windows 2003 Server. The application runs fine
on the development workstation connected to the development SQL Server 2000.
I've deployed the application to the server and it works fine, accesses
the data in the SQL database, but the problem comes when I try to create a
report using a dataset. I get an error "Object reference not set to an
instance of an object". This occurs on every report I try. Any idea
what
I should look at?
I also have a second problem; the server does not (and will not) have
VS2003 installed, I have administrator privledges, I have taken all the
advice I can from elsewhere on the net (re: IIS set up, HTTP Keep Alive,
Windows Authentication etc) but I can't debug the ASP.net application
from
this workstation, I get the error "Unable to start debugging on the web
server. The debugger is not properly installed. Run setup to install or
repair the debugger." But the problem is, Visual Studio is not going to
be installed on the server and I know debugging can take place without VS
installed, but can't find a solution to this problem.
Any help would be greatly appreciated.
Thanks!