Traditional web-based reporting with SAS BI tools

How to Format the Date prompt value in the report

Reply
Contributor RSB
Contributor
Posts: 72

How to Format the Date prompt value in the report

I have a Prompt for the Reporting date in my report. The value of the Reporting date from the prompt is being displayed in the Report using a Text Box .

For Eg. If I select the value March 31, 2011 in the prompt the value that is being displayed in the report is appearing as 31Mar2011.

Is there a way we can format this value and display it as 31-Mar-2011.

Thanks.

SAS Super FREQ
Posts: 407

How to Format the Date prompt value in the report

Generally, you have two options:

In the information map, edit the expression for the date using the PUT function, like this

STRIP(PUT(<<table.date>>,DATE11.))

and change the data Type to Character. You would also need to modify the prompt to be a Text prompt and not a Date prompt. If you use this method, then you cannot use a calendar control for the prompt.

If you need to use the calendar control, then your only option will be to select the date as a group break in the report. The selected date will appear as formatted in the group break label. You would also have to remove the Text object and hide the Applied filters text because the date willl appear unformatted in those places.

Contributor RSB
Contributor
Posts: 72

How to Format the Date prompt value in the report

We are using a calander control for date selection and it is not based on the data items.

Though I have not tried applying the group breaks I can tell that we cannot control the position of the label, which does not help in our case since we have to display that at the top right corner of the report layout and I guess using the Text Object is the only option for us.

Thanks.

Ask a Question
Discussion stats
  • 2 replies
  • 316 views
  • 3 likes
  • 2 in conversation