现在的位置: 首页 > 综合 > 正文

Cognso 的技巧

2012年02月26日 ⁄ 综合 ⁄ 共 16587字 ⁄ 字号 评论关闭
文章目录

1. 关于图表的设置

 

1 如何将value 显示在图表中?

 

1.Click on 'Series' icon

2.Go to Properties Chart Labels.

    Values - Show

    Value Location - Outside Top

2. 关于将Date提示固定为昨天的做法

 

Date Prompt Default to Yesterday

Hello Wanda,

If you look at the Select UI property of a Date Prompt, there are two
options: Edit Box and Calendar.  If you are using and Edit Box Date
Prompt, the solution I proposed will work.  

Unfortunately I can not figure out how to get a Calendar Date Prompt to
select a day.  So if your have to use a Calendar Date Prompt, I cannot
help.

Steve

-----Original Message-----
From: wfnorwood via cognos-reportnet-l
[mailto:<email@removed>]

I am using the "Date Prompt" from the toolbox.  Will this still work?
---------------Original Message---------------
>Hello Wanda,
>
>The following will work if you are using an Edit Box date prompt. Add a
>HTML Item to your prompt page before the date prompts.  Enter the
>following code in the HTML Item:
>
><script type="text/javascript">
>function init()
>{
>dt = new Date();
>var MonthName=["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug",
>"Sep", "Oct", "Nov", "Dec"];
>var FormatedDate = MonthName[dt.getMonth()] + " " + (dt.getDate()-1)
+
>"
>" + dt.getFullYear();
>document.forms["formWarpRequest"].elements["txtDateFDate"].value =
>FormatedDate;
>}
></script>
><body onLoad=init()>
>
>Good Luck,
>Steve
>
>-----Original Message-----
>From: wfnorwood via cognos-reportnet-l
>[mailto: email@removed ]
>Sent: Friday, September 29, 2006 8:09 AM
>To: Shefcheck, Steven
>Subject: [cognos-reportnet-l] Date Prompt Default to Yesterday
>
>
>
>Hi There,
>
>Is there a way to set a date prompt to default to yesterday instead of
>today?  Thanks.
>
>Wanda

 

3. How to create a report shows Top 10 Customers?

I am creating a report that shows Top 10 Customers by measuring their No. of Orders. Assume if there are 3 customers with same Order count in 4th position then the report should show 12 rows of output. Any suggestions..

Thanks.

Then filter on the running-count field <=10.

---------------Original Message---------------
>Hi,
>
>Use running-count() on your rank() data item. That will count 12 rows!
>
>Regards,
>Praveenkumar Talla
>
>
>
>

 

4. how to schedule report with date range filter

Add a text box prompt to the prompt page for previous days with a
default of 0.  

Update the filter with your date range to something like:

[DateFromDatabase]
between
case when ?PreviousDays? = 0
then cast_date(?StartDate?)
else current_date
end
and
case when ?PreviousDays? = 0
then cast_date(?EndDate?)
else _add_days(current_date, -?PreviousDays?)
End

When previous days is 0 it will use the date range.  If there is a value
in previous days other than zero (lets say 7) it will give you 7 days
ago to today.

Steve

-----Original Message-----
From: edeali via cognos-reportnet-l
[mailto:<email@removed>]
Sent: Friday, February 02, 2007 12:46 PM

Hi Steve,

Thanks for your reply. Can you be more specific, how to add option to
let user to choose between date range and another filter?

edeali

---------------Original Message---------------
>Hello edeali,
>
>Once you schedule a report with a date range prompt, every time you run
>the report the dates will stay the same.  One work around would be to
>add an option to let the user choose between selecting a date range and
>using a previous days filter.  Then you could schedule the report using
>the previous days filter.  
>
>HTH,
>Steve
>
>-----Original Message-----
>From: edeali via cognos-reportnet-l
>[mailto: email@removed ]
>Sent: Friday, February 02, 2007 11:30 AM
>
>Hi all,
>
>I have a report with date range prompt to let user pick date range. Now
>I want to be able to schedule the report. How do I do that?
>
>Thanks
>
>edeali
>
>
>
>
>

使用向导:
选择一个作为条件的报表列,后点Build Prompt按钮

 

5. 安装时,contentstore需要注意的问题

我那个问题就是用的ORACLE的数据库。呵呵。你首先检查一下C8的防火墙关了没有。要关掉。还有就是ORACLEclasses12.jar要考到C8相应的目录。看文档就可以了。其它的就没什么了。

 

