brdrok
asked on
Crystal Report issues
Hello,
I am working with the Crystal Report that comes with Visual Studio .net. I am having problems just making the page appear.
I put a CrystalReportViewer on a Webform.aspx, and when attmepting to navigate to that page, I get a "The Page cannot be Displayed" from my browser.
I noticed that the computer adds the following lines to the webconfig file after adding a report viewer on my page:
<assemblies>
<add assembly="CrystalDecisions .CrystalRe ports.Engi ne, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304"/>
<add assembly="CrystalDecisions .ReportSou rce, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304"/>
<add assembly="CrystalDecisions .Shared, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304"/>
<add assembly="CrystalDecisions .Web, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304"/>
</assemblies>
since those <add assembly> tags totally mess up my web app (i.e. can't even reach the login screen), I had to comment those lines out.
I am not sure whether this will help or not but this is in my page declaration after adding the report viewer
<%@ Register TagPrefix="cr" Namespace="CrystalDecision s.Web" Assembly="CrystalDecisions .Web, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304" %>
Any help would be greatly appreciated....
If there is something not quite clear...please feel free to ask away....
I am working with the Crystal Report that comes with Visual Studio .net. I am having problems just making the page appear.
I put a CrystalReportViewer on a Webform.aspx, and when attmepting to navigate to that page, I get a "The Page cannot be Displayed" from my browser.
I noticed that the computer adds the following lines to the webconfig file after adding a report viewer on my page:
<assemblies>
<add assembly="CrystalDecisions
<add assembly="CrystalDecisions
<add assembly="CrystalDecisions
<add assembly="CrystalDecisions
</assemblies>
since those <add assembly> tags totally mess up my web app (i.e. can't even reach the login screen), I had to comment those lines out.
I am not sure whether this will help or not but this is in my page declaration after adding the report viewer
<%@ Register TagPrefix="cr" Namespace="CrystalDecision
Any help would be greatly appreciated....
If there is something not quite clear...please feel free to ask away....
You said you're getting a "The page cannot be displayed" message? No server error message? Are you running this locally? Or on a remote machine? Configure the application to give you the full server error page (including stack trace, etc.) and post that.
ASKER
heya...wish i could. the server sits on a remote machine...and the "fine" folks at HQ love to clamp down on security to a point it's getting almost comical (i.e. no sql server on my machine, no iis, no permission to run triggers).
perhaps i didn't set my webconfig file correctly where it would display a more detailed message of the error. below is my webconfig file:
<customErrors mode="off" defaultRedirect="Errors.as px"/>
perhaps i didn't set my webconfig file correctly where it would display a more detailed message of the error. below is my webconfig file:
<customErrors mode="off" defaultRedirect="Errors.as
It's a little difficult to debug an error when you don't even know what the error is. =)
Your web.config looks fine. If you purposefully throw an error on another page does it give you the same "the page cannot be displayed" message? Or do other pages show the server error message?
I assume this is a corporate project, so uploading files to another server is probably out of the question. But if it's not, do you have somewhere else you can upload to where you would have more control?
Your web.config looks fine. If you purposefully throw an error on another page does it give you the same "the page cannot be displayed" message? Or do other pages show the server error message?
I assume this is a corporate project, so uploading files to another server is probably out of the question. But if it's not, do you have somewhere else you can upload to where you would have more control?
ASKER
i know...life is tough when one has to guess the error...but finally managed to sorta isolate the error. =)
here is the code for my Page_Load event
SqlConnection m_cn;
DataSet m_ds;
SqlDataAdapter m_da;
string sql;
sql = "SELECT OrderID, AdvantageCode, Project.Name";
sql += " AS ProjectName, ESEProject, Tasks.Name ";
sql += " AS TaskName, DueDate, Client FROM Orders ";
sql += " INNER JOIN Tasks ON Tasks.TaskID = ";
sql += " Orders.TaskID INNER JOIN Project ON ";
sql += " Project.ProjectID = Orders.ProjectID WHERE ";
sql += " OrderID IN( (SELECT OrderStatus.OrderId ";
sql += " FROM OrderStatus GROUP BY ";
sql += " OrderStatus.OrderId HAVING COUNT(*) = 1 ";
sql += " AND OrderID IN (SELECT OrderStatus.OrderID ";
sql += " FROM OrderStatus WHERE StatusID = 2)))";
m_cn = new SqlConnection(@"Server=172 .16.3.130; Database=S WOL2000;Us er ID=yechan;Password=swol200 5;Trusted_ Connection =False");
m_da = new SqlDataAdapter(sql, m_cn);
m_ds = new DataSet();
m_da.Fill(m_ds, "vw_CRTakenReport");
try
{
CRTakenReport oRpt = new CRTakenReport(); //<----this line throwing exception
}
catch(Exception ex)
{
//Server.Transfer("~/Error s.aspx");
Response.Redirect("../Erro rs.aspx?ms g=" + ex.Message, true);
}
turns out that the following line of code is being difficult:
CRTakenReport oRpt = new CRTakenReport();
The error message is as follows:
File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found
I really have no clue as to what they mena by that...
here is the code for my Page_Load event
SqlConnection m_cn;
DataSet m_ds;
SqlDataAdapter m_da;
string sql;
sql = "SELECT OrderID, AdvantageCode, Project.Name";
sql += " AS ProjectName, ESEProject, Tasks.Name ";
sql += " AS TaskName, DueDate, Client FROM Orders ";
sql += " INNER JOIN Tasks ON Tasks.TaskID = ";
sql += " Orders.TaskID INNER JOIN Project ON ";
sql += " Project.ProjectID = Orders.ProjectID WHERE ";
sql += " OrderID IN( (SELECT OrderStatus.OrderId ";
sql += " FROM OrderStatus GROUP BY ";
sql += " OrderStatus.OrderId HAVING COUNT(*) = 1 ";
sql += " AND OrderID IN (SELECT OrderStatus.OrderID ";
sql += " FROM OrderStatus WHERE StatusID = 2)))";
m_cn = new SqlConnection(@"Server=172
m_da = new SqlDataAdapter(sql, m_cn);
m_ds = new DataSet();
m_da.Fill(m_ds, "vw_CRTakenReport");
try
{
CRTakenReport oRpt = new CRTakenReport(); //<----this line throwing exception
}
catch(Exception ex)
{
//Server.Transfer("~/Error
Response.Redirect("../Erro
}
turns out that the following line of code is being difficult:
CRTakenReport oRpt = new CRTakenReport();
The error message is as follows:
File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found
I really have no clue as to what they mena by that...
Generally, that error message means the application references an assembly (.dll) that can't be found. Does your production machine have Crystal Reports installed? Try searching your dev machine for CrystalKeyCodeLib.dll and copy it over to the bin directory of your application on the server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
will look for it...what I probably should have mentioned is that assemblies/references relating to crystal such as:
CrystalDecisions.Shared
CrystalDecisions.CrystalRe ports.Engi ne
etc.
i set the property "Copy Local" from false to true. not sure whether this has anyting to do with it. but...at least that way I was able to at least generate the above mentioned error.
CrystalDecisions.Shared
CrystalDecisions.CrystalRe
etc.
i set the property "Copy Local" from false to true. not sure whether this has anyting to do with it. but...at least that way I was able to at least generate the above mentioned error.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you using IE? If so, do you have "Use friendly HTTP error messages" turn on? If so, that might be why you're not getting the server error. :/
ASKER
@hendrdm:
yes...got that option checked.
@burntSky and @MikeMCSD:
Ok...defn. seems to be the whole CR .runtime thingie issue. Tried my code in a small windows app and it works like a charm but not in a web app. Was hoping i could get away with copying all the assemblies relating to CR into my bin directory that sits on the web server. I got the:
File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found
error message to disappear only to get a:
Cannot find KeycodeV2.dll, or invalid keycode.
message. Not having access to that web server, is there anything I can do on my end here. I probably will ask the admin guy to install the CR files onto the web server. Problem is I am not exactly sure what to ask that guy.....any suggestions?
thanks
yes...got that option checked.
@burntSky and @MikeMCSD:
Ok...defn. seems to be the whole CR .runtime thingie issue. Tried my code in a small windows app and it works like a charm but not in a web app. Was hoping i could get away with copying all the assemblies relating to CR into my bin directory that sits on the web server. I got the:
File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found
error message to disappear only to get a:
Cannot find KeycodeV2.dll, or invalid keycode.
message. Not having access to that web server, is there anything I can do on my end here. I probably will ask the admin guy to install the CR files onto the web server. Problem is I am not exactly sure what to ask that guy.....any suggestions?
thanks
Ah, I've seen that one before. Check out the following references:
http://support.businessobjects.com/library/kbase/articles/c2011205.asp
http://support.businessobjects.com/library/kbase/articles/c2010681.asp
http://support.businessobjects.com/library/kbase/articles/c2011205.asp
http://support.businessobjects.com/library/kbase/articles/c2010681.asp
I had the same problem and received the same error messages as you did.
"Not having access to that web server, is there anything I can do on my end here."
My web site is hosted and I don't have access also. I've been trying to get
CR.NET to run on it and finally just gave up. I posted questions about this problem
3 times and it seems it can't be done. Setup/Deployment package is the best bet.
If you figure out how to get it going without a setup package, please let me know.
My solution was to write a CR Windows program and have it access the database
and produce the report. But I have to install it on the client for it to work.
See if there is anything in this link that might help:
https://www.experts-exchange.com/questions/21188088/Crystal-Reports-and-ASP-NET-configuration-issue.html
"Not having access to that web server, is there anything I can do on my end here."
My web site is hosted and I don't have access also. I've been trying to get
CR.NET to run on it and finally just gave up. I posted questions about this problem
3 times and it seems it can't be done. Setup/Deployment package is the best bet.
If you figure out how to get it going without a setup package, please let me know.
My solution was to write a CR Windows program and have it access the database
and produce the report. But I have to install it on the client for it to work.
See if there is anything in this link that might help:
https://www.experts-exchange.com/questions/21188088/Crystal-Reports-and-ASP-NET-configuration-issue.html
ASKER
sorry forgot to close the question....my head was spinning and i needed someone to stop the room =)
i won't spend any more time on this for right now but i would think that there ought to be some sort of a hack. thanks for all your help and insight.
i won't spend any more time on this for right now but i would think that there ought to be some sort of a hack. thanks for all your help and insight.
ASKER
decided to go the pdf route. reports come out pretty clean...except don't have functionality such as drill down...