browse by category or date

hugh.laurieWe are all know Dr. Gregory House for his sarcastic remarks, brilliant deductions, petty crimes, and bleak views on humanity. Now imagine a more subdued version of him, less egocentric, more or less the same amount of sarcasm, a much nicer person and a hired gun.

He is Thomas Lang. A former Scots Guard, now working as a freelance bodyguard/man for hire. When he offered a contract to assassin someone, he unwillingly accepted it. Instead of really assassin the target, Lang tried to warned him about the assassination contract.

This is where Lang’s journey began. Follow his adventures as he hopelessly doing everything to save a girl, and accidentally prevented worldwide bloodbath.

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 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: