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

 

Required Date Parameters displayed before prompt page is displayed

Started by Quigwam2058, 08 Jun 2023 09:18:11 AM

Previous topic - Next topic

Quigwam2058

In a report that has several required date prompts.  When running the report in HTML, responses to those parameters are required prior to the prompt page being generated.  I enter the date selections, but then when the prompt page opens they are not reflected on the prompt page.  I don't want to see those prompts before the prompt page opens.  How do I correct this?

MFGF

Quote from: Quigwam2058 on 08 Jun 2023 09:18:11 AM
In a report that has several required date prompts.  When running the report in HTML, responses to those parameters are required prior to the prompt page being generated.  I enter the date selections, but then when the prompt page opens they are not reflected on the prompt page.  I don't want to see those prompts before the prompt page opens.  How do I correct this?

Hi,

Can you clarify what you need here - I'm not quite sure I understand. Are you saying you need to prompt for some parameters before the main prompt page appears? Or are you saying some parameters are being prompted for erroneously before the prompt page appears?

If it's the first, you can add multiple prompt pages to a report and include whichever prompts are needed on each page.

If it's the second, I assume you either have mismatched parameters in your filters/report items vs the ones your prompts are setting, or possibly you have multiple filters on the same items including different parameters? I would start by looking closely at the prompts on your prompt page and the filters in your query to see what parameters are being used.

Cheers!

MF.
Meep!

Quigwam2058

The second scenario you described is my issue.  I do not want to see the parameters before the main prompt page appears.

I was only able to resolve the issue by setting a default value to the date prompt on the prompt page.  I do not find multiple filters on the same items.  This issue is occurring in multiple reports.  I will look closer in each report to see if that is the problem.

MFGF

Quote from: Quigwam2058 on 08 Jun 2023 09:53:18 AM
The second scenario you described is my issue.  I do not want to see the parameters before the main prompt page appears.

I was only able to resolve the issue by setting a default value to the date prompt on the prompt page.  I do not find multiple filters on the same items.  This issue is occurring in multiple reports.  I will look closer in each report to see if that is the problem.

You shouldn't need to code a default value, unless you are using a prompt on the main report page, or unless something on the page needs the parameter to be resolved before the page can render. Is your prompt page definitely a prompt page not a regular page? How exactly is the date prompt and the prompt page configured?

Cheers!

MF.
Meep!

dougp

I have seen this a lot.  The prompt page has a prompt object that relies on a query that has a filter (or computed data item expression) that relies on a parameter.  Typically, this is from the developer choosing to use the query that is used for one of the output visualizations as the source for the prompt object.  That's bad in more ways.  You are expecting Cognos to minimize the query before feeding the results to the prompt object.  That doesn't always work and sometimes results in your prompt page taking minutes to load.

To properly feed your prompt objects, each should use a small query designed specifically to populate that prompt.

Quigwam2058

MFGF:  I have one report that uses an actual prompt page and that is the one where the issue was resolved once I entered a default date value.

DougP:  On another report I have a report page that contains one date prompt  (not on a prompt page) , this is for a list that contains a drill thru parameter.  I do not want the drill thru parameter on that report to prompt me when it runs.  Are you suggesting that I would need to create a separate query for that one drill thru field and join it to my main query?

Another issue I have with using separate queries for each prompt is that if I have use a query calculation to create the parameter, I don't know how to find it when creating the prompt using the prompt wizard.  I am only able to select a package item and not my query calculation. The prompt wizard doesn't create a separate query when using the existing parameter (created with a query calculation).

dougp

Drill thru parameter?  Do you mean the parameters defined in the drill thru definition of the source report?  Or do you mean the parameter on the target report?  I'm having trouble envisioning where you are getting prompted.

Is this just a matter of making the filter in the target report optional and setting the parameter in the drill thru definition in the source report to "Do not use parameter"?

Quigwam2058

Unfortunately, I cannot attach a picture of the report to explain this very well.  I keep getting an error here when trying to attach, regarding access to the path.

If I cannot prevent parameters from popping up when opening a report (when these parameters are connected to prompts either on the report or on a prompt page or as a drill thru definition that passes the parameter value to another report), then the client will just have to understand and try to ignore this.  I see no way to prevent these from opening ahead of the report actually running.

MFGF

Quote from: Quigwam2058 on 09 Jun 2023 07:56:11 AM
Unfortunately, I cannot attach a picture of the report to explain this very well.  I keep getting an error here when trying to attach, regarding access to the path.

The site doesn't allow image uploads or attachments, sadly. One way around this is to upload your images to a site such as imgcc or photobucket, then copy the 'img' tags for the images into your post.

Cheers!

MF.
Meep!

Quigwam2058

Unfortunately, the only way this report will accept the correct date parameters is if they are part of the query I am filtering, and not it's own small query with just dates.  This is because we are filtering payroll records that span currently just 2 years.  If I filter separately the report takes forever to run.

I am still strugging to understand why sometimes the prompts are appearing before the prompt page, however for now I am telling the user to just accept the entries there and then they can correct them on the prompt page to run this report.

cognostechie

Hi

I might know what this is as I had written SQLs with prompt macros embedded in them for a report to show HR data.

When a prompt macro ( #prompt('pDate','date')# ) or even a regular prompt like ?pdate? is used in a SQL or in a regular filter and there is no prompt defined in the report (like the prompts you have in the prompt page) then Cognos has no choice except to generate a prompt and pop that up outside of the prompt page. All you need to do is to find the name of that prompt and create a prompt on the Prompt page to use that name. I am currently doing this for a client. Lot of my Lists and Crosstabs have prompts embedded so that the SQL will accept a value before joining to another SQL. The report never creates those unwanted prompts before the Prompt page. The 1st screen user sees is the Prompt page and nothing before that because I created those Prompts on the prompt page and made sure to use the same parameter name. In the properties of the Prompt, change the name to be the same as defined in your query.

Quigwam2058

Thank you cognostechie - I understand your explanation and was able to fix in my report!