水晶报表C# [英] crystal report c#

查看:65
本文介绍了水晶报表C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家,

感谢您的收看.我面临一些问题.

我正在使用以下内容来生成报告:

Hi experts,

Thanks for viewing. I am facing some problems.

I am using followings to generate report:

OleDbConnection DBConn = new OleDbConnection("provider = microsoft.jet.oledb.4.0;" + "data source=" + Form1.path);
            OleDbDataAdapter myDataAdapter = new OleDbDataAdapter(strSQL2, DBConn);
            DataSet dataReport = new DataSet();
            myDataAdapter.Fill(dataReport, "wtdetail");
            Weighmet1 myDataReport = new Weighmet1();

            myDataReport.SetDataSource(dataReport);
            crystalReportViewer1.ReportSource = myDataReport;



这里的"strSQL2"就像这样从...中选择field1,field2,field3作为ABC".在我的设计器中,我插入了所有字段,假设field1,field2,field3.除具有别名名称"ABC"的field3外,所有字段均显示为OK.

请帮忙.

-anil kumar bhakta



Here "strSQL2" is like this "select field1,field2, field3 as ABC from ...". in my designer I have inserted all fields suppose field1,field2,field3. all fields are displayed OK except field3 which has the alias name "ABC".

any help please.

- anil kumar bhakta

推荐答案

好吧,您是否更改了查询?在查询中添加新字段,以便返回数据.然后刷新报表中的数据集(如果已经定义了预期的固定数据).
在必须与Crystal报表绑定的数据集中获得新字段后,将其拖放/使用在报表中以进行显示.
Well, did you made the query change? Add the new field in the query such that the data is returned. Then refresh your dataset in your report (if it has already defined fixed data expected).
Once you get the new field in the dataset that you must be binding with Crystal report, drag-drop/use it in your report for display.


这篇关于水晶报表C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