The techie in me RSS 2.0
 Friday, March 07, 2008

If you are working with Crystal Report and not handling the Report closing properly you must have faced this error.

"The maximum report processing jobs limit configured by your system administrator has been reached."

The error message is self describing; well now the question is how to resolve this issue. The quick answer is making sure that you end the crystal job successfully, i.e. close the report once the user has closed the report. Yes, you have to do this manually.

 

I found multiple methods of doing this from groups, putting down the best methods I found in order.

 

1. Close the report while unloading the report viewer page.

VB.NET code below

Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
    If Not objRpt Is Nothing Then
        objRpt.Close()
        objRpt.Dispose()
    End If
End Sub

This is the best method as far as I can think.

2. The lazy option – change registry key to accept more or infinite numbers

regedit - > navigate to

HKEY_LOCAL_MACHINE/SOftware/Crystal Decisions/Report Application Server/InprocServer/ReportDocument

Change the value of the field MaxNumOfRecords to -1(For Unlimited No. of records)

 

Your sys admin may sue you for changing this J

 

3. I like writing more code, give me an option – ok now for you, the option is create a factory class and when creating class check if the max has reached and clear the old ones. (Not a good idea isn’t it?)

public class ReportFactory
{
    protected static Queue rptQueue = new Queue();

    protected static ReportClass CreateReport(Type reportClass)
    {
        object report = Activator.CreateInstance(reportClass);
        rptQueue.Enqueue(report);
        return (ReportClass)report;
    }

    public static ReportClass GetReport(Type reportClass)
    {
        if (rptQueue.Count > MAX_COUNT) ((ReportClass)rptQueue.Dequeue()).Dispose();
        return CreateReport(reportClass);
    }
}

Choose your own method, as I mentioned my fav is the first one...

 

Good luck

Rujith

 

Friday, March 07, 2008 11:34:17 AM (GMT Standard Time, UTC+00:00)  #    Comments [3] -
Crystal Report
 Thursday, February 28, 2008

Hope you still remember those good old days, when you can access yahoo mail, hotmail and almost all web based emails through your outlook for free, without using any bulky software add-ons. I think that day it was necessary, accessing internet was not cheap and fast those days as it is now. It’s easy to compose your email offline and send it when you connect to the internet. Yahoo now charges for the POP3 service, you need to subscribe to mail plus for that, I don’t know when hotmail stopped their http service, till few months back it was working for me. Then it suddenly stopped working. Then later they introduced outlook connector. One good thing I noticed is it doesn’t add those advertisements when sending through outlook. And as usual the bad thing is it supports only OUTLOOK L.

 

Outlook connector can be downloaded here.

-Rujith Anand

Thursday, February 28, 2008 3:42:30 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Email
 Wednesday, February 27, 2008

If you have used ASP.NET web controls and java script you must have faced the problem of getting control’s id in java script especially if you are using content place holders, repeaters etc. So when generating the html content ASP.NET generates a unique Id to uniquely identify the control on the webpage. This id is visible through the property control.ClientId. And use this clientId in your java script to reference the control. I came across this recently when I was reviewing a code, I found that the developer getting the source code (html) for the aspx from the browser and hard coding that in the java script. Good logic (it was inside a content place holder), but there is no guarantee that the id is going to be same. For example the id generated in IIS5.0 and IIS 6.0 may be different. So if you develop in IIS 5.0 and deploy in IIS 6.0 (which most of us do) you will be shown the weird javascript error ‘value is null’ J.

You will need to render the java script through code behind. See msdn documentation for how to use client scripting in ASP.NET pages.

Check here for documentation on control.ClientId

 

Rujith

 

Wednesday, February 27, 2008 1:23:33 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

 Tuesday, February 26, 2008

Last week I upgraded my windows mobile phone from WM 5.0 to the new (mmm not that new) WM 6.0. I have been searching for the upgrade for quite a long time now. HTC announced free upgrade to all its customers’ couple of months back. But I bought my HTC TyTyn through T mobile (renamed as T-mobile Vario II), so I cannot use the HTC upgrade. I called up the T mobile customer centre couple of time, but they gave all weird answer, once I was told that I have upgrade the phone to get the software upgrade. Then I found out it’s not worth wasting time on educating them about WM, and went to T mobile high street shops, they also had no clue. Finally I managed to find it online in T mobile website.

I couldn’t find my difference between windows mobile 5 and 6, except that they included the must have feature of adding a dialled number (or received phone number) to an existing contact. I still cannot receive contacts sent from Nokia or other phones unless they are outlook contacts L. That’s another must have feature isn’t it, not everyone has WM, and the features should be compatible isn’t it? Hope they will give some option in the next version.

 

The free upgrade to WM 6.0 for all T-mobile Windows mobile phones can be downloaded from here. You have to give your handset serial number, which can be found if you remove your battery.

-Rujith

Tuesday, February 26, 2008 5:16:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Windows Mobile
 Wednesday, February 20, 2008

Semi Join in SQL server

 

 

It’s an interesting fact that we never tend to use semi joins in SQL server, and instead we tend to use the more easy (or rather lazy) way of using an ‘IN’, which obviously takes huge amount of time (again depends !). I was writing a query to search from multiple tables (having millions of records) and don’t have much option of change, and it was taking lot of time (again depends!) to fetch the result set. That’s when I remembered about semi-join, replaced all lazy ‘IN’s with semi joins and I got alteast 40% performance improvement.

 

Now how to use semi joins

 

Semi Join

 

DELETE @AvalableOrgIdList FROM @AvalableOrgIdList AVL

                                    WHERE EXISTS (SELECT  OrgId FROM @TmpSrchResult RSLT WHERE RSLT.OrgId = AVL.OrgId)

 

Anti Semi join

DELETE @AvalableOrgIdList FROM @AvalableOrgIdList AVL

                                    WHERE NOT EXISTS (SELECT  OrgId FROM @TmpSrchResult RSLT WHERE RSLT.OrgId = AVL.OrgId)

 

 

Want more explanation and more in depth into SQL joins etc , check this blog.

http://blogs.msdn.com/craigfr/Default.aspx

-Rujith

Wednesday, February 20, 2008 9:30:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

 Sunday, February 17, 2008

After long days of being lazy, I finally managed to bring my blog up and running... This has been kind of dreem project for me, which was running for past few years now... :(, yes I am bit ashamed of myself. And I know this is not the way to put your first blog on ur new blog site, but thats the TRUTH...

 

Watch out for more stuffs in the space soon.......

 

-Rujith

Sunday, February 17, 2008 9:02:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

About me
Name : Rujith Anand Send mail to the author(s)
Archive
<March 2008>
SunMonTueWedThuFriSat
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345
Blogs I read
Disclaimer

Disclaimer
Postings are provided as is with no warranties, and confer no rights. Opinions expressed here are my own delusions; my employers at best shake their heads and sigh, at worst repudiate the content with extreme prejudice, whenever it manages to appear on their radar.

© Copyright 2012
Rujith Anand

Statistics
Advertisement
All Content © 2012, Rujith Anand