检查两处:
1
cognos configuration中的 Gateway URI配置的是否正确 有时候不能用Localhost ,需要直接使用IP地址
2
,安装路径中c8文件夹下的cognos.ini文件中是否有你的连接串

 

6. Cognos的柱形统计图,每个柱形标题45度显示在那里设置?

点选要修改的Lebel
Properties

General =>Label Control
点选Automatic
会出现相关选项

 

 

FM必须与BI Server联机才可以正常运作,你可以在configuration里面看到相关的设定。所以自然您再同一台计算机上安装了BI ServerFM就依照内定的设定与本机的BI Server做沟通。所以您的问题才消失。

 

Greyed out prompt

Folks!
I've a requirement where I've to put two prompts. If users select values from the first prompt, 2nd prompt will be greyed out and if the users select values from the 2nd prompt, 1st prompt will be greyed out.

Does anyone know how to make that work?

Thanks!!

 

This needs to use a javascript for doing this..

u can try this script:

<script>
function detailsVisibility(option1)
{
// get all DIVs
divs = document.getElementsByTagName('DIV');
// go to all DIVs
for (i=0; i<divs.length;i++)
{
// the name of the specific DIV
if (divs[i].className != option1)
{
// set the visibility
divs[i].style.display = 'block';
}
else
{
// set the visibility
divs[i].style.display = 'none';
}

}
}
</script>

7. 关于cognos 在没有值的情况下,显示空座标图的方法。

 

 

8. 如何让cognos task任务的触发条件只触发一次

9.如何在一列中计算某行占该列所占的百分比

percentage to total

percentage((field name) for (grouped field name))

 

10. cognos 临时文件的位置

 

Cognos 安装目录/C8/temp

Cognos 安装目录/C8/data

如果cognos运行有问题,在

Cognos安装目录/C8/bin 目录下面有出现大量的javacore dump文件

 

11. 关于ReportNet/Framework Manager 连接Oracle数据库的问题,

日志提示如下:

RSV-DR-0002 Unable to execute this request.
QE-DEF-0285 Logon failure.
QE-DEF-0285 Logon failure.
QE-DEF-0325 The cause of the logon failure is:
QE-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in: dw
UDA-SQL-0432 Unable to locate the gateway "libcogudaor".

 reportnet中定义的dw数据源连接,测试不成功。出错提示:

  QE-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in: dw

 UDA-SQL-0432 Unable to locate the gateway "libcogudaor".

            

但是换了台机子,重新配置reportnet服务器,就可以连接。因此确定是服务器端配置出了问题。

查找资料,果然发现:

ReportNet连接ORACLE和informix 等数据,要把客户端信息加入到系统环境变量PATH中。

   在AIX环境下,先用env PATH查看aix(23.1)系统PATH的取值为:/usr/vacpp/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/dt/bin:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/local/bin:.
执行 . ./ORACLE.env后,则PATH变量取值变为:/ora9206/9.2.0/bin:/usr/ccs/bin:/usr/sbin:/usr/vacpp/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/dt/bin:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/local/bin:.
重启repornet服务。dw连接恢复正常。

记录该信息,已供大家以后碰到类似问题参考 

 

Solution:

In order to import metadata into Framework Manager from an Oracle data source, you need to have the Oracle client installed on the local computer.  Without the client you may still be able to create the data source and test the data source connection, but you will need the Oracle client to import the metadata.

Once the Oracle client has been installed, add the necessary entry to the tnsnames.ora file on the local computer.

12 关于执行查询的时候,动态选表的问题。

Dynamic Table Name in Framework Manager

 

I know this approach would work

select ...
from table1 where #prompt('table_desired','string')# = 'table1'
union
select ...
from table2 where #prompt('table_desired','string')# = 'table2'
union
select ...
from table3 where #prompt('table_desired','string')# = 'table3'

Then have a prompt in report studio called ?table_desired?, which
user selects (from drop down, etc.)

 

 

 

13 在report studio 里如何能取得"上月"这个变量

比如 今天是2007-10-8 我想取得一个字符串的值为 20079

不知道表达式如何写,找了半天没找到相关函数

 

to_char(add_months(sysdate,-1),'yyyymm')就可以了。

 

CAST(EXTRACE(YEAR,?FromTimeParameter?), VARCHAR(4))

 

取年

 

14 关于ORACLE 时间函数to_date

 

