4 Replies Latest reply on Mar 18, 2013 2:35 PM by Tarungoyal-Oracle

    current date and time in narrative. html?

      I would like to include current time and date in the narrative of a report. The purpose of this is that when end-users export the report a time and date of export is inlcuded in the export so that I know when specific reports where exported.

      I now have a workaround with added hidden date and time columns and showing only first rows of these hidden columns. This is quite a lot of work since I have to update about 75 reports with this date and time values.

      Does any of you know how to include currentdat and time in the narrative with a html code?

      Or are there other ways to achieve what I am looking for?

      Thanks a lot
        • 1. Re: current date and time in narrative. html?
          The best way is to add a column in criteria with expression as current_timestamp and then format it as required using column properties and hide it, make it this as very first column in criteria. In the narrative view use @1, since its 1st column.

          or else use this link ;)

          If helps mark

          Edited by: Srini VEERAVALLI on Mar 8, 2013 10:10 AM
          • 2. Re: current date and time in narrative. html?
            Thanx for your suggestions

            The first option you suggest is the one I mentioned as the workaround that I am using now but it takes quite some time to get this done on 75 reports so I am still looking for a copy paste script.

            I can't get that javascript you mentioned to work, so I'll go with this to my supplier and see what he can do.
            • 3. Re: current date and time in narrative. html?

              We had similar kind of requirement.
              We have created a repository variable "CurrentDateTime" and added this in each and every report in the narrative view as below.

              1.Leave the existing Table view or chart view as it is.

              2.Add one narrative to the existing report.

              3.Modify the narrative view and paste the below logic in that.

              Current Date: @{biServer.variables.CurrentDateTime}

              Hopes this helps.

              • 4. Re: current date and time in narrative. html?
                You can use below code in the "Text" section of Dashboard page. this will display current month as per your requirement.

                var today = new Date();
                var dd = today.getDate();
                var mm = today.getMonth()+1; //January is 0!

                var yyyy = today.getFullYear();
                if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} today = mm+'/'+dd+'/'+yyyy;