Saturday, April 10, 2010

Crystal Report: Image did not reflected in report

There's this incident where a report is developed which retrieve the image from oracle database. The code are all looks fine but the image just did not get refreshed, in other words, not grabbing the latest image from database.

Playing around with crystal reports function which leads us to the setting of "save data with report". Once we uncheck the setting and the image was fetching from database.

Thursday, December 17, 2009

Dynamic page number

Found this code snippet which is quite useful if you're allowing dynamic configurable page length:

intOldPageLength = GetPageLengthValue()

' if there is a new page length value
If intOldPageLength <> m_intPageLength Then

' adjust the page number to compensate
intItemCount = ((m_intPage - 1) * intOldPageLength) + 1
m_intPage = intItemCount \ m_intPageLength
If intItemCount - (m_intPage * m_intPageLength) > 0 Then
m_intPage = m_intPage + 1
End If

End If

Friday, November 13, 2009

Generate Crystal Report Error: 0x800003E5 Failed to open report

This happened when there is an attempt to generate the crystal report. It occurs during the loading of crreportdocument.load. It didn't include any further leads but only the function that triggers the error. This makes me wonder what causes the above stated problem.

I searched around in the usual engine, Google. Few possibilities, and funny thing is, one indicated that the memory has problem (which was what my colleague found). Due to the details of the error given, I drilled down and pick up the suggestion to reset the IIS. After reseting, attempt to access the report success. This further justify that the error is most probably due to the memory resource which has been fully utilized, that exceeds the allocated space.

I recalled, there is somewhere in the article that I read mentioned that when the number of reportdocument object is declared without disposing would generates error. This is most probably the closest reason of such error occured in my situation.

Further checking, the programmer who coded the page that executes the reportdocument did not close, dispose and collect GC. This indeed makes the suspect even stronger.

As changes toward the code would require some time, two steps were taken:

1. to continuously embed the clean up function code once the code has finished its' execution.
2. as step 1 takes time, to avoid any possibility reoccurence, scheduled "IISRESET" command to execute every midnight. This certainly is not a wise approach, but in this situation, the web application or IIS as whole is not accessible by anyone during midnight thus, it is safe to reset it to ensure the reportdocument is dispose off cleanly.


Reference:

http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/4553dd39-e112-4094-b699-73bc0d10890d

Tuesday, September 22, 2009

Mafia wars and Texas Holdem Poker hacks or cracks

I always wonder, does all game have their crack? Unlike those days, those games that I played have cracks circulated around the net. To name a few, the Grand theft auto and starcraft or age of empire. Those are I believe more of like the infamous "easter eggs" where the hacks itself is coded in the game for the gamer to find out. I believe it makes the game more interesting. How bout those games in facebook? There are plenty of flash games integrated in facebook. The famous Zynga have already produced few games and some of them are mafia wars, texas holdem poker, farmville and many more. Are there any cracks or hacks underneath?

I would think there wont be any intention cracks due to the fact that there is "monetary" object involve in the progression of the game. But, whether there is exploitable bugs in the game is still questionable....

Tuesday, July 14, 2009

Receiving Gmails or 3rd Party email on your hotmail account

Most of us, who surfs internet, have few different emails account. I am, proudly, one of them. I have few emails account to separate its' usage on different purposes. One of account is being used to communicate with friends, while others for different matters.

Thumbs up to Microsoft Live Mail's team. Another great move. Hotmail now allows other emails account to be setup for retrieving and sending mails. This can be solely done on one of your hotmail account. Once you have configured the correct credential, you will be able to choose to download the emails to a new folder or existing inbox folder.

