Asset Management Suite

 View Only
  • 1.  Report Parameter

    Posted Apr 18, 2012 08:26 AM

    I noticed the Discovered Devices has a date parameter with a default value of today-1.  The term or keyword today supplies todays date as the default parameter.  Are there other terms or keywords which can be used to make variable default parameters?



  • 2.  RE: Report Parameter

    Posted Apr 18, 2012 11:34 AM

    Are you looking at Reports > Discovery and Inventory > Discovered Devices?  Mine has a date parameter for start and a date parameter for end, and doesn't have the word Today.  If you look at the SQL, however, @StartDate is set to GETDATE()-30 and @EndDate is set to GETDATE().  In SQL, GETDATE() returns today's date.



  • 3.  RE: Report Parameter

    Posted Apr 19, 2012 11:32 AM

    Yes that is the report I was viewing.  It is found in the XML file.  You can't enter it in the SQL, but you can enter it as the default value of the report parameter dialog. 

    In my report the GetDate()-30 is commented out.

    - <parameter>
      <name>DateRangeFrom</name>
      <description>Date range: From</description>
      <required>true</required>
      <nullable>false</nullable>
      <parameterType>PType-DateTime</parameterType>
      <defaultValue>today-1</defaultValue>
      <order>10</order>
    - <valueProvider classType="Altiris.Reporting.Parameters.ParameterValueEditControls.DateTimeValueEditControl">
    - <configuration readonly="False" hideOnError="False">
      <style labelVisible="True" labelText="Date range: From" timeVisible="True" dateVisible="True" alwaysUseDefault="True" />
      </configuration>
      </valueProvider>
      <requiredParameters />
      <configurationControlClassGuid>73bded50-f1aa-4ff4-a80e-a6c9e047d472</configurationControlClassGuid>
      </parameter>

     



  • 4.  RE: Report Parameter

    Posted Apr 20, 2012 12:12 AM


  • 5.  RE: Report Parameter

    Posted Apr 23, 2012 09:20 AM

    I'm able to use 'now' and 'today' successfully, but I'm not able to use the others (e.g. today-day(today)).  I was hoping to have a default parameter date of today minus one month.  I'll have to settle for today-31.



  • 6.  RE: Report Parameter
    Best Answer

    Posted Apr 23, 2012 10:32 AM

    Correct.  today-31 is the correct way to do this.  You can see elsehwere in the .xml they use day-1.