根据控制值在Crystal报表上显示数据 [英] Display Data On Crystal Report Based on a Control value

查看:59
本文介绍了根据控制值在Crystal报表上显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个窗口窗体,其中包含两个日期时间选择器和两个按钮

我的数据库中有一组按日期时间区分的数据.

我想在水晶报表中显示该数据,过程是


当我从窗口窗体的两个日期时间选择器中选择2个日期并单击一个按钮时,必须显示水晶报表,并且该报表包含的值取决于给定的日期(两个日期之间的值)

怎么可能?


请帮助


Kishore R
Gis solutions

I have a window form consists of two datetime picker and two buttons

i have a collection of data in database differentiating by datetime.

I want to display that data in crystal report, the procedure is


When i select 2 dates from two datetime picker in the window form,and click on a button, the crystal report must be shown and it contains values depending upon the date given(values in between two dates)

How is it possible?


Kindly help


Kishore R
Gis solutions

推荐答案

1.使用两个日期选择器,一个按钮和一个水晶查看器保存一个表单.
2.根据选择的两个日期,显示水晶报表.
一个.在按钮单击事件上,获取两个日期选择器的值
b.使用这些值作为存储过程的参数,或使用查询来获取数据.基本上基于两个日期选择器值获取数据.
C.将数据集绑定到Crystal报表
d.显示它.

有关动态生成报告的一些帮助,请参见此处:使用C#的动态Crystal报表 [ ^ ]

立即尝试!
1. Keep a form with two datepicker, a button and crystal viewer.
2. Based on the two dates selected, show the crystal report.
a. On button click event, get the values of two datepickers
b. Use the values as a parameter to the Stored Procedure or Query whatever you are using to fetch data. Basically fetch the data based on the two datepicker values.
c. Bind the dataset to the crystal report
d. display it.

For some help on dynamic generation of reports, look here: Dynamic Crystal Report with C#[^]

Try now!


这篇关于根据控制值在Crystal报表上显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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