New to Crystal Reports in .Net

Last post 05-11-2008 12:16 AM by joseabie. 7 replies.

Sort Posts:

  • New to Crystal Reports in .Net

    05-07-2008, 3:50 PM
    • Loading...
    • netplan
    • Joined on 11-16-2003, 3:07 PM
    • Posts 82

    Hi,

    Is it possible to connect to a datasource without using a DSN in Crystal Reports.Net?

    If so, how is it done? I've tried different things in the Database Expert but no luck. I already have a global connection string in my web config and I would like to use that if possible.

    Thanks

  • Re: New to Crystal Reports in .Net

    05-08-2008, 1:45 AM

    Are you creating console application or web??? 

    Regards.
    mimranshafiq
    .NET Web Developer
    http://www.dotnetclassic.com
  • Re: New to Crystal Reports in .Net

    05-08-2008, 3:14 AM
    • Loading...
    • joseabie
    • Joined on 04-07-2008, 4:56 AM
    • Abu Dhabi
    • Posts 82
  • Re: New to Crystal Reports in .Net

    05-08-2008, 5:37 AM

    hi

    i am using .net 2005. in my project i am using crystal reports.while exporting the crystal reports to pdf  the barcode font is decreasing because of that i am not able to read the barcode with barcode reader and also the size is very small. please tell me the solution as soon as possible

    Thanks

    Regards

    A.rajesh

  • Re: New to Crystal Reports in .Net

    05-08-2008, 6:47 AM

    web

  • Re: New to Crystal Reports in .Net

    05-08-2008, 7:59 AM
    • Loading...
    • netplan
    • Joined on 11-16-2003, 3:07 PM
    • Posts 82

    I am creating reports in a web application.

  • Re: New to Crystal Reports in .Net

    05-08-2008, 9:34 AM
    • Loading...
    • netplan
    • Joined on 11-16-2003, 3:07 PM
    • Posts 82

    Thanks joseabie

    I was able to connect but I'm not sure how to integrate this into my application. I'm used to Crystal Reports 8.5 with VB where I can drag field items onto my report. Is this still possible with your method?

    I did a quick mockup of a form: 

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim cn As New SqlConnection(MainConnectionString)
            Dim cm As New SqlCommand()
    
            cm.Connection = cn
            cm.CommandText = "MyStoredProc"
            cm.CommandType = Data.CommandType.StoredProcedure
    
            Dim da As New SqlDataAdapter
            da.SelectCommand = cm
    
            Dim ds As New Data.DataSet
    
            da.Fill(ds, "MyStoredProc")
            Try
                rpt.Load(Server.MapPath("../../MyReport.rpt"))
                rpt.SetDataSource(ds)
                Me.CrystalReportViewer1.ReportSource = rpt
    
            Catch ex As Exception
    
            End Try
    
        End Sub
     and I get an error at Me.CrystalReportViewer1.ReportSource = rpt...saying no tables are loaded. I'm using a simple stored procedure that returns all users in the database for test purposes.
  • Re: New to Crystal Reports in .Net

    05-11-2008, 12:16 AM
    • Loading...
    • joseabie
    • Joined on 04-07-2008, 4:56 AM
    • Abu Dhabi
    • Posts 82

    Actually i am using CR11, ASP.Net 2.0 VB,,

    when you connect the report with database select

    Project Data (hope you added your storedprocedure in dataset)

    -> expand .Net objects -> you an c your stored procedure

    -> select your procedure -> update....

    now you can add the table fields in to your reports

     

    Smile

     

Page 1 of 1 (8 items)