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

Recent posts

#31
Reporting / Re: Month in bar chart
Last post by dougp - 14 May 2025 12:04:03 PM
QuoteMy date field is in the format 2021-04-08T01:56:28.

Do you mean your varchar column contains values that look like dates?  Or are you working with a datetime data type (which doesn't have a format)?  If it's a datetime, can't you just use the numeric format options for the axis labels?
#32
Reporting / Re: Month in bar chart
Last post by bus_pass_man - 14 May 2025 07:58:40 AM
extract ( datepart , datetime_expression ) or _month ( date_expression ) will get you the month number value, which you could then use in a case statement to get the strings you want. 

The question I have is: Why hasn't your modeler done that for you? For that matter, it would seem to me that these sorts of things (month and day names and abbreviated month names ) should be created during ETL, before the modeler has to.
#33
Reporting / Month in bar chart
Last post by yannunderw - 14 May 2025 03:53:36 AM
Hello,
I'm using Cognos Analytic 12.0.3. In a bar chart, I want to display the month (in abbreviated letter format, like Jan., Feb., etc.) on the x-axis. My date field is in the format 2021-04-08T01:56:28. Do you have any suggestions, please?
Thank you.
#34
Reporting / Re: concat erroring in cognos ...
Last post by dougp - 06 May 2025 03:42:27 PM
So, same data available to both Cognos 10 and Cognos 11?  Are you sure?  If any of those 4 values is NULL, the output will be NULL -- in 10 or 11.
#35
Reporting / concat erroring in cognos 11
Last post by krishdw85 - 06 May 2025 11:33:08 AM
[ECode (rv)] || ' - ' || [ThirdNum (id)] || CHR(10) || [EquiCd Desc (blv)] || CHR(10) || [Seriber (au)]

We are getting blank for majority rows in C11 whereas it is working fine in cognos 10.
Pl guide how to fix the yhis concat error in c11.
#36
ChatGPT / Re: Cognos Analytics Integrate...
Last post by cognostechie - 05 May 2025 05:06:35 PM
Quote from: xbroRep on 04 May 2025 12:05:33 PMWhat are the best practices for using Integrated Version Control in Cognos Analytics, especially when collaborating with multiple developers on the same reports and dashboards?

I agree with Doug that multiple developers working on the same report is a bad idea and your question does not seem to be a real life question. Is this a question for a job interview?
#37
ChatGPT / Re: Cognos Analytics Integrate...
Last post by dougp - 05 May 2025 10:11:58 AM
Please tell me you mean multiple developers working on individual reports in the same folder.  Multiple developers working concurrently on the same report sounds like a horrible idea.

And what does this have to do with ChatGPT?
#38
ChatGPT / Cognos Analytics Integrated Ve...
Last post by xbroRep - 04 May 2025 12:05:33 PM
What are the best practices for using Integrated Version Control in Cognos Analytics, especially when collaborating with multiple developers on the same reports and dashboards?
#39
Reporting / Re: Crosstab issue in DMR mode...
Last post by Harl - 01 May 2025 06:03:33 PM
Thank you very much gor your replies. Now it is working fine. The issue as you both mentioned was that the relationship was not correctly created in FM.
I did a new join to the fact table with that dimension that was showing repeating values and now they are not being repeated but correctly assigned.
I am very happy now! 👍👍👍
Thank you!
#40
Reporting / Re: Crossjoin from prompt inpu...
Last post by dougp - 24 Apr 2025 04:10:19 PM
I don't think a macro can be created that can be reasonably flexible to handle anticipated user requirements.  As a fun exercise, I worked on exactly that.  Here's what I came up with.  Keep in mind... This falls squarely into the "Why in the world would you do that?" category.

  • Create a report.
  • Select a source.
  • Create a query with a custom SQL object.
  • Set the data source.
  • Modify the code from below (Custom SQL - hard coded) to include your column names and the correct number of values in the data, then put it in the custom SQL object.
  • Create a prompt page and add a textbox prompt named *customdata* with multi-select and multi-line both turned on.
  • Create something on a report page that uses *customdata*. Maybe include a filter like [querysubject] in (#promptmany('customdata', 'string')#)
  • Preview the report page.  This should ask you for values for *customdata*.  Add two values.  Value 1 is your tab-delimited list of column names.  Value 2 is your tab-delimited list of values (for one row of data).
  • Copy the code from below (Custom SQL - with parameter) and overwrite the custom SQL object's definition.
  • Now you can run the report.  Don't forget that copying from Excel includes a \r\n that you don't want, so backspace once after pasting.


limitations:
  • All rows of data being pasted into the textbox prompt, including the header row, must be shorter than 128 characters.
  • Don't include values with leading spaces.
  • Don't include values that contain commas.  Specifically comma+space (, ) because that's what Cognos uses to delimit lines in the parameter value when used in a SQL object.  This was a little confusing because a semicolon (;) is used to delimit lines when processing the parameter in a data item.
  • This script is specific to SQL Server.

It may be possible to mature this a bit more, but I'm thinking some of the limitations of the macro language may be insurmountable.

Note:  This is intended to copy data from Excel and paste into a textbox prompt.  Values are tab-delimited.  In the code below there is a tab in two places.  It may not come across well on this forum.

**Custom SQL - hard coded**

    select *
    from (
      values
        ('', '')
      , ('', '')
    ) q ([customcolumn1], [customcolumn2])

**Custom SQL - with parameter**

    select *
    from (
      values
        #substitute(
        '$',
        ''')',
        substitute(
          '^',
          '(''',
          join(
            '''), (''',
            split(
              ':::',
              join(
                ''',''',
                split(
                  ' ',
                  join(
                    ':::',
                    split(
                      ', ',
                      substr(
                        substr(
                          promptmany('customdata', 'token'),
                          index(
                            promptmany('customdata', 'token'),
                            ', '
                          )
                        ),
                        2
                      )
                    )
                  )
                )
              )
            )
          )
        )
    )#
    ) q (#join(
          ', ',
          substitute(
            '$',
            ']',
            substitute(
              '^',
              '[',
              split(
                ' ',
                substr(
                  promptmany('customdata', 'token'),
                  0,
                  index(
                    promptmany('customdata', 'token'),
                    ', '
                  )
                )
              )
            )
          )
    )#)