背景:制作报表时,在函数列表里选用了Oracleto_date函数,之后预览也成功了!等过了几天,再次访问该报表,报错为performing operation 'sqlPrepareWithOption' status='-126',查看log,报错为找不到to_date这个外部函数。
请问:
1.
如何解决这个问题?
2.
官网上说在一个cognos.ini文件中有指定外部函数的存放路径,只需将外部函数的sql文件添加进去,或者直接放在bin目录下,外部函数的sql文件在哪里可以找到呢?

 

这个~~!就是尽量不用这个函数,用其他函数,也是很奇怪,它认to_char,却不认to_date!

 

15 报表图形Data Series 显示不全

 

解决方法:

 

 

 

16 CNC-ASV-0001 The Following Agent Service General Error Occurred: java.lang.StackOverflowError

When running a web service task, you may encounter errors when the WSDL that describes the web service is very large.

Step to modify the bootstrap_win32.xml file

* To prevent this error, modify the file bootstrap_win32.xml in the bin folder to add the ThreadStackSize parameter:

<process name="catalina"> ...<param condName="${java_vendor}" condValue="Sun">-XX:MaxPermSize=128m</param><param condName="${java_vendor}" condValue="Sun">-XX:ThreadStackSize=512</param>

 

17 CCL-RCI-0001 Unhandled WASP (third-party) exceptions with an Oracle query DB

 

Description:

During a period of high usage on the server when there are numerous batch or interactive requests running, the following error may appear in the crnserver log file:

Error Message:

QE-DEF-0313 An error occurred while calling the content store for the model: '/content/package[@name='Test']/model[@name='model']' information.  CCL-RCI-0001 Unhandled WASP (third-party) exceptions were converted into this generic RCIException code.  TCP problem - got closed connection.


Solution:

If the reports are running against an Oracle 9.2.0.6+ database and Oracle ONAMES is used, the problem may be rectified by adding the following parameter in the sqlnet.ora file:

NAMES.NO_PERSISTENT_RESOURCES=TRUE

Setting this parameter to TRUE will disable the persistent connections to ONAMES.

If Oracle 10g is used, there is a directory attribute, orclLDAPconnTimeOut, which can be set in the directory to terminate idle connections. The value of the attribute is minutes. The attribute can be set in Oracle Directory Manager from the Query Optimisation tab. The attribute is "LDAP Connection Timeout". 

Related Documents:

For further information, please refer to the following Oracle note: 277138.1

Keywords:

ONAMES WASP TCP Oracle

18 [C8]CAM-AAA-0027 COGNOS不能登陆

 

1. Restart of service

2. Schedule setting deletion, reset and execution.

Because => schedule setting before the upgrading remains, after the upgrading this certification not to pass, the failure.

Retry of the setting including also outside everyday set-up time, the circumstances which become a state which is executed, the other user login it becomes impossible.

 

解决方法:

报表服务器不能登录的问题,不清楚产生的具体原因是什么,但肯定是由于服务器内存和文件配置不一致了,导致无法登录;删除临时文件(temp目录下面所有文件)后,该问题解决。

 

 

19 关于汇总不对的情况

 在分组报表中(多次使用group),发现有的分组并没有进行汇总,汇总栏中填写的值就是该分组中最后一个成员的值。

在这种情形,修改该汇总对象的表达式,使用成员汇总函数,改为:total([Database view].[EMSPM_MOBITRAFA_H].[ATTTRANSCALLS] within set [Database view].[EMSPM_MOBITRAFA_H].[ATTTRANSCALLS])

关于告警位置对应的问题,现在不使用custom2这个字段,而是使用告警位置的position1

~postion10,将这些字段拼成topoId,然后进行位置查询

 

20. 关于时间函数的使用范围

reportstudio中,oracle trunc 函数是不能使用的,

 

([SMG_NOMC].[CAF_AMOALARM].[RESTORETIME] IS NULL) OR (([SMG_NOMC].[CAF_AMOALARM].[RESTORETIME] >= trunc({sysdate}-1,'dd')) and ([SMG_NOMC].[CAF_AMOALARM].[RESTORETIME] < trunc({sysdate},'dd') ))

 

但是可以使用_add_days 函数

CAST( current_date,TIMESTAMP)-CAST(_add_days(current_date,-1),TIMESTAMP)

 

21 Performing most tasks in Cognos 8 throws errors.

 

Title:

Performing most tasks throws error: QE-DEF-0313 and CCL-RCI-0001

Document#:

1028919.3

Updated:

Nov 22, 2007

 

Description

Performing most tasks in Cognos 8 throws errors.

Error Message

QE-DEF-0313 An error occurred while calling the content store for model.

CCL-RCI-0001 Unhandled third-party Web Applications and Services Platform (WASP) exceptions were converted into this generic RCIException code. Cannot find deserializer from 'dateTime':'http://www.w3.org/2001/XMLSchema'.

Root Cause

Multiple dispatchers had been configured. One package had been configured to use Routing Sets to send requests from a particular package to a specific dispatcher. For unrelated reasons to this issue, the dispatcher which was handling the requests for this particular package was reinstalled but the Report Service Connections had not been refreshed after the reinstall took place.

Solution

Refreshing the Report Service Connections resolves the errors.

Steps

1) With Server administrative privileges, launch Cognos Connection.
2) Select Tools --> Server Administration
3) Select the Configure tab
4) Click the Name of the Dispatcher (You should see the list of services running under that dispatcher)
5) Click the "Refresh Report Service Connections" icon (Located in the upper right as of Cognos 8 MR2). 
6) Retest the task(s) which were originally throwing the error.

If these steps still do not resolve the errors:

7) Try restarting the dispatcher and repeating steps 1 to 6.

Keywords

package binding

 

22 导入后的注意事项:

1. 导入成功之后,手工执行一下dailytask,看是否成功?

2. 如果不成功,请执行下面的步骤

 

Steps

1) 以管理员登录COGNOS

2) Select Tools --> Server Administration

3) Select the Configure tab

4) Click the Name of the Dispatcher (You should see the list of services running under that dispatcher)

5) Click the "Refresh Report Service Connections" icon (Located in the upper right as of Cognos 8 MR2).

6) Retest the task(s) which were originally throwing the error.

 

If these steps still do not resolve the errors:

 

7) Try restarting the dispatcher and repeating steps 1 to 6.

 

23 Framework Manager Bisvr 所使用的数据库服务名必须保持一致

Bisvr 安装在AIX环境中,而Framework Manager 安装在Windows上的时候,需要两次制定oracle数据库连接字符串,这两个必须完全一致,否则就会出现下面的错误:

 

QE-DEF-0285 Logon Failure
QE-DEF-0323 The DSN(ODBC)/ServiceName is invalid. Either the DSN is missing or the host is inaccessible.
QE-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:

24 ORA-00904: "COGUDA#CAST_TIMESTAMP" 问题

时间计算中涉及到Timestamp类型和系统时间的,最好先使用to_date函数,将系统日期格式化,然后再进行计算

HappenDate 变量定义为:

to_date([HAPPENTIME],'DD-MON-RR')

curSubHappentime 变量(当前时间减去告警发生时间:

to_date( current_date,'DD-MON-RR') -[HAPPENTIME]

MeasureTime Interval2 时间常量(一周时间的计算):

 current_date - _add_days(current_date,-7)

AMOLinkLost Interval Amo断链时间统计),定义为

 

IF ( [RESTORETIME] is not null) THEN (

 IF ( [HappenDate] < _add_days(current_date,-7)) THEN

    ( [RESTORETIME] - _add_days(current_date,-7))

 ELSE

    ( [RESTORETIME]-[HAPPENTIME])

)

ELSE(

 IF ( [HappenDate] < _add_days(current_date,-7)) THEN

    ( [MeasureTime Interval2])

 ELSE

    ( [curSubHappentime])

)

 

25关于cognos定时任务中报表引用的问题

Cognos任务中对报表的引用,不单单是对包和报表名字的引用,而且还包含版本等特殊信息,当用另一张报表saveas 的时候,必须重新定义任务中的报表。

 

26关于cognos报表中字段显示格式的问题

可以同时选中多个字段,然后指定dateformat 里面的内容,这样就可以一次修改多个字段(包括各级汇总)的显示格式。

 

27关于调整cognosasync timeout parameter

Description:

Rendering reports in multiple frames using wireless network connections causes an error to occur.  Running reports from distant locations may also cause this error.

Error Message -

ReportNet

RSV-SRV-0021 The server cannot find the primary request with ID xxxx

Cognos 8

RSV-BBP-0022 The absolute affinity request 'asynchWait_Request' failed, the requested session does not exist.

Solution:

Adjust the async_wait_timeout_ms setting in the reportservice.xml file (webapps/p2pd/WEB-INF/services).  The default setting is 30000 (30 secs). 

Steps -

View the Internet information Services(IIS) logs to determine the time interval between an initial report request and a secondary request. The secondary request is generated by the wait page Javascript so it will show up as a POST request in the IIS logs. The time between the initial request and the secondary request will give you an idea of how much to adjust this parameter.

