我如何从数据表中设置Crystal Report字段代码. [英] How do i set crystal report field from datatable i code.
本文介绍了我如何从数据表中设置Crystal Report字段代码.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个用c#开发的数据表,它与数据库字段的数据表不完全相同.它还包含其他字段的详细信息.
I have a datatable developed in c#, which is not exactly same as that of Database fields. It contains detail from other fields as well.
推荐答案
您需要做的只是这样的事情:
All you need to do is something like:
// Create instance of the crystal report.
CrystalReport1 report = new CrystalReport1();
// Set data source to the crystal report - your custom made Datatable here
report.Database.Tables["table1"].SetDataSource((DataTable)demoTable);
// Assign the report to the Crystal report viewer.
crystalReportViewer.ReportSource = report;
有关某些详细信息,请此处 [
For some details, have a look here[^].
这篇关于我如何从数据表中设置Crystal Report字段代码.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文