Thu 28 Jan 2010

Accessing JD Edwards Data on iSeries or AS/400 from a ASP.NET

Facing problem, while retrieving field data from JD Edwards to SQL (SSRS Reporting), giving Error or Special unicode characters,
because, the returning data was a stream that needs to be converted into ASCII (ebcdic37String) using Cp037 Encoding.


public static String convertEBCDIC37ToUnicode(String ebcdic37String)
{
 String encoding = "Cp037";
 byte[] ebcdic;
 String converted = null;
 try
 {
  ebcdic = ebcdic37String.getBytes();
  converted = new String( ebcdic, encoding );
 }
 catch (Exception e)
 {
  //Handle it
 }
 return converted;
}

 

Comments here
Thu 28 Jan 2010

Few days before, I was having problem that after clicking on Export to pdf button / image, other controls of web part/user control stops working on the application page on WSS 3.0 environemnt that has RadGrid on it.

While the same thing was working on other asp.net application outside the sharepoint environment.

1st workaround (can be a solution)

The cause for this behavior is that there is a flag (named _spFormOnSubmitCalled) in SharePoint which prevents double form submition. This flag is set when the form is submitted and clear when the response is received.
However when exporting the response is redirected and the page is not updated, thus the flag is not cleared and page's postbacks are blocked.

In order to workaround this behavior you should manually clear the flag when exporting. This can be achieve, for example in export button's client click function similar to the following:

MyExportButton.OnClientClick = "_spFormOnSubmitCalled = false;"  

Above workaround will allow you to export multiple times, but all the other controls on the page were still not functional after the export.

2nd workaround (Not / Never recommended)

In your sharepoint master page, remove onsubmit attribute from your form tag

<form runat="server" onsubmit="return _spFormOnSubmitWrapper();"> 

and remove the onsubmit attribute.  This is what it looks like now:

<form runat="server"> 

3rd workaround (so far so good and implementable)

Add the following script to your webpart / custom control that need to have export and other controls functionals, rather then implementing the above workarounds
So here you go with the working solution.

<script type="text/javascript" language="javascript">

    //sharepoint postback to work after clicking on telerik export to pdf
    if (typeof (_spBodyOnLoadFunctionNames) != 'undefined' && _spBodyOnLoadFunctionNames != null) {
        _spBodyOnLoadFunctionNames.push("supressSubmitWraper");
    }

    function supressSubmitWraper() {
        _spSuppressFormOnSubmitWrapper = true;
    }
   
</script>

 

Hope this will helps.

 

Comments (19)
Mon 25 Jan 2010

Pakistan - T20 World Cup Champion...

IPL - Incomplete without Pakistani pLayers

 

IPL+Pakistan+Players.jpg

Categories : Health / Medical
Comments here
Sun 17 Jan 2010

Hollywood actress

 

Paris Hilton's

 

Latest Clips......

never seen before.........

 

 

Please be alone in your room before viewing them

so you would not feel emabarassed any more

 

Scroll down and hold your breaths....

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

 

paris+hilton+clips.jpg

Comments here
Sat 16 Jan 2010

Chalk Guy with Amazing Positively Outstanding Art on Streets

street_paint001.jpg

street_paint002.jpg

street_paint003.jpg

street_paint004.jpg

street_paint005.jpg

street_paint006.jpg

street_paint007.jpg

street_paint008.jpg

street_paint009.jpg

street_paint010.jpg

 

 

street_paint011.jpg

street_paint012.jpg

street_paint013.jpg

street_paint014.jpg

street_paint015.jpg

street_paint016.jpg

street_paint017.jpg

street_paint018.jpg

street_paint019.jpg

street_paint020.jpg

 

street_paint021.jpg

street_paint022.jpg

street_paint023.jpg

 

street_paint024.jpg

street_paint025.jpg

 

Categories : Pics / Images Shot
Comments (1)