I have a web template with 3 options in a drop down box. Each displays a chart and is based on a different query. One chart is displayed on the initial load. When one of the other options in the drop down box is selected, it takes a while to load the other chart. This is because the query on which the chart is based is run only then. Is there a way to run all the queries before the web page is rendered and then show the results?
If I understand right, you have a single Chart webitem bound to a single Data Provider DP. DP is assigned to Query1 on initial load. On change of DropDown selection, you reset DP to Query2/Query3 using SET_DATA_PROVIDER_PARAMETERS Command. I think this should be the ideal way of having the Query run on demand rather than having each of them run at template load. But if you are ok with increased load times, you can either have 3 DPs mapped to 3Qrys instead at design time & assign the respective DP to the Chart by SET_ITEM_PARAMETERS on DropDown selection OR have 3 separate Chart webitems each assigned to its own DP at design time; keep two hidden & make them visible on DropDown selection using SET_ITEM_PARAMETERS.
Instead you can work towards improving the performance of your Queries (nothing to do with WAD) by checking on Cache/QD options/Query Variables etc.