asp.net中的参数化水晶报告问题 [英] issue with parametric crystal report in asp.net

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

问题描述

希望大家新年快乐,祝大家新年快乐。

Hope you all are doing well and happy new year to you all.

我正在使用visual studio 2010,我安装了水晶报告在它里面。我想根据通过dropdownlist传递的值来运行报告,该报告绑定到数据库。虽然我得到报告无论我在
下拉列表中选择的第一项,但是当我选择任何其他值时无法获得报告。这是我正在使用的代码

I am using visual studio 2010 and I installed crystal reports in it as well. I wanted to run a report based on the values passed through dropdownlist which is bound to a database. Although i get the report whatever the first item i select in the dropdownlist but not able to get the report when i select any other value. Here is the code which i am using

private ReportDocument report = new ReportDocument();
protected void Button1_Click(object sender, EventArgs e) { // get the selected CategoryID int categoryID = Convert.ToInt32(DropDownList1.SelectedValue); //report.SetParameterValue("CategoryID", categoryID); ///CrystalReportViewer1.ReportSource = report; ReportDocument report = new ReportDocument(); report.Load(Server.MapPath("CrystalReport1.rpt")); report.FileName = Server.MapPath("CrystalReport1.rpt"); report.SetParameterValue("CategoryID", categoryID); CrystalReportViewer1.ReportSource = report; }


I am able to get the said report in crystal report when i enter different values as parameters in the crystal report file but not able to get the required report in the web form.


Abdul Ghaffar


Abdul Ghaffar

推荐答案

将参数传递给Crystal报表

Passing Parameter to Crystal Report

http://weblogs.asp.net/grblog/archive/2008/08/14/passing-parameter -to-crystal-report.aspx

问候,

Narendran Ponpandiyan

Narendran Ponpandiyan


这篇关于asp.net中的参数化水晶报告问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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