6 Replies Latest reply: Feb 24, 2012 7:03 AM by Kamal Naithani RSS

    Working with max date

    Samuel Vile

      Hello all,


      I think this is a fairly quick fix as I feel like I'm very close to the answer already but can anyone help with the following: -


      I'm trying to force my QVW Document to look at the latest dates worth of data...I've set up a variable called varMaxDate, that holds the maximum date of loaded data. The bit I'm struggling with is setting this to the open command of the document, I basically want the user to be looking at the latest load when they open the file.


      Can anyone help?

        • Working with max date
          Kaushik Solanki



             one thing i want to suggest here is if you dont require the previous day data for any kind of analysis, it is advisable to remove those data and load only the data needed for the analysis.


              The reason is unnecessary data will occupy the space and may also effect in the performance of the application.


               So if you want to just show the latest day data then try to load only that data, something like this.








                where Date = date(today());



          Kaushik Solanki

          • Working with max date
            Magnus Ã…VITSLAND

            Hi SamVile.


            If you don't need the older data for your analysis, you should better do as the previous speaker suggests.


            Otherwise, if you indeed need the data, you could create a trigger for Document.OnOpen with action "Select in Field" with your variable varMaxDate.


            Hope this helps.

            • Working with max date
              Samuel Vile

              Hi Chaps,


              I do actually need all of the historic data...I just want to show the latest upon open.


              I can't get the trigger to actually work...am I missing something?


              I've put my variable into the Field section of the trigger event...is that right??