Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Impromptu Prompts & Report Headers

Status
Not open for further replies.

monsky

Programmer
Jul 3, 2002
89
AP
Hey guys,

I have a report that shows shows a monthly transaction for a given period. The report contains a prompt that would ask for the beginning date (e.g. 2004-01-01) and ending date (2004-11-31). Now, what I'd like to do is to display the beginning periods at the report header but instead of the YYYY-MM-DD format I'd like to format it showing only the month-year or perhaps change the format to an MM/DD/YYYY display.

Would appreciate any inputs you can provide.

 
monsky,

Add the prompt to the Query Data as a calculated column. You then have complete control over the formatting when you add this calculated column to the header (rather than the prompt itself).

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Howdy Monsky, Once your report has run and you can see data in format yyyy-mm-dd, click on the DATA ITEM and right click. Click Format=>Data. Its probably defaulted to General...either pick a format from the list or type mm/dd/yyyy (or mm/yyyy or mm/dd/yy...). If you want to add text, say "Beginning Time Period", just double click on the field with the data. The mouse will at the beginning. Type what you want, and hit enter.

Cindy
 
Prompts in Imprompts are quite inflexible. I suggest you try either: write a script (CognosScript) to handle the prompt using Message Box or similar, or you might get somewhere defining a report or catalog item that has the format you want (text), using that as the prompt, and linking the data to that by doing some fancy footwork in the report. I'm pretty sure I've seen it done, so there should be a way.

Acestar Solutions Limited
Cognos development and on-site training
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top