Click here to Skip to main content
15,921,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ParameterValues xyz = new ParameterValues();
ReportClass rptH = new ReportClass();
rptH.FileName = Server.MapPath("~/Reports/Full_And_FinalSettlementReport.rpt");
rptH.Load();

// rptH.SetDatabaseLogon("Nimesh", "Nimesh7430", "localhost", "payrollsys");

rptH.SetDatabaseLogon("payroll", "payroll", "27.251.219.229", "payrollsys");

ParameterDiscreteValue pdv = new ParameterDiscreteValue();
pdv.Value = Request.QueryString["EmpID"];
xyz.Add(pdv);
rptH.DataDefinition.ParameterFields["EmployeeID"].ApplyCurrentValues(xyz);

rptH.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "MyReport");

i write above code in .net after i get error COMException was unhandled by user code
plz give me solution
Posted
Comments
Andreas Gieriet 3-Jan-15 4:17am    
Any stackdump available?
Regards
Andi

1 solution

We have no idea what that code is supposed to do, or even what line is throwing teh exception.
So, its going to be up to you.
Put a breakpoint on the first line in the function, and run your code through the debugger. Then look at your code, and at your data and work out what should happen manually. Then single step each line checking that what you expected to happen is exactly what did. When it isn't, that's when you have a problem, and you can back-track (or run it again and look more closely) to find out why.

Sorry, but we can't do that for you - time for you to learn a new (and very, very useful) skill: debugging!
 
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