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;
}

 

E-mail this post to someone or 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.

 

E-mail this post to someone or Comments (16)
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

E-mail this post to someone or Comments here