Qlikster http://db07tc13f7t7u.cloudfront.net/

Getting More Info on Sharepoint's 'An unexpected error has occurred' Error

Thursday, 18 June 2009 14:15 by qlikster

I came across a very useful config tweak the other day for the unhelpful "An unexpected error has occurred" page which I have seen many times in Sharepoint, usually without any related entries in the Sharepoint logs.

If you locate the following in your web.config file:

<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">

And change it to:

<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">

You will get a standard and slightly more helpful ASP.NET error page - don't forget to turn off customErrors:

<customErrors mode="Off" />

Tags:   ,
Categories:   Sharepoint
Actions:   Permalink | Comments (0) | Comment RSSRSS comment feed

Making Preselections in QlikView WorkBench Based Sites

Friday, 12 June 2009 15:00 by qlikster

The requirement to make pre-selections in the QlikView application behind a web site built using the QlikView WorkBench (when the web page first loads) comes up quite frequently, so I thought I would post a code snippet which illustrates one way in which this can be achieved.

This technique makes use of sending through a search command to an underlying listbox when the QlikView objects are being initialised. In this example we pull both the listbox ID and the search value from the query string in the url, so for example you might use a url something like:

http://myqlikviewworkbenchbasedsite/default.aspx?listboxid=LB_COUNTRY&listboxvalue=SWEDEN

Of course, these values could be hardcoded or injected into the page some other way, for example in server side code.

Here's the code that you would place in your web page:

<script type="text/javascript">
qwwHub.Register(
{
    OnDocumentLoaded: function() {
 
        var listbox = Qww.Helper.GetQueryVariable("listboxid");
        var listboxVal = Qww.Helper.GetQueryVariable("listboxvalue");
 
        if (listbox != null && listbox != "" && 
            listboxVal != null && listboxVal != "") {
 
            // uncomment this line to make it a fuzzy search.
            //listboxVal = "*" + listboxVal + "*";
 
            qwwHub.DoAvqSet(null, listbox, "search", listboxVal, false);
            qwwHub.DoAvqSet(null, listbox, "closesearch", "accept", false);
        }
    }
});
</script>

As mentioned this code works for sites built using the QlikView WorkBench only as it relies upon the JavaScript functionality already present in this product.

Tags:   ,
Categories:   Sharepoint | Web
Actions:   Permalink | Comments (0) | Comment RSSRSS comment feed