User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,565 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,583 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1824 | Replies: 0
Reply
Join Date: Apr 2007
Location: Birmingham
Posts: 378
Reputation: Fungus1487 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 38
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Whiz

crystal reports in asp.net

  #1  
Oct 25th, 2007
im having trouble using the PUSH method to generate a report .

this is my code.

Try
            cr1.Visible = False
            Dim myConnection As New SqlClient.SqlConnection
            myConnection.ConnectionString = "Data Source=someplace;Initial Catalog=somedb;User Id=someid;Password=somepass;"

            Dim MyCommand As New SqlClient.SqlCommand
            MyCommand.Connection = myConnection
            MyCommand.CommandText = "Select * from asset where assetid < 10"
            MyCommand.CommandType = CommandType.Text

            Dim MyDA As New SqlClient.SqlDataAdapter
            MyDA.SelectCommand = MyCommand

            Dim myDS As New dyn_dataset
            'This is our DataSet created at Design Time      

            MyDA.Fill(myDS, "asset")

            Dim oRpt As New dyn_report2
            ' This is the Crystal Report file created at Design Time

            oRpt.SetDataSource(myDS)

            cr1.ReportSource = oRpt
            ' Set the Crystal Report Viewer's property to the oRpt Report object
            cr1.Visible = True
        Catch e As Exception
            Response.Write("<h3>" & e.Message & "</h3>")
            Response.Write("<h3>" & e.Source & "</h3>")
            Response.Write("<h3>" & e.StackTrace & "</h3>")
        End Try

and this is my error message

////////////////
Load report failed.
CrystalDecisions.CrystalReports.Engine
at .F(String  , EngineExceptionErrorID  ) at .B(String , Int32 ) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(Object value) at sam_test.dyn_test.BindReport() in c:\inetpub\wwwroot\sam_test\CHANGECONN\dyn_test.aspx.vb:line 51
///////////////////

i know the report is their but i keep getting a load report failed
Last edited by Fungus1487 : Oct 25th, 2007 at 8:10 am.
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 5:52 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC