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. Crystal Report Error Message

Crystal Report Error Message

Scheduled Pinned Locked Moved ASP.NET
databasesysadminsecurityhelp
3 Posts 2 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.
  • M Offline
    M Offline
    macca24
    wrote on last edited by
    #1

    I have a crystal report which was running fine but now gives me an error about logon failed and it highlights the following line: oStream = crpt28.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) Here is the code I am using: Imports System.Web.Security Imports System.Data.SqlClient Imports System.DateTime Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Dim crpt28 As CrystalReport28 Dim crpt28 As CrystalReport28 Dim myTable As CrystalDecisions.CrystalReports.Engine.Table Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo Dim Param As SqlParameter Dim SqlCom As SqlCommand Dim sqlcon As New SqlConnection("Data Source=server;database=data;user id=user;password=pass") Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here crpt28 = New CrystalReport28 For Each myTable In crpt28.Database.Tables myLogin = myTable.LogOnInfo myLogin.ConnectionInfo.Password = "kris" myLogin.ConnectionInfo.UserID = "kris" myTable.ApplyLogOnInfo(myLogin) Next CrystalReportViewer1.ReportSource = crpt28 Dim oStream As New System.IO.MemoryStream oStream = crpt28.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Try Response.BinaryWrite(oStream.ToArray()) Response.End() Catch err As Exception Response.Write("< BR >") Response.Write(err.Message.ToString) End Try crpt28.Close() crpt28.Dispose() crpt28 = Nothing End Sub

    V 1 Reply Last reply
    0
    • M macca24

      I have a crystal report which was running fine but now gives me an error about logon failed and it highlights the following line: oStream = crpt28.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) Here is the code I am using: Imports System.Web.Security Imports System.Data.SqlClient Imports System.DateTime Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Dim crpt28 As CrystalReport28 Dim crpt28 As CrystalReport28 Dim myTable As CrystalDecisions.CrystalReports.Engine.Table Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo Dim Param As SqlParameter Dim SqlCom As SqlCommand Dim sqlcon As New SqlConnection("Data Source=server;database=data;user id=user;password=pass") Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here crpt28 = New CrystalReport28 For Each myTable In crpt28.Database.Tables myLogin = myTable.LogOnInfo myLogin.ConnectionInfo.Password = "kris" myLogin.ConnectionInfo.UserID = "kris" myTable.ApplyLogOnInfo(myLogin) Next CrystalReportViewer1.ReportSource = crpt28 Dim oStream As New System.IO.MemoryStream oStream = crpt28.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Try Response.BinaryWrite(oStream.ToArray()) Response.End() Catch err As Exception Response.Write("< BR >") Response.Write(err.Message.ToString) End Try crpt28.Close() crpt28.Dispose() crpt28 = Nothing End Sub

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      macca24 wrote:

      oStream = crpt28.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

      Your db credentials that are being used are correct?

      Vasudevan Deepak Kumar Personal Homepage
      Tech Gossips
      A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

      M 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        macca24 wrote:

        oStream = crpt28.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

        Your db credentials that are being used are correct?

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

        M Offline
        M Offline
        macca24
        wrote on last edited by
        #3

        yes, they are correct.

        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