如何动态创建水晶报表? [英] How to create crystal report dynamically?

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

问题描述

大家好.
我想动态创建报告..
我正在将树液晶体报告与vs2010一起使用13.0.2000.0 ..

我已经为报告写了存储过程..
如果用户选中复选框,则报告中仅显示选中的列..

我已经通过此链接带有C#的动态Crystal Report ..但是,他们在此链接中使用了数据集和书面查询,但我想使用OLE DB(ADO)和存储过程..

Hi guys..
I want to create report dynamically..
I am using sap crystal reports 13.0.2000.0 with vs2010..

I have writen stored procedure for report ..
if user check the the check box then only checked columns should display in report..

I have gone through this link Dynamic Crystal Report with C# ..but in this link they have used data set and written query but i want to use OLE DB(ADO) and stored procedure..

how to do this?

推荐答案

假设您有5列
第1栏第2栏第3栏第4栏第5
..............
在表格中选择所需的列
假设我选择了第一,第三和第四列



然后声明参数并以编程方式使用
将其发送给报告 crystalreport.SetParameterValue("column1","column1");
crystalreport.SetParameterValue("column2","column2"); .........


然后在报表中转到格式对象...您可以看到一个选项"supress" ..在其中写一个格式.... like
if(column1 ="true")
然后(false)
其他
真实

..............


您必须对每一列都进行此操作......希望对您有所帮助
suppose you have 5 columns
column 1 column 2 column 3 column4 column5
..............
select the columns you want in the form
suppose i selected 1st,3rd and 4th column



then declare parameters and programatically send them to report using
crystalreport.SetParameterValue("column1","column1");
crystalreport.SetParameterValue("column2","column2");..............


then in report go to format object......you can see an option "supress".......write a fomula in tht.......like
if(column1="true")
then(false)
else
true

..............


you have to do it for each column.................i hope this will help you out


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

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