One of the account that I owned, but seldomly used, is this gmail account. I configured the account to forward any incoming emails to my hotmail accounts where I frequently logon (through my msn, where I can see new coming mails through the popup messenger's notice window). I have been rather satisfy with this approach thus far and no complaints with it. But with this new feature incorporated in Hotmail, it's awesome. I can even send email using that email's account. I dont need to logout Hotmail and login Gmail to reply any correspondent shall there be any.

I guess, I am more in love with Hotmail (or Live's mail).

P/S: One the side note, I still think Yahoo! mail sucks. They need us to subscribe to their paid service in order to get the mails to;
1. use POP/SMTP service
2. use forwarding mail feature

Seriously, with so much intense competition from others competitor, why don't they loosen those feature?

Tuesday, May 12, 2009

Live.com and other related email domains registration

Have you got your live.com email? I failed to get mine and it was too late to get mine. But I just manage to get Live.IT domain for myself. The .IT domain extension is meant for the people residing in Italy but I thought it would be cool to have one. If you are in vein to get one for yourself, be it .com or .IT or .BE, but failed deliberately, then you may want to hop over to Helmers Blog. He have listed all the links that could possibly enable you to register from your favourite domain extension. And yes, I've verified that it is working.

I used http://get.live.com/it-it/mail/overview to get it. Basically the URL address did the trick to enable the registration for the specific live domain name.

Tuesday, May 05, 2009

Windows XP activation key: activate by phone

Been trying to install a copy of windows xp onto my virtual machine to do some testing. However, upon starting my freshly installed windows xp that resides on the virtual machine, it appears that the windows requires key activation (which is a norm). Then without hesitation, I went and followed the steps in Easy Way to Activate Windows Home Server (Crack and Bypass Activation). Apparently, the registry editing worked. The key icon residing at the right bottom pane has gone after restarting the machine. However, am not sure if it will bypass the genuine windows validation process upon updating the windows. Probably will try it out if there's a chance.

Friday, March 13, 2009

Crystal Report License Implementation On Visual Studio

I have been doing some reports for my employer to be implemented in client place. There have been some debate on the licensing issue. Without curiousity, I did a check on google for more details on the license to avoid any rights infridgement.

Developers can use Crystal Reports for Visual Studio .NET or for Visual Studio 2005 to do the following:
Design unlimited reports for use in Visual Studio .NET or Visual Studio 2005 applications by using the integrated Crystal Reports designer.
Integrate the Crystal Decisions server software (Crystal Reports engine used in conjunction with Microsoft ASP.NET server) into server or Web applications.
Integrate the Crystal Reports engine into client Microsoft Windows applications and, at no additional charge ("free runtime"), developers may:
Freely deploy those Visual Studio .NET or Visual Studio 2005 applications in their own organizations. -or-


Redistribute those Visual Studio .NET or Visual Studio 2005 applications outside their organization for use by third parties.


True enought the Visual Studio bundled with the Crystal report and report development under VS is licensed. However, free stuff doesn't always come easy. There are as usual with conditions.

For each server or Web application, you may use only a single instance of the bundled server software on a single server. You may not use a Web farm to increase the scalability of the bundled server software. You must purchase additional licensing to increase scalability.
You must deploy and redistribute the application as follows:
You may deploy each application that uses the bundled server software (designed for five simultaneous users) internally in the your own organization at no additional charge.
You must obtain written authorization from Crystal Decisions to redistribute an application that uses the bundled server software outside your organization for use by third parties. For more information about how to apply for written authorization, visit the following Crystal Decisions Web site:
Crystal Reports .NET Licensing
http://www.businessobjects.com/products/reporting/crystalreports/net/licensing.asp (http://www.businessobjects.com/products/reporting/crystalreports/net/licensing.asp)
For more information, including how to purchase additional licenses, how to apply for the right to redistribute server or Web applications, and server software scalability, visit the following Crystal Decisions Web site:
Crystal Reports .NET Licensing
http://www.businessobjects.com/products/reporting/crystalreports/net/licensing.asp (http://www.businessobjects.com/products/reporting/crystalreports/net/licensing.asp)


Undeniable it's still quite gray on how the licensing works.

Other relevant agreement: http://msdn.microsoft.com/en-us/library/aa288179(VS.71).aspx

Wednesday, March 04, 2009

Oracle Char vs VarChar vs Varchar2 datatype

I was kinda confused earlier on the differences but get a better explaination after hunting around. Below details each of their characteristics:

Char: Declare and used. If the size declared is 5 and assigned value is only length 2, the leftover will be stored with spaces. Some claimed this would be much faster, but some doesn't find any differences in performance comparison to varchar.
VarChar: Declare in advance, size used only when assigning values. Depending on the values assigned, for those that have not been used or excessive size allocated will be freed. First few bites will store the length of the values assigned. ANSI SQL Standard.
VarChar2: It is an oracle's improved Varchar datatype version. Characteristics are mostly similar to varchar.

Do you have anything to addon?

Tuesday, March 03, 2009

Windows 2003: Terminate User session remotely

I tried to remote desktop login one of the windows 2003 server but was prompted "The terminal server has exceeded the maximum number of allowed connections.". As this would prolly some sort of CSI required before I could login the server, I was wondering if there is any tool to quickly terminate one of the user session (since there wasn't anyone admit loggin into the server. Browsing through Microsoft site and found PSTools. Below is the steps to kill the connected user session on Windows 2003 (worked for me, atleast):

Open your command prompt and from the directory that contains the psexec utility, do the following

1) psexec \\x.x.x.x -u user -p password cmd (this will give you access to the cmd prompt on the server)
Example: psexec \\127.0.0.1 -u admin -p password cmd

2) once you get the command prompt run the command qwinsta to get a list of all Terminal Services connections. Each connection has an Id Number.

3) Run the command logoff [id# of session to quit] /v (this will kill the connection with that id #)
Example: logoff 2 /v

Do you have any other alternative to this?

Monday, February 23, 2009

Enable remote connection to SQL 2005

1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
3. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

Note Click OK when you receive the following message:
Changes to Connection Settings will not take effect until you restart the Database Engine service.

4. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.

Friday, February 20, 2009

Crystal Report: Server page unavailable

I have been doing crystal reports development for sometime. There are few errors encountered and worth mentioning it here:

1. Crystal reports tool icon does not show when the reports is loaded.
2. Image in the crystal report is not showing but working fine in the development machine and not the production server.
3. "Load report failed" error prompted when trying to load the crystal report.
4. Excessive tmp files residing in the temporary folder generated by the crystal report after it have been executed.
5. Upon saving the crystal reports into PDF/Excel/Word, the output file was corrupted.

There were many more errors faced along the line while developing and implementing the reports into the production server. At time I was thinking, developer and supports have their own role to play and it's not easy to play both roles. If one are really into both (which occasionally the life-fact in a realistic world), he/she must have got to be spent alot of time researching to get the heart beating. Am still trying to cope and learn and man, it's not easy to really get a rest time.

Monday, February 02, 2009

Checking MS SQL and Analysis version

Found this article explains how to do it. Steps varies depending on the product itself.

*Latest SQL patches for 2000 can be downloaded at Microsoft website.

Tuesday, January 06, 2009

ASP.NET: Export PDF/Excel/Word file corrupted

An encounter with an error while trying to export the Crystal report to the abovementioned document format has resulted "file damaged" or "file corrupted". It was then later found I out that the response.write function requires an end at the end of sending the file content like below;

Response.End

Wednesday, December 10, 2008

Free html/web/blog templates

Have been browsing through the web and manage to discover a new portal that shares a decent number of templates available for downloads. The site located at http://www.zeroweb.org/. It's surely a good thing to have a quick start in creating the WWW identity.

Tuesday, December 02, 2008

Ungroup Microsoft Excel on Windows Taskbar

A typical user called up and enquire about the above encountering. It seems that, his PC's Excel is behaving rather abnormal as all the excel files which were executed, loaded into an Excel program instance. Below is the settings to dismantle the mysterious encounter;

Tools -> Options -> (Tick) Windows in Taskback

That will load each and every excel file on a new Excel instance.

Saturday, November 22, 2008

Auto Logon Windows XP

Below are the steps to enable auto logon in Windows XP;

Click Start, and then click Run.
In the Open box, type control userpasswords2, and then click OK.

Note When users try to display help information in the User Accounts window in Windows XP Home Edition, the help information is not displayed. Additionally, users receive the following error message:
Cannot find the Drive:\Windows\System32\users.hlp Help file. Check to see that the file exists on your hard disk drive. If it does not exist, you must reinstall it.
Clear the "Users must enter a user name and password to use this computer" check box, and then click Apply.
In the Automatically Log On window, type the password in the Password box, and then retype the password in the Confirm Password box.
Click OK to close the Automatically Log On window, and then click OK to close the User Accounts window.


There is another advanced step for those PC that joined domain;

You can use Registry Editor to add your log on information. To do this, follow these steps:
Click Start, click Run, type regedit, and then click OK.
Locate the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Using your account name and password, double-click the DefaultUserName entry, type your user name, and then click OK.
Double-click the DefaultPassword entry, type your password under the value data box, and then click OK.

If there is no DefaultPassword value, create the value. To do this, follow these steps:
In Registry Editor, click Edit, click New, and then click String Value.
Type DefaultPassword as the value name, and then press ENTER.
Double-click the newly created key, and then type your password in the Value Data box.
If no DefaultPassword string is specified, Windows XP automatically changes the value of the AutoAdminLogon registry key from 1 (true) to 0 (false) to turn off the AutoAdminLogon feature.
Double-click the AutoAdminLogon entry, type 1 in the Value Data box, and then click OK.

If there is no AutoAdminLogon entry, create the entry. To do this, follow these steps:
In Registry Editor, click Edit, click New, and then click String Value.
Type AutoAdminLogon as the value name, and then press ENTER.
Double-click the newly created key, and then type 1 in the Value Data box.
Quit Registry Editor.
Click Start, click Restart, and then click OK.


*Quoted from http://support.microsoft.com/kb/315231

Friday, November 21, 2008

Oracle ORA-00911: invalid character

This was the error that bug me for few hours. I wasn't sure what was the exact reason. I google'd it and doesn't seems helpful. Then I tried to trim down my SQL queries, in which by luck, the mystery reveiled.

It was a simple SQL query, selecting all records in the table. I include the semicolon ";" which not supposed to be. After removing it, the error gone and the result were what I want. Posting it here as knowledge-base for reference in future.

Wednesday, November 19, 2008

Oracle: SQLState=IM004 Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

If coincident you got the above error, what I did was to perform the below;

If you navigate Oracle home you will find that the directory has different permissions then the root of the tree. In the case of 10G the path is C:Oracleproduct10.1.0Client_1. Open the properties for the Client_X directory, and you will see that "Authenticated Users" should have Read and Execute, List Folder Contents, and Read. To fix the problem, do the following....
-Select Authenticated Users
-Uncheck Read and Execute
-Press Apply
-Check Read and Execute
-Press Apply

Edited: Another possible solution toward the above error;
Move ORACLEHOME/bin infront of DEVSUITE/bin entry in the PATH variable

Drop or Remove oracle schema(database)

In order to remove the existent schema in oracle, execute the sqlplus and execute the below command;

drop user user_database cascade;

The once the above command gets executed, the database created by user_database will be removed.

Should you have better suggestion, kindly leave a comment..


;)

Your Ad Here