Hi
Your report try to connect and get data ..you don't need that, you have
already populated your table!
All you need to do is to pass the tables to your report!
Try to run your code after comment this lines
conninfo.ServerName = "pc205";
conninfo.DatabaseName = @"C:\SampleDatabase\SAMPLE.FDB";
conninfo.UserID = "sysdba";
conninfo.Password = "masterkey";
tabloginfo.ConnectionInfo = conninfo;
foreach (Table tab in reportDoc.Database.Tables)
{
tab.ApplyLogOnInfo(tabloginfo);
}
Best regards,
Paul
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Kixzo Database Team
Sent: 03 June 2008 13:48
To: [email protected]
Subject: [Firebird-net-provider] crystal report problem
Hello All,
Yesterday I posted one problem for using Crystal Report with Firebird
database, today I tried a little bit and was able to solve that problem. I
was able to display the data on the Report.
I had to create one more report based on grouping, so it did the same for
grouping the data on the report, I was able to do that in design, but when I
started running the application I got the following message that I was
getting previously. I have taken the picture of that let me show you.
Let me show you the Field Explorer Value, for that also I have taken the
picture.
And following is my Report Design.
If I am able to connect at design time and able to get all the fields from
the table. Then what is the problem with code that I am getting the Table
not found Error.
I am using the following Code.
FbConnection connect = new
FbConnection(@"Database=C:\SampleDatabase\SAMPLE.FDB;USER=sysdba;password=ma
sterkey;");
connect.Open() ;
FbDataAdapter adapter = new
FbDataAdapter("SELECT
EMPLOYEE.EMPNAME,ADDRESS.CITY,ADDRESS.STATE,ADDRESS.ZIPCODE FROM
ADDRESS,EMPLOYEE WHERE EMPLOYEE.EMPLOYEE_ID= ADDRESS.EMPLOYEE_ID", connect);
DataSet ds = new DataSet();
adapter.Fill(ds);
string reportname = "CrystalReport1";
string ReportPath = reportname +".rpt";
if(!File.Exists(ReportPath))
{
MessageBox.Show("Can not locate the report file");
}
ReportDocument reportDoc = new ReportDocument();
reportDoc.Load(ReportPath);
reportDoc.SetDataSource(ds.Tables[0]);
conninfo.ServerName = "pc205";
conninfo.DatabaseName = @"C:\SampleDatabase\SAMPLE.FDB";
conninfo.UserID = "sysdba";
conninfo.Password = "masterkey";
tabloginfo.ConnectionInfo = conninfo;
foreach (Table tab in reportDoc.Database.Tables)
{
tab.ApplyLogOnInfo(tabloginfo);
}
RptViewer1.ReportSource = reportDoc;
connect.Close();
the same Code I used for getting data from single Table, only the query was
different.
Please, help me in this, I am really frustared on this.
Regards,
Rakesh Singh,
http://www.4colordesign.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider