简体   繁体   English

如何使用Crystal Report在C#Winforms中仅在运行时显示报告中的选定字段?

[英]How to displays only selected fields from the report at runtime in c# winforms using crystal report?

I am developing an win forms application for now i want to generate a crystal report that is dynamically. 我现在正在开发一个win窗体应用程序,我想生成动态的水晶报表。 Means if my table contains 30 fields so i will design my 30 fields on front end just take checkbox or dropdown so, based up on the user selection i want to generate report ie,dynamically. 意味着如果我的表包含30个字段,那么我将在前端设计我的30个字段,只需选中复选框或下拉列表,这样,就可以根据用户选择来生成报告,即动态生成报告。 So i have already but i got a bunch of errors just like as asking prompt message for enter a value.(If i have set list of values option as "Dynamic" too) 所以我已经有但是我遇到了很多错误,就像询问输入值的提示消息一样。(如果我也将值列表选项设置为“动态”)

Those issues are not solvable me i irritated a lot. 我很烦恼那些问题无法解决。

Can you give me any reference or procedure to make report as dynamic in my win forms using c# and database as SQL. 您能否给我任何参考或过程,以使用c#和数据库作为SQL在我的win表单中使报告动态化。

Thanks help me out. 谢谢帮帮我。

In case of dynamic Report with dynamic fields, I afraid you have to create the report programmatically. 如果使用具有动态字段的动态报表,恐怕您必须以编程方式创建报表。 So you can iterate over all existing objects in your report in ReportDocument and either take them out or add them to the report depending on the date you want to visualize. 因此,您可以遍历ReportDocument中报表中的所有现有对象,然后根据要显示的日期将它们取出或添加到报表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM