Unable to connect to any mySQL host
Posted: Wed Jan 10, 2018 2:08 am
I have deploy my app include Stimulsoft.Base.dll, Stimulsoft.Controls.dll, Stimulsoft.Controls.Win.dll, Stimulsoft.Report.dll, Stimulst oft.Report.Win.dll
But when i tried to run my app containing stimulsoft report, its written "Unable to connect to any mySQL host".
What could be the problem?
But when i tried to run my app containing stimulsoft report, its written "Unable to connect to any mySQL host".
Code: Select all
using (StiReport report = new StiReport())
{
report.Dictionary.Databases.Clear();
if (cboTransactionType.Text.Equals("CASH"))
{
report.Load("CashInvoice.mrt");
report.Dictionary.Databases.Add(new StiMySqlDatabase("cashinvoice",
CommonDaoBase.ActualConnectionString));
}
else
{
report.Load("TermInvoice.mrt");
report.Dictionary.Databases.Add(new StiMySqlDatabase("terminvoice",
CommonDaoBase.ActualConnectionString));
}
report.Dictionary.Databases.Add(new StiMySqlDatabase("company",
CommonDaoBase.ActualConnectionString));
report.Dictionary.Variables["varCompanyCode"].ValueObject = Form1.CompanyCode.ToString();
report.Dictionary.Variables["varInvNumber"].ValueObject = intInvNumber.ToString();
//report.Show(true);
report.Print(true);
//report.Print(false);
}