Please how to pass a parameter to a crystal report in visual studio 2012 please? i need to it please, i'm going to retrieve an id from query string and pass it to the crystal report to get a value, i don't want to show enter id
from above lines
reportdocument.SetParameterValue("Username", txtUserName.Text);
as per your requirement
reportdocument.SetParameterValue("Username", Convert.ToInt32(Request.QueryString[n].toString()); //if parameter in int type
hope it helps....
Member
130 Points
656 Posts
Crystal Report
Mar 04, 2014 05:00 PM|Jdaniel13|LINK
Please how to pass a parameter to a crystal report in visual studio 2012 please? i need to it please, i'm going to retrieve an id from query string and pass it to the crystal report to get a value, i don't want to show enter id
Member
594 Points
386 Posts
Re: Crystal Report
Mar 05, 2014 12:12 AM|aspsak|LINK
Hi, There are lot of examples available in internet. Please visit all the site from below link
https://www.google.co.in/#q=pass%20parameter%20to%20crystal%20report%20asp.net%20c%23
Refer Link
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath("CrystalReport.rpt"));
reportdocument.SetDatabaseLogon("", "", "SureshDasari", "MySampleDB");
reportdocument.SetParameterValue("Username", txtUserName.Text);
CrystalReportViewer1.ReportSource = reportdocument;
from above lines
reportdocument.SetParameterValue("Username", txtUserName.Text);
as per your requirement
reportdocument.SetParameterValue("Username", Convert.ToInt32(Request.QueryString[n].toString()); //if parameter in int type
hope it helps....