Showing posts with label Troubleshoot. Show all posts
Showing posts with label Troubleshoot. Show all posts

Monday, November 17, 2008

Unforgiven mistake

Today my application log file show an error was happening since last friday (14th Nov). It was a simple error - regarding error on data type conversion, unhandled integer conversion from string - which is a very typical and kind of beginner mistake and also something that u don't want people to know about it (especially your boss and your 'bossy' client).

This mistake again!

One whole day I was sitting and figuring out what was the real problem..
One whole day I was wondering, why this error suddenly came out after quite number of months this system was deployed.

8 hours of figuring, searching, wandering, praying and finally.....again a 'complex'-like problem which was actually required an extremely easy solution. One column in a table of SQL server database was left 'null' while it was supposed to be some integer input inside. That was the root cause. Actually, It was a record of my testing few weeks ogo. I should have deleted this record in the first place at least. But I didn't.

I might have experienced this before (sure I have), but the point is, why I kept on doing same simple mistake which required simple solution. But in the middle wasting so much time that I can do so many useful things such as upgrading the system, or learning the better way to design the system or, start planning for the future project which is just around the corner (which actually the start date fall on today). Then, what was the real issue?

Start it with planning

Few weeks before I've faced a problem on this system. Something bad happened to the system. It was a bad timing since I was busy with other project. Straightly rushing into server room, log in to the server and quickly start troubleshooting on the basis so-called self-instinct. No proper planning was written on paper or indeed not even in my mind. The goal was to solve the problem as soon as possible so that I can jumped into the project at hand. The good thing was I finally solved the problem. While the bad thing was hidden to me until ..... this morning. This problem won't appear if proper planning was made just few minutes before I started troubleshooting. If the problem still arise, at least I can always refer to it for the next troubleshooting because if you're familiar with coding, it always happen that, most recent modification have major possibility of introducing new bugs. Therefore, with a proper write up, I could have saved a lot of resources (time + energy + money + peace of mind).


Never give excuses!

So, if you're facing problem while at the same time busy with some other things. Never ever started troubleshooting it without planning. Don't give excuse such as "I don't have time to plan, I have to finish this very soon so that I can jump into that sooner..". Indeed your time will be more likely to be waste if you didn't plan. Remember, 5 minutes of planing can save you hours or days if it is properly done.

Just sharing!





Sunday, July 27, 2008

Troubleshooting: [CrystalReport + ASP.NET]: Cannot deploy Crystal Report with ASP.NET in target machine

Building report using Crystal Report in ASP.NET website is quite straight forward. Maybe you would do these steps:
1 - Add new Crystal Report page
2 - Specify the data source of the report in Crystal Report page
3 - Drag and drop Crystal Viewer on the web page.
4 - Specify the report source
5 - Put a few line of code if needed.
6 - Run the program from Visual Studio 2005, and there your ASP.Net report come out.

These are the steps you see working in the development machine. Now, copy the webpage files to your target machine (any server without Visual Studio 2005 installed). Run it in the localhost. Can you see similar thing happen again OR another new mystery to be figured out? If the latter you see, then keep on reading...

ENVIRONMENT
=============
VS 2005
Crystal Report for VS 2005
ASP.NET 2.0
Win XP Service Pack 2


SYMPTONS
==========
1 - When open browser you've an error message " Could not load file or Assembly "CrystalDecisions.****" (The message is vary based one what kind of CrystalDecision DLL or Assembly files is missing)

REASON
=======
Some DLL or Assembly files are missing. Normally DLL files should appear under application root folder name "Bin" while the assembly must appear
in C:\WINDOWS\Assembly\

SOLUTION
=========
step 1) Copy DLL files to Bin folder.

crystaldecisions.crystalreports.engine.dll.
crystaldecisions.reportsource.dll
crystaldecisions.shared.dll
crystaldecisions.web.dll

COPY above DLL from "C:\Program Files\Common Files\Business Objects\2.7\Managed\" and PASTE them to "Visual Studio 2005\WebSites\[YourWebsiteName]\Bin\" (this path might vary depend on your initial chosen path)

Once, you've done this, you might have probably able to browse your website up to the page where the crystalreport document appears, here you'll face another problem saying

"Could not load file or assembly CrystalDecisions.ReportAppserver.*** ..."

This problem is caused by MISSING ASSEMBLY FILES which is located inside c:\windows\assembly\.

for details instruction, go to step 2.

==================================================

step 2) Install CrystalReports Assembly files

a) for 64-bit server:
COPY installation program called "CRRedist2005_x64.msi" from "C:\Program Files\Microsoft Visual Studio 8\Crystal Reports\CRRedist\X64" from development machine and paste into target machine. Then, double click on it to start the installation.

b)for 32-bit server
Donwload CRRedist2005_x86.msi from http://www.filewatcher.com/m/CRRedist2005_x86.msi.16971776.0.0.html
After download, double click on it to start the installation.

Once the installation process completed. Browse your website. Here you will be able to view the page with crystal report. You may need to restart the server or IIS if the problem still persist.

==================================================

InsyaAllah, this solution will work seamlessly!

Troubleshoot: [CrystalReport .NET] Database Logon Dialog Keep On Apppearing

For those who are heavily involved with CrystalReport especially CrystalReport .NET version might notice some 'unwanted' things happen sometimes after deployment of a project. I involve a lot on VB.NET programming which used CrystalReport as its reporting services and one of the regular thing I face was a problem in which Database Logon dialog keep on appear itself asking you to enter username, password, server, etc. However, this dialog keep coming out even after you fill in the required field. In most cases, this problem does occur in certain machine only.

After trying and trying few ways (and this is always the way you'll finally solve the prob), finally I come to this solution and maybe conclusion. I couldn't guarantee this solution may apply to all. But maybe for those having similar trouble, can put this on try...

ENVIRONMENT
============
VS .NET 2003
Crystal Report for .NET 2003
Win XP Service Pack 2

SYMPTONS
==========
generate a report, suddenly "Database Login" dialog appear, whatever things you write on (server, username, pwd, etc)you'll still get this error message.


REASON
=======
Absoulue reason of this problem is still unknows, but one of the reason is bacause dll file used to read XML Schema (*.xsd) is corrupted or unable to do intented job.

SOLUTION
=========
Easiest way is by copying the whole files from folder "C:\Program Files\Common Files\CrystalDecision\1.0\bin" FROM (PC which doesn't have this problem) TO the same location at the 'problem' PC.

If GOD permits, everything works fine later!