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

report is not showing data by default

Started by shubh09, 22 Jun 2017 09:38:20 AM

Previous topic - Next topic

shubh09

Hi,

I am facing an issue with my cognos report, my report is not showing data by default. To see the data I need to click on finish button(which is prompt button) at least once.
Can someone know how to resolve this? 

New_Guy

Hi,
Do you have a prompt page?
Do you have filters for the report query?
Do you have any render variables based on the prompts to render the report page?
Do you have prompts on the report page itself?

If you don't mind please answer the above questions.
Good luck
New guy

shubh09

Hi, Thank you for your response!!
Do you have a prompt page? ---> No
Do you have filters for the report query? --> Yes
Do you have any render variables based on the prompts to render the report page? ---> Yes
Do you have prompts on the report page itself? --> No

MFGF

Quote from: shubh09 on 23 Jun 2017 02:58:21 AM
Hi, Thank you for your response!!
Do you have a prompt page? ---> No
Do you have filters for the report query? --> Yes
Do you have any render variables based on the prompts to render the report page? ---> Yes
Do you have prompts on the report page itself? --> No

What expression(s) is/are being used in your filter(s)? DO you have any that are referencing parameters (ie you see ?Something? in the expression)?

If so, this or these will cause prompts to be automatically generated at runtime on a generated prompt page. I'm guessing this is what you are seeing? This is all just guesswork, though. Can you tell us more?

MF.
Meep!

shubh09

Yes, I have filter something like detailed below:
1) One Date prompt/filter which is associated with update/finish(Prompt button).
2) After that we have 4 filters Region, Location, Week and date, all this are associated with another update button. Also here we have applied render variable properties.
3) We have cross tab report where we are seeing Region, Location, Week, date along with respective hrs details.

in point 1) and 2) we have default values selected but when we execute report by default it will not show any data. If we click on any of update button it will display the data in report(display Region, location, week, date along with respective hrs).   

Lynn

Quote from: shubh09 on 23 Jun 2017 05:46:51 AM
Yes, I have filter something like detailed below:
1) One Date prompt/filter which is associated with update/finish(Prompt button).
2) After that we have 4 filters Region, Location, Week and date, all this are associated with another update button. Also here we have applied render variable properties.
3) We have cross tab report where we are seeing Region, Location, Week, date along with respective hrs details.

in point 1) and 2) we have default values selected but when we execute report by default it will not show any data. If we click on any of update button it will display the data in report(display Region, location, week, date along with respective hrs).   

You haven't answered this question:

Quote from: MFGF on 23 Jun 2017 04:15:30 AM
What expression(s) is/are being used in your filter(s)? DO you have any that are referencing parameters (ie you see ?Something? in the expression)?
...
You've said you don't have a prompt page and you've also said that you don't have prompt controls on the report page, so how are you specifying default values for prompt choices? The only other way I know of to do that in the absence of prompt controls is with a prompt macro. Are you using prompt macros?

You've also mentioned buttons which are typically used in conjunction with prompt controls, so I'm confused as to what you've got and haven't got since your responses seem to be conflicting. Or I'm simply not understanding properly.

shubh09

Hi,

Sorry, I have prompt controls in form of filter on the report page itself. To be specific I don't have separate prompt page in my report.

MFGF

Hi,

You told us:

Quote from: shubh09 on 23 Jun 2017 02:58:21 AM
Do you have prompts on the report page itself? --> No

Quote from: shubh09 on 25 Jun 2017 09:30:40 AM
Sorry, I have prompt controls in form of filter on the report page itself. To be specific I don't have separate prompt page in my report.

Those two answers directly contradict each other? Can you advise which is the correct answer?

I'm assuming the latter. In that case, you need to define a default selection for each prompt on your report page. You do this using the Default Selections property of each prompt. The reason you are seeing an automatically generated prompt page (which was your original description) is that the report page cannot render without the prompt values being fulfilled, but you have put your prompts on the report page. Therefore the report has to auto-generate a prompt page to fulfil the prompts before the page can be rendered for the first time. To fix the issue, all you need to do is to define default selections for the prompts, which can then be used to render the report page initially.

Cheers!

MF.
Meep!

shubh09

Thanks for reply, but I already have default selection defined in each filter.

MFGF

Quote from: shubh09 on 27 Jun 2017 12:37:18 AM
Thanks for reply, but I already have default selection defined in each filter.

Hi,

Filters can't have default selections - they are defined in the properties of a prompt. Have you checked to see if you have any filters with parameters for which you don't have a prompt defined?

You also indicated you have render variables based on the prompt(s) to render the report page. Can you provide details of how this works?

MF.
Meep!

shubh09

Hi, We found the root cause of this issue, it is because of setting current week as default week in "week" value prompt.
Where the week value which is stored in DB table is not matching with passed default selection value in value prompt.

Now, can you help me how I can set current week as default???


Currently we have:

1) Week value prompt default value -> "Week", where Week we have as dataitem in our query and the value of it is
Week = 'WK' || cast(_week_of_year('PDATE'), varchar(50)) || '-' || cast(extract(year,current_date), varchar(50))

2) because of this on report it is showing the current week value in report but not refreshing the report with that value by default.

New_Guy

Hi,
Create a value prompt with Display value as 'Current Week' and use value as [data item] which you have to create. Post a screen shot of a param value of your week parameter and we can try creating it by using current date and deriving the week.
Good luck
New guy

shubh09

Thank you for your support!!
I have created vale prompt for current week as instructed and my parameter name is Week.
Week has value in DB
For example: WK26-2017 for Current Week.

New_Guy

Hi,
set the default value for the week prompt 'Current Week' and use value as 'current week'. set the filter as

week column = case when weekparam = 'current week' then ('WK' || cast(_week_of_year('PDATE'), varchar(50)) || '-' || cast(extract(year,current_date), varchar(50)))) else (?weekparam?) end

The other way is to create a data item in the main query as (('WK' || cast(_week_of_year('PDATE'), varchar(50)) || '-' || cast(extract(year,current_date), varchar(50))))) and using it as default use value.
Good luck
New guy