browse by category or date

Recently our legacy application’s report page stopped working. The report is a Crystal Report document and it runs on Windows 2003. The Crystal Report 10 runtime rendered this error message:

System.Exception: Load report failed. —> System.Runtime.InteropServices.COMException (0x80000220): Error in File C:\WINDOWS\TEMP\{1B4CEC7D-A264-4D11-8F48-90E576416D21}.rpt:
Access to report file denied. Another program may be using it.

Adding IUSR_* write rights to C:\Windows\Temp folder didn’t solve the problem. Richard Dudley, thinks otherwise. He suggested to add ‘Modify’ rights to NETWORK SERVICES account.

And IT WORKS!!!

By that, I mean now I see a different error message:

A Crystal Reports job failed because a free license could not be obtained in the time allocated. More licenses can be purchased direct from Crystal Decisions or through the Crystal Decisions Online Store

Which is strange. Our Crystal Report 10 is already registered and legally purchased! Luckily, someone managed to resolve this problem.

All what we need to do is to download and install Crystal Report 10 service pack 6:

http://resources.businessobjects.com/support/communitycs/FilesAndUpdates/cr10win_en_sp6.zip

I hope it helps, Cheers!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

We have an ancient system in combo of classic ASP (VBA) and Allaire JRun which just refuse to die 🙂 Recently I was tasked to add a report that generate Excel document.

Did you know that we can simply provide a HTML format and disguise it as XLS document. With that, Excel (2003 and above) will be able to open it?

In the beginning of the asp file, we set the response header:

<%
Response.AddHeader "content-disposition","attachment; filename=Report.xls"
Response.ContentType = "application/vnd.ms-excel"
%>

Next how do we format the data correctly? We can do that with a little bit of CSS:

.number {
   mso-number-format:General;
}
.longdate {
  mso-number-format:"dd\-MMM\-yyyy HH:mm";
}
.text{
  mso-number-format:"\@";
}
.decimal{
  mso-number-format:"0.00";
}

If you want more formats, you can always open Excel, right-click any cell, then click Format Cells.

excel.format

Cool right? Frankly, I only know this trick today 😀

To use it, we simply assign the CSS class to the td element:

<%
dim Dim strconn
Set strconn = Server.CreateObject("ADODB.Connection")

'ODBC Connection to Oracle
strconn.Open ( "DSN=_ODBC_NAME;USERNAME=_DB_USERNAME;PASSWORD=_DB_PASSWORD;SERVICE=_ORACLE_DB_SID" )

Dim sql
sql = ".... Some SQL query ......"
Set rs = Server.CreateObject ( "ADODB.RecordSet" )
rs.Open sql, strconn, adLockOptimistic

While not rs.EOF
%>
	<tr align=center> 
		<td class="text"><%=rs(0)%></td>
		<td><%=rs(1)%></td>
		<td class="number"><%=rs(2)%></td>      
		<td><%=rs(3)%></td>         
		<td><%=rs(4)%></td>
		<td><%=rs(5)%></td>
		<td><%=rs(6)%></td>
		<td><%=rs(7)%></td>
		<td><%=rs(8)%></td>
		<td class="number"><%=rs(9)%></td>
		<td class="number"><%=rs(10)%></td>
		<td class="longdate"><%=rs(11)%></td>
		<td><%=rs(12)%></td>
		<td><%=rs(13)%></td>  
		<td><%=rs(14) %></td>
	</tr>
<%		
	rs.movenext
wend 
%>

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

Recently we deployed a batch of new Windows 7 x64 PCs for our new operation. A few of them need to access our legacy Transport Management System. The legacy TMS is mostly working fine in IE 10, except for few report pages.

For some reason the report didn’t load. Internet Explorer barfed the following error windows.

activexviewer.cab, Security Warning, Unknown Publisher

The Seagate Software ActiveX Viewer is unable to create its resource objects

My colleague asked me to resolve this error. He also reminded me that I’ve resolved this very same error before, which I objected. I guess no point to argue, as I still really need to resolve this regardless. My first step, Google it! 😀 Using the first sentence in the error message as the keywords gave a plenty of result. As I iterating the search result, I suddenly remember that I did solve this problem before. I also remember that I almost blog about it, but decided to cancel it because I thought it’s too simple to worth a blog post (And this is coming from a person who blogged about a single photo, whoa, and a pun. Good God, I’m a lousy writer) :D.

I guess it is really a moment of “If I don’t blogged it, I surely forgot it”™.

Anyway, to solve this problem we need to open Internet Explorer’s Advanced Options. Under Security, you need to untick the “Allow software to run or install even if the signature is invalid”.

Internet Explorer's Advanced Settings - Security

After installing the Crystal Report ActiveX control, please tick back this option to prevent you from installing malicious ActiveX from Internet.

I hope it helps, cheers!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: