Click here to Skip to main content
15,905,238 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

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

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

C#
reportSource.ReportDocument.Load(Server.MapPath("ReportName.rpt"));
reportSource.ReportDocument.SetParameterValue("@User_ID", UserID);
// here User_ID could be used as your parameter
 
Share this answer
 
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}


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

Happy coding!
:)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900