Click here to Skip to main content
16,015,504 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
protected void Button1_Click1(object sender, EventArgs e)
{

ReportDocument rd = new ReportDocument();
rd.Load(Server.MapPath("DegreeCertificate.rpt"));
rd.PrintOptions.PrinterName = @\\tc\HPLaserJ1018";
rd.SetParameterValue(0 , "@usn;);
rd.PrintToPrinter(1, false, 1, 1);


}

this is the code i m using to print crystal report but in the line
rd.PrintToPrinter(1, false, 1, 1); i m getting error as missing parameters..plss help me out to solve this problem
Posted

1 solution

C#
//The viewer's reportsource must be set to a report before any parameter fields can be accessed.
                CrystalReportViewer1.ReportSource = rd;
 
Share this answer
 

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