Crystal Reports using C#

Results 1 to 3 of 3

Thread: Crystal Reports using C#

  1. #1
    Join Date
    Dec 1969

    Default Crystal Reports using C#

    I&#039;m try to fix the login error with crystal reports and using c#. Can someone help me with this?<BR><BR>It keeps giving me this error<BR><BR> px.cs(41): A local variable named &#039;crTable&#039; cannot be declared in this scope because it would give a different meaning to &#039;crTable&#039;, which is already used in a &#039;parent or current&#039; scope to denote something else<BR><BR>----------------------------------------------------------------<BR><BR>CrystalReport1 crpt = new CrystalReport1();<BR> TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();<BR> ConnectionInfo crConnectionInfo = new ConnectionInfo();<BR><BR> CrystalDecisions.CrystalReports.Engine.Database crDatabase;<BR> CrystalDecisions.CrystalReports.Engine.Table crTable;<BR> CrystalDecisions.CrystalReports.Engine.Tables crTables;<BR> CrystalReportViewer1.ReportSource = crpt;<BR><BR> crConnectionInfo.ServerName = "";<BR> crConnectionInfo.DatabaseName = "";<BR> crConnectionInfo.UserID = "";<BR> crConnectionInfo.Password = "";<BR> crDatabase = crpt.Database;<BR> crTables = crDatabase.Tables;<BR><BR> foreach(CrystalDecisions.CrystalReports.Engine.Tab le crTable in crTables)<BR> {<BR> crTableLogOnInfo = crTable.LogOnInfo;<BR> crTableLogOnInfo.ConnectionInfo = crConnectionInfo;<BR> crTable.ApplyLogOnInfo(crTableLogOnInfo);<BR> }<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Crystal Reports using C#

    CrystalReport1 crpt = new CrystalReport1();<BR>TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();<BR>ConnectionInfo crConnectionInfo = new ConnectionInfo();<BR><BR>CrystalDecisions.CrystalR eports.Engine.Database crDatabase;<BR><BR>//DECLARATION HERE CONFLICTS WITH (see below).......<BR>CrystalDecisions.CrystalReports.E ngine.Table crTable;<BR><BR>CrystalDecisions.CrystalReports.En gine.Tables crTables;<BR>CrystalReportViewer1.ReportSource = crpt;<BR><BR>crConnectionInfo.ServerName = "";<BR>crConnectionInfo.DatabaseName = "";<BR>crConnectionInfo.UserID = "";<BR>crConnectionInfo.Password = "";<BR>crDatabase = crpt.Database;<BR>crTables = crDatabase.Tables;<BR><BR>//DECLARATION HERE<BR>foreach(CrystalDecisions.CrystalReports.En gine.Table crTable in crTables)<BR>{<BR>crTableLogOnInfo = crTable.LogOnInfo;<BR>crTableLogOnInfo.ConnectionI nfo = crConnectionInfo;<BR>crTable.ApplyLogOnInfo(crTabl eLogOnInfo);<BR>}<BR>

  3. #3

    Default Confused

    Hi,<BR>I&#039;ve done a bit with CrystalReports, but this doesn&#039;t seem familiar.<BR>Are they complex reports?<BR><BR>To design and view a report,I used:<BR>MyReportData.xsd (Custom Dataset) to edit the report.<BR>A couple SPs to fill the MyReportData dataset.<BR>MyReport.SetDataSource(MyReportData)<B R>CrystalReportViewerWeb.ReportSource = MyReport<BR><BR>-A

Posting Permissions

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