Friday, March 30, 2012

Report erroe

Hi All ,

i got tired from the component crytsal reports but i need it to finish an application i'm building .

i got the folloiwng error when i try to run the report.

ONE : Cannot implicitly convert type 'CrystalDecisions.Shared.TableLogOnInfos' to 'CrystalDecisions.Shared.TableLogOnInfo'

TWO: foreach statement cannot operate on variables of type 'CrystalDecisions.Shared.TableLogOnInfo' because 'CrystalDecisions.Shared.TableLogOnInfo' does not contain a public definition for 'GetEnumerator'

and here is the code that i'm using:

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace Hope
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void ConfigureCrystalReports()
{

ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.DatabaseName = "NorthWind";
connectionInfo.UserID = "";
connectionInfo.Password = "";

string reportPath = Application.StartupPath + "\\" +
"NorthwindCustomers.rpt";
crystalReportViewer.ReportSource = reportPath;



SetDBLogonForReport(connectionInfo);

}

private void Form1_Load(object sender, EventArgs e)
{
ConfigureCrystalReports();

}

private void SetDBLogonForReport(ConnectionInfo connectionInfo)
{
TableLogOnInfo tableLogOnInfos = crystalReportViewer.LogOnInfo;

foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
{
tableLogOnInfo.ConnectionInfo = connectionInfo;
}


please try to help me find out , what's the problem , i'll get mad soon,hi
this is saurabh

i have creating a crystal report. in this report i want inserting no. of images .
can i put these images directly into the folders.
without saving in database.

plz... give reply as soon as possible....!|||Are you jokking ,

why to post here in my thread , create your own.

i'm so amazed from your action ,

No comments:

Post a Comment