Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.


reportDocum.Load(Server.MapPath("~/Reports/Comprehensive_History.rpt"));
reportDocum.SetDatabaseLogon("CMS", "Passw0rd!", "Eadmin", "Credit_App");

What I have tried:

Searched the web to no avail. I have generated a number of reports using the same codes.
Posted
Updated 4-Feb-17 2:22am
v4
Comments
Member 12770648 4-Feb-17 8:20am    
public partial class comprehensive_view : System.Web.UI.Page
{
ReportDocument reportDocum = new ReportDocument();

protected void Page_Init(object sender, EventArgs e)
{
string prd = (String)(Session["dperiod"]);
string yrr = (String)(Session["dyear"]);
string myst1 = (String)(Session["dfi"]);

if (myst1 == "HISTORIC ARREARS BALANCES")
{

reportDocum.Load(Server.MapPath("~/Reports/Comprehensive_Current.rpt"));
reportDocum.SetDatabaseLogon("CMS", "Passw0rd!", "Eadmin", "Credit_App");

reportDocum.SetParameterValue("@CMONTH", prd);
reportDocum.SetParameterValue("@CYEAR", yrr);

Errror :: Invalid Path

1 solution

Try following if it works for you -

--Right click on your ".rpt" file Select "Properties"
--Build Action as "Content"
--Copy to Output Directory as "Copy Always"
--Check your path to the .rpt file

Note: if both rpt and aspx page with report viewer are in same folder then no need to give the full path , you can give only filename.rpt in Server.MapPath.

Reference: c# - A document processed by the JRC engine cannot be opened in the C++ stack - Stack Overflow[^]

Hope, it helps :)
 
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