BusinessObjects Board

How to Display the Current Date in Prompting input Box?

Hi All,

In my report, i need to display the current date in Prompting text box and also select from the LOVs(this is pretty simple) based on that, the values are fetched from the database.
how can we do this??
if any help that would be very greatful…

Advance Thanks


sakthi (BOB member since 2004-10-05)

I don’t know if you can fill in default values in prompts. I would solve this using the Document_BeforeRefresh event in VBA. In VBA you could loop through the variables. Once you find the prompt asking for the date you fill in the current date.

Private Sub Document_BeforeRefresh(Cancel As Boolean)
For i = 1 To ActiveDocument.Variables.Count
  If ActiveDocument.Variables.Item(i).IsUserPrompt = True Then
     If ActiveDocument.Variables.Item(i).Name = "Date ?" Then
        ActiveDocument.Variables.Item(i).Value = Date
     End If
  End If
Next i
End Sub

If you refresh this report the current date will be filled in at the ‘Date ?’ prompt.

[Edited, when posting code samples please use the code option for formatting. It will preserve any indenting or formatting that you may have done. Thank you, Andreas.]


pehuyghe :belgium: (BOB member since 2004-05-18)

Hi pehuyghe,

Thanks for your Quick Reply.
i will try it out in VBA. Is there any other solution for this??

Thanks


sakthi (BOB member since 2004-10-05)

Short answer - No.


Mak 1 :uk: (BOB member since 2005-01-06)