如何将查询字符串传递给crystal报表 [英] how to pass the query string to the crystal report

查看:67
本文介绍了如何将查询字符串传递给crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我正在开发一个工资单应用程序,因为我正在使用水晶报表,只是我想将查询字符串(empid)传递给水晶报表,基于报告将生成的empid,可以任意一个帮助我

hi everyone i am developing one payroll application,for that i am using crystal report,just i want to pass the query string(empid) to the crystal report,based on the empid the report will be generated,,,can any one help me

推荐答案

变量可以作为Crystal Reports中的参数传递,而不是作为查询字符串传递



试试这个,

Variables can be passed as parameters in Crystal Reports, not as query string

Try this,
<CR:CrystalReportSource ID="reportSource" runat="server">          </CR:CrystalReportSource>




reportSource.ReportDocument.Load(Server.MapPath("ReportName.rpt"));
reportSource.ReportDocument.SetParameterValue("@User_ID", UserID);
// here User_ID could be used as your parameter


如果你的意思是创建超链接,每个员工的每行有不同的查询字符串参数,

示例
if you mean by create hyperlink that have different query string parameter as per employee is for each row,
example:
http://www.mysite.com/payroll/emp_details.aspx?empid=1



然后使用公式


then use formula

"http://www.mysite.com/payroll/emp_details.aspx?empid=" + {table.empid}





了解更多详情,请访问链接...

http://community.landesk.com/support/docs/DOC-24242 [ ^ ]

http://www.tek-tips.com/viewthread.cfm?qid=358430 [ ^ ]



快乐编码!

:)



for more details visit link...
http://community.landesk.com/support/docs/DOC-24242[^]
http://www.tek-tips.com/viewthread.cfm?qid=358430[^]

Happy coding!
:)


这篇关于如何将查询字符串传递给crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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