Professional Web Applications Themes

crystal reports logon problems - Microsoft SQL / MS SQL Server

Kjartan, I had the same problem...I had to add the following in the code-behind for my aspx page. In the Page_Load sub, add the "FOR" loop. It will help you supply the password to your db for your reports. 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 Dim crReportDoc As ReportDoent Dim MyTable As CrystalDecisions.CrystalReports.Engine.Table Dim MyLogin As CrystalDecisions.Shared.TableLogOnInfo Dim FilePath As String crReportDoc = New ReportDoent crReportDoc.Load("...YourPathHere\YourReportNameHe re.rpt") For Each MyTable In crReportDoc.Database.Tables MyLogin = MyTable.LogOnInfo MyLogin.ConnectionInfo.Password = "?????????" MyLogin.ConnectionInfo.UserID = "??????" MyTable.ApplyLogOnInfo(MyLogin) Next CrystalReportViewer1.ReportSource = crReportDoc ...

  1. #1

    Default Re: crystal reports logon problems

    Kjartan,

    I had the same problem...I had to add the following in the code-behind
    for my aspx page.

    In the Page_Load sub, add the "FOR" loop. It will help you supply the
    password to your db for your reports.

    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
    Dim crReportDoc As ReportDoent
    Dim MyTable As CrystalDecisions.CrystalReports.Engine.Table
    Dim MyLogin As CrystalDecisions.Shared.TableLogOnInfo
    Dim FilePath As String

    crReportDoc = New ReportDoent
    crReportDoc.Load("...YourPathHere\YourReportNameHe re.rpt")

    For Each MyTable In crReportDoc.Database.Tables
    MyLogin = MyTable.LogOnInfo
    MyLogin.ConnectionInfo.Password = "?????????"
    MyLogin.ConnectionInfo.UserID = "??????"
    MyTable.ApplyLogOnInfo(MyLogin)
    Next

    CrystalReportViewer1.ReportSource = crReportDoc
    CrystalReportViewer1.DataBind()
    End Sub

    Good Luck!
    Jeff

    "Kjartan Malthe-Sorenssen" <no> wrote
    in

    message news:<074d01c35ddd$5dc3bb50$gbl>... 
    jsb Guest

  2. #2

    Default Re: crystal reports logon problems

    Hi

    It doesn't quite work. Rather than asking for the
    password for the server it now asks for the password to
    the individual tables instead.
    Thanks for trying though!

    Kjartan

     
    the code-behind 
    you supply the 
    ByVal e As 
    CrystalDecisions.CrystalReports.Engine.Table 
    CrystalDecisions.Shared.TableLogOnInfo 
    ("...YourPathHere\YourReportNameHere.rpt") 
    <no> wrote [/ref]
    with [/ref]
    supplied [/ref]
    time [/ref]
    in a 
    >.
    >[/ref]
    Kjartan Guest

  3. #3

    Default Re: crystal reports logon problems

    I am sure the solution to your problem is in the crystal reports knowledge
    base -

    http://support.crystaldecisions.com/search/advsearch.asp

    "Kjartan Malthe-Sorenssen" <no> wrote in
    message news:074d01c35ddd$5dc3bb50$gbl... 


    Adrian Guest

Similar Threads

  1. Crystal Reports
    By Carolina G?mez A in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 30th, 10:23 PM
  2. Crystal Reports + ASP again
    By Chris in forum ASP
    Replies: 2
    Last Post: September 18th, 11:06 AM
  3. Logon failed with Crystal Reports
    By Carlo in forum ASP.NET General
    Replies: 2
    Last Post: August 25th, 09:29 AM
  4. How to use Crystal Reports 8.5 in ASP v 3
    By Mustafa Haider in forum ASP
    Replies: 1
    Last Post: July 22nd, 07:42 PM
  5. problems deploying Crystal Reports
    By hippy in forum ASP.NET General
    Replies: 0
    Last Post: July 16th, 03:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139