Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Database for CrystalReportView webform object
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00671726
Message ID:
00671768
Vues:
17
This message has been marked as the solution to the initial question of the thread.
You need to put it above the Public Class line so it is the first line of your Code-behind file like the following:
Imports CrystalDecisions.Shared

Public Class MyPageClass
    Inherits System.Web.UI.Page
    Protected WithEvents dgrCustomers As System.Web.UI.WebControls.DataGrid
  ...
>Cathi
>
>You you say at the top, where is that? I go into the code and try to put the Imports at the Top under Inherits and Protected WithEvents CrystalReportView1 and it says it has to be before any declarations, so I moved it as the very first, same thing, and between those two lines, the same thing.
>
>
>Back to the msdn example, now that I can create the TableLogOnInfo object, Now I get the same problem with "report" object in the example. Is this somewhere else that I need to import?
>
>Here is the code now:
>
>
>       'Put user code to initialize the page here
>        Dim logOnInfo As New CrystalDecisions.Shared.TableLogOnInfo()
>        Dim i As Integer
>
>        ' Loop through every table in the report.
>        For i = 0 To report.Database.Tables.Count - 1                  <== Error on report
>            ' Set the connection information for current table.
>            logOnInfo.ConnectionInfo.ServerName = "cqi-termserv"
>            logOnInfo.ConnectionInfo.DatabaseName = "ctore"
>            logOnInfo.ConnectionInfo.UserID = "ctore"
>            logOnInfo.ConnectionInfo.Password = "cqi$$"
>            report.Database.Tables.Item(i).ApplyLogOnInfo(logOnInfo)   <==Error on report
>
>        Next
>
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform