Wednesday, April 4, 2012

Crystal Reports : Retrieving the COM class factory for component with CLSID {GUID} failed due to the following error: 80070005

If your crystal report is working locally and not on server it is permission problem. If you are using plesk then plesk user IWAM_plesk(default) and IUSR_siteusername must have persmissions on a lot of things, so just give them permission to whole [C:\] drive and you are got to go. Have fun..

After your reports start working try removing permissions for security. 

Solutions:
  1. If possible change pool account to LocalSystem
  2. Compile x86 version of your web app or web site
  3. "Enable 32-bit Applications" should be true in your pool advanced settings



Sunday, April 1, 2012

Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.

Just download and install both versions of Crystal reports(e.g. x86 and x64). If one of them is missing you will receive this error.

Download link

You can download the release packages for Visual Studio 2010 from the following locations:

On Development Machine
  • Complete Package (EXE) - Standard EXE installation package which installs SAP Crystal Reports for Visual Studio into the Visual Studio 2010 IDE
On Server Machine

Friday, March 30, 2012

How to check whether an DOM element exists using JQuery(JS)

If you every want to check whether an element exists using JavaScript or jQuery, just use this snippet
if ( $("selector").length ) {
// rest goes here
}

Tuesday, February 28, 2012

Adding Content To TinyMCE using javascript

If you ever want to add content to tinymce using javascipt. You can use the following code.

<script type="text/javascript">
window.onload = function () {
    tinyMCE.activeEditor.setContent('some html content here');
}
</script>

or using jQuery

<script type="text/javascript">
 $(function () {
      tinyMCE.activeEditor.setContent('some html content here');
 });
</script>

It requires you have only one tinyMCE editor. But if you have more you can use this.

tinyMCE.editors[index0].setContent('some html content here');
tinyMCE.editors[index1].setContent('some html content here');
tinyMCE.editors["nameOfEditor"].setContent('some html content here');

Hope this helps!

Monday, January 10, 2011

Flash movie blocking your menu or anything else

If you added an flash movie on your page and also added a drop down menu on top of it. Chances are you wont see the drop down menu because flash object hides it.

To get rid of this problem you just need to set the parameter “wmode” (Window Mode) to transparent in object properties.

e.g.
<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"  
codebase="http://download.macromedia.com/pub/shockwave/cabs/
director/sw.cab#version=10,1,1,0"
        width="?" height="?">
        <param name="src" value="?.swf" />
        <param name="wmode" value="transparent" />
        <embed src="?.swf" width="?" height="?" 
 pluginspage="http://www.adobe.com/shockwave/download/"  
wmode="transparent"></embed>
</object>


Thats it