A more detailed analysis can be performed based on information in the dispatcher logs.  To do this:

1. On the Report Server machine, edit the PogoLogkitConfig.xml in webapps/p2pd/WEB-INF:

  <!-- report error or worse for production, comment this out for more extensive diagnostics -->
  <category name="com.cognos" priority="ERROR" recursive="true"/>

  <!-- log information for analyzing async timeouts -->
  <category name="com.cognos.pogo.reportservice" priority="DEBUG" recursive="true"/>
  <category name="com.cognos.pogo.reportservice.ProcessManager" priority="FATAL" recursive="true"/>
  <category name="com.cognos.pogo.transport.FormRequestProcessor" priority="DEBUG" recursive="true"/>

2. Restart Cognos ReportNet / Cognos 8.

3. Run until the error occurs.

The pogo_xxx.log file will contain detailed information when requests were started, checked and expired. 

When a request expires:

pogo.rsvExpirationTimerThread-2: Request ReportServerRequest s2sC4vlys8hw29jq8lGvqq49jyddyqjsGddh8d82 (no affinity) has expired, will send cancel request to report server

Later on in the logs you'll see:

Thread-54: Looking up request id (s2sC4vlys8hw29jq8lGvqq49jyddyqjsGddh8d82) in the in-progress map

This is the secondary request coming in from the browser.  Compare the times of the expiration and the lookup and you should be able to adjust the timeout appropriately.

28关于cognos 报表中涉及到to_date to_char函数运算

一定要先核对数据库服务端和客户端的 NLS_DATE_FORMAT 参数设置

使用下列SQL确定:

 

select   *   from   sys.props$ where name = 'NLS_DATE_FORMAT';

select * FROM v$parameter where name = 'NLS_DATE_FORMAT';

 

to_date([HAPPENTIME],'YYYY-MM-DD HH24:MI:SS')

 

29关于cognos 自动报表执行失败,报错CNC-SEC-3403

 

Title:

Reports are not Running at Scheduled Time

Document#:

1021823.4

Updated:

Dec 19, 2007

 

Description:

 

Scheduled reports are not executing at the specified time.

 

Error Message:

 

The Run History detail contains the following error message:

 

CNC-SEC-3403 User account information invalid or missing in Content Manager.

 

CAM-AAA-0146 The namespace 'MHPActiveDirectory' is not available.

 

CAM-0055 User input is required.

 

CAM-AAA-0036 Unable to authenticate because the credentials are invalid.

 

Root Cause:

 

When a scheduled report executes, it uses the credentials of the user who owns the report. When the credentials of the user are no longer valid, a scheduled report will fail as it will attempt to use the out of date credentials.

 

Solution:

 

To correct the cause of the error, the user who owns the report must renew their credentials.

 

Steps:

 

1. Log in to Cognos Connection as the user.

 

2. Go to My Preferences.

 

3. Click the Renew My Credentials link.

 

There will be a pop up window indicating Your crendential has been renewed with your Log on user ID and password.

 

Note:

 

For Cognos ReportNet, the Renew My Credentials link is under the General tab.

 

For Cognos 8, the Renew My Credentials link is under the Personal tab.

 

4. Click OK, and then OK again.

 

Related Documents:

 

KB1015291

 

Keywords:

 

schedule report renew credentials

 

30关于在windows机器上安装Framework Manager, 指向AIX BI server的设置说明

需要设置两个变量:

Gateway URI:                                   http://10.75.79.77:9300/p2pd/servlet/dispatch

Dispatcher URI for external applications:     http://10.75.79.77:9300/p2pd/servlet/dispatch

 

30关于如何补采周报/日报

执行任务的一开始,可以设置任务传入时间,用这个时间,就可以补采任意一天/一周的报表:

 

31 关于view in excel format 不成功的处理

需要将cognos server 加入到IE的受信任的站点列表中

The steps are as follows:

 

1. Open IE, and select Tools->Internet Options;

2. In the pop-up window, select the 2nd tab(Security Tab);

3. Select the Icon of Trusted Website:

  

4. click the Sites(S) button and add the "http://10.17.7.141" in the list.

32 关于cognos 清理数据库

Run Database Cleanup Scripts

In some troubleshooting situations, you may be advised to start with new configuration data.

You can run an SQL script to delete all the tables in any of the following databases that Cognos 8 components use:

* content store for data that Cognos 8 nee

抱歉!评论已关闭.