Follow me on Twitter RSS FEED

Reports folder and Reporting Services !!

Posted in By waelouf 0 comments

I had a funny situation today and I had to tell you about it.

There was a server I need to deploy an application on it, and this application (ASP.NET 4 by the way) have a folder called (Reports) containing all reports of the application, any way the deploying process was so smooth and I finished deployment in only 15 minutes (a new world record :D)

After the deployment I started a fast tour to make sure the application is working correctly, and every thing was just great till I started the reporting module!

Each time I open a report I popup message appears to insert username and password (Windows Authentication) which is 100% wrong as the application uses (Forms Authentication), when I clicked Cancel I got an nice white page, next time I added the administrator's username and password to check what is the problem, I got the most beautiful error in the world ("404 The resource cannot be found."), but how!!!, the page exists, the report exists, the user is authorized to use this page, then I spent about 2 hours investigating this problem but in vain.

Next day, I started a new round with this error, the last attemp was about 15 minutes ago, I kept going up from the path of the report to the its folder, then parent folder till I reached the url "http://server's_IP/Reports" then I got great surprise, this server has SSRS (SQL Server Reporting Services) installed, configured and ready to use, and when I was trying to call my reports I was actually calling a report (witch does not exists) in the reporting services, thats why I got the error message 404, and he was absolutely correct, and when I renamed the folder from "Reports" to "Reporting" it worked!

Conclusion, do not call your reporting folder "Reports" especially if it was on the root of your application, because you do not know the environment of the client, even if you know it's very likely they start using reporting services and destroy your application's reporting module.

Good luck next time and I hope that was useful.

New on Google ... Change your background image !!

Posted in By waelouf 1 comments

When I checked Google today (June 5th, 2010) at 2:00 AM, I found a new link in the far bottom say (Change background image)

Then you can choose an image from a large image gallery

At the end you will find this outcome

Really nice work Google :)

Database Cleaner

Posted in By waelouf 0 comments

When a developer works on a long-term project, it could happen that he stop using some stored procedures for any reason (change request, fix bug, update a module, ... etc), and since the stored procedure is the most preferred way to perform all CRUD transactions on the database, so you can create at least 3 stored procedures per table, and it may cause a headache when you try perform a cleaning operation to remove unused objects specially the stored procedures.

"Clean your database" is a simple project removes unused stored procedures from your project what ever the Data Access Layer you are using

This application works and tested on the following DAL (Data Access Layers):
  • Entity Framework
  • Linq 2 SQL
And it is pretty simple to use in only 3 steps:
  1. Browse the project's folder
  2. Set the connection string to the required database
  3. Start the operation

After the searching completed successfully, you can either export the cleaning script and apply the cleaning later, or by performing the cleaning immediately

Download the project source code and installer from CodePlex .

Arabic currency conversion from numbers to letters

Posted in By waelouf 0 comments

Original Post on CodeProject


This project can be useful in many applications, like ERPs, financial applications, or any application used by Arabic speakers to display any number "as digits to characters", which is called - in some Arab countries - "tafqit" or "تفقيط".


It's known that to write a number in Arabic characters, it's a little bit hard, as a number like 123 is written in English as "One Hundred twenty three", but in Arabic, it will be "One Hundred and three and twenty". So, for a big number - say 7 digits - it will be a little bit confusing to write it in this complicated form.

Using the code

The advantage of this code that it's pure SQL , so it will be easy to add it to any function, Stored Procedure, or View. Also, it can be used in both web and Windows applications. To use the code, first run the attached script in the desired database and then use the function called currency_conversion like this:

SELECT dbo.currency_conversion(12.10)

In the last example, the output will be:

اثني عشر جنيها و عشره قرشا

(1 row(s) affected)

Points of interest

As I mentioned before, this function can be used in both Windows and web applications as it is just a SQL function. Also, as it's a scalar function, it can be used in both Views and Stored Procedures. You can also modify the script to fit your country's currency; just replace "Egyptian Pound" with your currency

Finally, to download the script, click HERE

The script contains the required table and functions, run it on any database (good or new) and then you can use the function mentioned before (SELECT dbo.currency_conversion(@number))

I hope this is useful.

Unforgivable Bug in Google Calendar Gadget !!!!!!

Posted in By waelouf 0 comments

This bug from Google Desktop, "Google Calendar Gadget V2.0", suddenly I discovered that April have 2 days 29th, and do not ask me how!!!!

Microsoft and Twitter

Posted in By waelouf 0 comments

It seems that Microsoft (specially MSDN) have a kind of tracking to all twitter users who use Visual Studio 2008, if you Added any update containing #VS2008, after couple of hours you will find "MSDN_Forum" follows you.