Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. asp.net , c# converting crystal report to pdf not working

asp.net , c# converting crystal report to pdf not working

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasesysadminhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rajkumar 3
    wrote on last edited by
    #1

    i have given the following code to get pdf file from crystal report but at last line browser is not moving forwars its just showing process ... can any one help in this regard SqlConnection myConnection = new SqlConnection(); myConnection.ConnectionString = "Data Source=raj;User ID=sa;PWD=****;Initial Catalog=****"; SqlCommand MyCommand = new SqlCommand(); MyCommand.Connection = myConnection; MyCommand.CommandText = "Select top 5 * from items"; MyCommand.CommandType = CommandType.Text; SqlDataAdapter MyDA = new SqlDataAdapter(); MyDA.SelectCommand = MyCommand; DataSet myDS = new DataSet(); MyDA.Fill(myDS, "items"); testrpt oRpt = new testrpt(); oRpt.SetDataSource(myDS); ReportDocument doc = new ReportDocument(); string fileName = Server.MapPath("testrpt.rpt"); TableLogOnInfo LogInfo = new TableLogOnInfo(); LogInfo.ConnectionInfo.ServerName = "raj"; LogInfo.ConnectionInfo.UserID = "sa"; LogInfo.ConnectionInfo.Password = "sa!2009"; LogInfo.ConnectionInfo.DatabaseName = "fssads"; CrystalDecisions.CrystalReports.Engine.ReportDocument O_Report = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); O_Report.Load(Server.MapPath("testrpt.rpt")); O_Report.Database.Tables[0].ApplyLogOnInfo(LogInfo); O_Report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "rptpdf");

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups