If you are unable to create a new account, please email support@bspsoftware.com

 

Java script with tabs is running all the tabs content even though default select

Started by xyz, 24 Feb 2014 05:24:16 AM

Previous topic - Next topic

xyz

Hello All,

I have used a tabbed java script solution from internet, which will show the tabs WTD, PTD, QTD and YTD. The Java script is working like a piece of cake. But the problem i am facing is the performance issue. I am showing the charts in the tabs WTD, PTD, QTD and YTD. When the chart has limited amount of data then report is running fine. When we have huge amount of data. I am facing issues. What is happening is even thought WTD selection is made by default in the java script actually the report is running all the tabs, basically WTD, PTD, QTD and YTD all the tabs charts are running, which is hitting the performance.

Can some one please help me, I wanted this tabbed solution but whenever I click on the particular tab at that point only related tabbed query have to run.

Example: WTD is selected by default then, only WTD related chart query has to run and other tabs PTD, QTD and YTD tab chart queries should not run.

Please find the attachment of the tabbed java script and chart sample agains Go Datawarehouse package.


Your help is much appreciated.

navissar

Hi there!
That's my tabbing solution, which can be found here http://cognospaul.com/2013/12/22/tab-solution-thats-easy-maintain-without-code-guest-post/. As is the case with tabbing, all the objects are being loaded all at once, and only then broken into tabs, which is probably the reason you're running into performance issues.
So, what can you do?
You can either use a different tabbing mechanism (For example, use a table with drill through links to other reports - that way, when you click on a "tab header" you're actually loading a new report), or you can use iFrames to call different charts from different reports into the tabs, which will mean they will load in the background. Each method has its advantages and disadvantages.

xyz

Hi Nimrod,

Yes, it is actually your tabbing solution, which I found from CognosPaul.com blog. The Javascript you have written is really awesome and piece of cake. As I have used the tabbed solution from the Javascript you have written, I need to have the same look and feel because client has approved it. Client reported performance issue. Later only, I have noticed that huge amount of data is causing performance hit, then I debugged and found that all the objects in the tabs are loaded all at once.

Can't we modify the existing tabbed solution Javascript to run only on clicking the tab, then selected tab object should run, is it possible? or is it tedious and time consuming to write? If not then, what you suggested a table with drill through links, I need to try. Actually the tabbed solution I am using for graphs to show in Workspace.

Thanks and your help is appreciated :)

Thanks & Regards,
Xyz

xyz

Hi Nimrod,

Thanks for the reply and one more thing I forgot to mention that as I am using the tabbed solution for graphs in workspace. Drill through from workspace will take me back to report viewer in report studio, I have to use java script again to redirect to the same workspace and all this is con's of using drill through's in workspace. And regarding iFrames, I haven't tried.

If possible, can you please help me with existing tabbed java script to work for my requirement.

Your help is much appreciated.

Thanks & Regards,
Xyz

maxchuie

XYZ what did you decide to do on this I know I will be facing the same issue soon.

Thanks

navissar

It's like I said: The solution you're using is designed for when the report is loaded all together. If you want to have the report load up different segments separately, you can use iframes to other reports in the not-firstly-selected tabs. I don't have a lot more to add to that.

xyz

Hi Nimrod,

Thank you very much for your suggestion.

Maxchuie,

I have used radio button prompt and conditional blocks to achieve the performance.  Please let me know, if you want further details.

Thanks & Regards,
Xyz

maxchuie

Hi XYZ,
Yes further information would be just great.. I want to put a process in place before the situation arises. thx

xyz

Hi Maxchuie,

Sorry for the delay in reply.

The approach I followed in order to get rid of the performance hit was, using the value prompt with radio buttons for the periods
and creating the variable based on the radio prompt selection and using the conditional blocks and rendering the only selected block based on the selection made in the value prompt. Steps below

1) Create a value prompt with prompt name as p_Periods, add the static values with display values as WTD, PTD, QTD and YTD and with use values as 1, 2, 3 and 4

2) Create a Boolean variable of p_Periods prompt

3) Drag and drop conditional block and assign the Boolean variable created in step 2

4) set current block to 1, drag and drop the WTD related graph in the conditional block with current block set to 1, repeat the same for other blocks.

Thanks & Regards,
Xyz

liby


Hello Nimrod,

I copied the xml provided by you for the tabbing solution , made few amendments to match the tab names and the application names from where it will fetch the data. I have 4 reports in one page displayed on the application portal with each report using tabs which displays a combination of list and graphs.

Report works perfectly in IE with the features mentioned in your blog , but when I try to open the same reports in chrome or firefox, I see a distorted version as in data under each tab falls one below the other and not under each tab however, oddly when I refresh the page report works normally .  A refresh is required each time the report is opened.

Can you pls help me with a solution to this.

Thanks,

Liby.

liby

Hello Nimrod,

Can you pls help me with a solution to the post dated 12th Dec 2014. Clients using chrome/firefox is seeing distorted version of the tab reports, so need a quick fix.

Awaiting your response.

Thanks,

Liby.



BigChris

QuoteOh, I'm sorry, am I behind on my SLA?

That brightened my morning  ;D

liby

Apologies – wasn't trying to chase and any help you are able to provide would be greatly appreciated.

Thanks,

Liby