Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
Hi friends,

I have an issue with Crystal Reports. When I run my project, images are displaying. But when I deploy to the local sever (IIS7) they are not displaying. I tried these settings under web config file:
HTML
<httphandlers>
<add path="CrystalImageHandler.aspx" verb="GET" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<httphandlers>


I am using VS 2005, Crystal report 9, IIS 7
Please help me to solve this issue.
Posted
Updated 10-Dec-14 9:34am
v2
Comments
Kschuler 10-Dec-14 15:35pm    
More details would help us. Is this a web site? Or a PC Project? Or what? Also, how are you connecting the images inside your crystal reports?
mathai mm 11-Dec-14 0:25am    
hi,
This is a web application.I saved image as database image object in table .that image i am using dynamically in crystal report. when run this project from visual studio2005, it is displaying images on crystal report viewer but when i deployed to iis7,it is not displaying anything.I am using crystal report9 and vs2005 and iis7.Please help me to solve this issue.
Kschuler 11-Dec-14 14:23pm    
So how are you connecting to the database? Is there other data that IS displaying from the database? I'm wondering if your connection to the database isn't work at all, or if it really is just the images. That could help narrow down the problem.
mathai mm 12-Dec-14 0:02am    
hi,
i created column with image data type in a table after that i inserted data manually to that table .then i created one crystal report and connected with this table.after that i dragged that image field from table and drop it in report.it is displaying on crystal report and it was successfully displaying images when i run visual studio ,but if i deploy this project to iis7,this images is not appearing on report.
See the sample code given below.
protected void Button1_Click(object sender, EventArgs e)
{
string conString = ConfigurationManager.ConnectionStrings["SQLCONN"].ConnectionString;
CrystalReportViewer1.Visible = true;
ReportDocument crystalReport = new ReportDocument();
crystalReport.Load(Server.MapPath("~/CrystalReport1.rpt"));

SqlConnectionStringBuilder Sconn = new SqlConnectionStringBuilder(conString);
ConnectionInfo myConnectionInfo = new ConnectionInfo();
myConnectionInfo.ServerName = Sconn.DataSource;
myConnectionInfo.DatabaseName = Sconn.InitialCatalog;
myConnectionInfo.UserID = Sconn.UserID;
myConnectionInfo.Password = Sconn.Password;

setDBLOGONforREPORT(myConnectionInfo, crystalReport);
crystalReport.DataSourceConnections[0].SetConnection(Sconn.DataSource, Sconn.InitialCatalog, Sconn.UserID, Sconn.Password);
CrystalReportViewer1.ReportSource = crystalReport;
crystalReport.Refresh();

}

private void setDBLOGONforREPORT(ConnectionInfo myconnectioninfo, ReportDocument rpt)
{
Tables tables = rpt.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
{
TableLogOnInfo tableLogonInfo = table.LogOnInfo;
tableLogonInfo.ConnectionInfo = myconnectioninfo;
table.ApplyLogOnInfo(tableLogonInfo);
}

}


please look into it.
Kschuler 12-Dec-14 8:41am    
Is other data from the database appearing properly?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900