Crystal Report数据库登录错误......! [英] Crystal Report Database Login Error...!
问题描述
喜。我是Crystal Reports的新手。我此刻有些问题。我正在开发一个小型POS系统,因为我正在尝试/测试小东西,然后才开始使用。
我找到了一个网站
Crystal Report Step by Step
这是一个非常对我来说很有用的网站。
几乎每个报告的工作都与网站中提到的一样。
我开始使用XML文件创建水晶报告。
它在我开发的电脑中完美运行。但是当我试图在另一台PC上运行相同的C#windows应用程序时,它不断给我一个对话框,询问数据表的用户名和密码。
我''我确定我从未向应用程序提供任何身份验证详细信息。但每当我试图在不同的电脑上运行该应用程序时,它会提示要求输入用户名和密码的消息。
请帮助我......!
XML文件
< product>
< product_id> 1
< product_name>产品1
< ; product_price> 1000
< product>
< product_id> 2
< product_name>产品2
< product_price> 2000
< product>
< product_id> 3
< product_name>产品3
< product_price> 3000
< product>
< product_id> 4
< product_name>产品4
< product_price> 4000
--------------------------- ------------------- ----------
从Crystal Report向导中添加XML文件作为数据源文件。
- -------------------------------------------------- -----
表格加载代码...... !!!
使用CrystalDecisions.CrystalReports .Engine;
使用CrystalDecisions.Shared;
命名空间testXML
{
公共部分类Form1:表格
{
public Form1()
{
InitializeComponent(); < br $>
}
private void Form1_Load(object sender,EventArgs e)
{
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(G:\\Mywork \\testXML \\testXML \\CrystalReport1.rpt);
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
}
}
}
很确定你的问题在这里:
cryRpt.Load(G:\\Mywork \\testXML \\testXML \\CrystalReport1.rpt);
试试这个:
cryRpt.Load(G:\\ \\Mywork\testXML\testXML\CrystalReport1.rpt);
hi. I''m New to Crystal Reports. I''m bit stucked with some problem at the moment. I''m developing a small POS system, for that I''m trying/ testing small stuffs before starting for the thing.
I found a site
Crystal Report Step by Step
this was a very helpful web site for me.
almost every reports works as mentioned in the site.
I started creating a crystal report using a XML file.
it worked perfectly in my developing pc. But when I tried to run the same C# windows application on a different PC it keeps giving me a dialog box asking user name and password for the datatable.
I''m sure I never gave any authentication details to the Application. but everytime i tried to run the application on a differnt pc it prompts the message asking for username and password.
Please Help Me....!
XML file
<product>
<product_id>1
<product_name>Product 1
<product_price>1000
<product>
<product_id>2
<product_name>Product 2
<product_price>2000
<product>
<product_id>3
<product_name>Product 3
<product_price>3000
<product>
<product_id>4
<product_name>Product 4
<product_price>4000
--------------------------------------------------------
Added the XML file as a DataSource File from the Crystal Report Wizard.
---------------------------------------------------------
Form Load Code...!!!
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
namespace testXML
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load("G:\\Mywork\\testXML\\testXML\\CrystalReport1.rpt");
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
}
}
}
Pretty sure your problem is here:
cryRpt.Load("G:\\Mywork\\testXML\\testXML\\CrystalReport1.rpt");
Try this instead:
cryRpt.Load("G:\Mywork\testXML\testXML\CrystalReport1.rpt");
这篇关于Crystal Report数据库登录错误......!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!