If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Stripping day from paramdisplay

Started by Arsenal, 26 Feb 2007 08:21:50 PM

Previous topic - Next topic

Arsenal

Hey all,

I have a report which mainly consists of tables and cells with a couple of columns. Now, I have a prompt which lets users select a beginning date (including month, day and year i.e. mm/dd/yyyy) and an ending date (same format)
There is no prompt page

At the top of the report(not the header), in one of the cells, I have a paramdisplay set to display the chosen beginning date. I would like the date to be March, 2006 instead of March 12,2006 (say)

I've tried a number of things to the paramdisplay such as extract, but to many errors. I tried adding a calculated column, but RS won't allow me that because it's a cell

Another thing is, how can I get the prompt to display a chosen text? Since there's no prompt page, I can't drag a text button.

Any ideas how I could achieve what I'm looking for?


MFGF

Hi,

If you are using a layout calculation (for your paramdisplay), you cannot use data-specific functions such as extract.  You need to use a Detail calculation instead, but for this to be legal you must first associate the query with the page.  In fact you don't even need functions in this case - formatting should suffice.

Try the following (this assumes you are using ReportNet not Cognos 8):

1) Select any object in your report, then use the Select Ancestor button to select 'Page'.
2) In the properties of the page, go to the Query property and select the query used for your report.
3) From the toolbox, drag a calculation to the required cell, specify it is a Detail calculation, and give it a name.
4) For the expression of the calculation, go to the Parameters tab and bring in your beginning date parameter, then press OK.
5) Select the calculation in the cell, and in properties go to the Data Format property. Set the format type to be Date and change the 'Display Days' and 'Display Weekdays' properties to No.

Hopefully this will give you what you're looking for.

As to your second question, I'm not clear whether you have a prompt on your report page, or whether you have not coded a prompt and ReportNet is generating one for you.  If it's the former, then you can add whatever text you like around the prompt.  If it's the latter, you have no direct control over how the prompt appears - in this case the best bet would be for you to add your own prompt page with the relevant prompt(s) on it, then you could supply whatever text was required here.

Hope that helps!

Best regards,

MF.
Meep!

Arsenal

MFGF,

THANKS. Worked like a charm :)

Changed the date style to Long

and now that you answered a previous question, that automatically forces you to answer my next question ;)

It's about adding text to the prompt. Basically, the report is not mine - it is somebody else's that I'm trying to fix.

He/she had not built a prompt page but was just using a query item called accountmonth date between ?? to drive the prompts for the starting month and ending month

i went around, creating a prompt page, created a date prompt, creating a new parameter, associated the query item accountmonthdate as the model item to filter on

then changed, via query explorer, all the queries that were using ?accountmonthdate? to use ?Para1? (the parameter i created for the prompt)

when i run the report, my prompt page comes up fine, but finish is not highlighted..next is. when i click next, another date prompt comes up and finish on that brings up the report

i'm guessing that somewhere the ?accountmonthdate? still remains...beats me where. Any ideas?

MFGF

Hi,

The trick here is to associate the new prompt on the prompt page with the existing parameter ?accountmonthdate?, rather than creating a new parameter.  I guess this news is coming a little late, though! :-)

If you want to fix the current problem, you need to make sure that:

a) Your prompt is setting a value into your ?Para1? parameter (you can verify this in the properties of the prompt)
b) Your filter(s) use the ?Para1? parameter
c) Your calculation (from the prior question) uses the ?Para1? parameter

Once you have checked all these, if you are still having trouble, copy the report specification to the clipboard (use the Tools menu on the menubar), paste the specification into Notepad, and use the notepad search facility to see if/where the old parameter ?accountmonthdate? is still being referenced.  If you get any hits, hopefully the XML should help you to track down where it's still in use.

Happy hunting!

MF.
Meep!

Arsenal

Thanks for your reply, MFGF

I tried out both of your suggestions. I tried to build a new prompt page with the accountmonthdate parameter as the parameter for the prompts (dragged and dropped 2 date prompts)

a 3rd calendar still shows up on clicking next after selecting values in the first 2 calendars

Also used the one with the ?para1? to check xml specs ...nowhere does ?accountmonthdate? occurs in that form, although query item accountmonthdate does occur

i tried checking if the ?Para1? is setting a value, but I can't find anything in the properties pane of the prompt to do this


MFGF

Hi,

OK - I think we need a few more details.

1. How many queries are there in your report (use the Query Explorer to find out).
2. In your query (or queries), what filter(s) are defined?  What syntax is used for each filter?
3. How many prompts are there in your report? - In the properties of each prompt, what is the 'Parameter' property set to for each?
4. In your query (or queries), what items are defined that use a parameter in the expression? - Your calculation will be one...

If you can find out the answers to these, with a little luck we may be able to pin this down.

Best regards,

MF.
Meep!

Arsenal

MFGF,

Thanks a LOT for your help.

In between coding other reports, I figured out why the 3rd prompt was coming...there was still a prompt ?report start date? in the expressions for the facts in 2 of the queries

i cleared that and set the expression  = ?para1? and that took care of the 3rd prompt


But, I'll be very grateful if you could perhaps find some time to help me out with another unassociated problem
:)

MFGF

Hi,

Glad to hear you got the prompts fixed.  What are the details of the other problem? (or is that the one in your next post?)

Best regards,

MF.
Meep!