0

I am using Cognos 11.0.8 version . I am using a multi select check box which pulls data from database. I have another multi select checkbox, which gets populated based on the values selected in the first multi select checkbox. On selecting the items in the first multi select box ( on the focus out ) , I want to populate the second multi select check box based on the values selected. How to achieve this using JavaScript ?

Another doubt: In the SQL database, I have a column of type nvarchar . Since this column type is not in Cognos, what should be used as the equivalent in Cognos ?

Venkat
  • 89
  • 12
  • Is there a reason you do not want to set the cascade property? – VAI Jason Dec 04 '19 at 14:58
  • Regarding the data type: Your question is unclear. What are you trying to do? What is a "column type"? Do you mean data type? Cognos absolutely can use nvarchar. – dougp Dec 04 '19 at 16:26
  • @VAIJason, I don't see how that relates to the question. – dougp Dec 04 '19 at 16:26
  • @dougp user is describing cascade functionality see " On selecting the items in the first multi select box ( on the focus out ) , I want to populate the second multi select check box based on the values selected." and may want to use existing options vs javascript (which can be more complicated than needed and extra work for ad hoc analysis, etc) – VAI Jason Dec 04 '19 at 18:47
  • @VAIJason, it looks like the comment I was responding to was deleted. It was about the nvarchar, which is now in an answer you provided. – dougp Dec 04 '19 at 22:49
  • @Venkat can you give an update? – VAI Jason Dec 12 '19 at 15:00

3 Answers3

0

For NVARCHAR, switch the data source connection to use the 32-bit native SQL Server client

https://www.ibm.com/support/pages/framework-manager-imports-datetime-and-datetime2-columns-nvarchar

VAI Jason
  • 534
  • 4
  • 14
  • The original post doesn't mention using a datetime2 column or OLE-DB. In fact, there was no problem presented regarding nvarchar. It looks more like a comment. – dougp Dec 04 '19 at 22:48
0

Using Multi-select = Yes and Auto-submit = yes was possible in 10.2.1 (and maybe 11.0.4). At some point IBM decided that combination would cause performance problems in reports and make report users unhappy. (My response was, "Isn't that the report developers call?")

It is possible to use Multi-select = Yes and Auto-submit = Yes together, but not through the UI. You'll need to update the report specification (XML) manually.

Cognos: Report -> Copy report to clipboard
Text editor: Find the value prompt you want to modify, and add autoSubmit="true" at the end of the opening tag.
Text editor: Select all, copy.
Cognos: Report -> Open report from clipboard.

Updates to the downstream value prompt will occur on onclick, not onblur.
If you touch the Multi-line or Auto-submit properties again in the GUI, you may lose the setting.

dougp
  • 2,810
  • 1
  • 8
  • 31
0

You probably do not need to update XML manually

Adding an optional filter and adjusting some properties may be enough

Let's say we have the main query and a relationship in the data (like Sales reps and they belong to a Region)

Two data items and corresponding queries:

  • Query 1 for your prompt for [Region]
  • Query 2 for your prompt for [Sales Rep]
  • Query 3 is your main query for your report (list, crosstab, etc)

First multi select check box for [Region] and has a parm called ParmRegion (this is based on Query 1)

For the second multi-select check box (let's say that is Sales Reps) Add OPTIONAL filter on Query2 for the multi-select prompt (not the main query for the report) like this

[Region] IN(?ParmRegion?)

add a reprompt button if you need

This way when you select content, the query that builds the second prompt is adjusted to only show Sales Reps that belong to that region

VAI Jason
  • 534
  • 4
  • 14