oracle - Oracle Reports (6i): Get difference of two items from two different queries (Multi Query Report)
问题描述
I have an Oracle 6i report with Two Complex Queries (Q1 and Q2) connected by Data Link. The report was developed by some other developer who is not available now. Multiple columns are being displayed in report.
Q1 has a column Total_Issuance and Q2 has a column Total_Consumption. I have to display their difference on report. I am using a formula column to get the difference and then binding a display field to this formula column to show on report.
But since the formula column is outside both the queries, I am getting following errors.
REP-1517: Coloumn 'CF_1' references column 'Total_Issuance', which has incompatible frequency.
REP-1517: Coloumn 'CF_1' references column 'Total_Consumption', which has incompatible frequency.
解决方案
为查询创建一个新的计算字段,即详细查询(我假设它是 Q2)。在这个计算字段中,您可以简单地使用:
return :Total_Issuance - :Total_Consumption;
来计算差异。
推荐阅读
- ef-core-2.1 - 如何使用 EF Core 定位 sql server 2008
- essbase - 有人可以解释以下 Essbase 代码:FIX,@relative
- java - 在 Java 中声明限制在指定范围内的变量
- c++ - 将变量传递给 PUGIXML xml_tree_walker
- python - 为什么不能在同一行定义类和函数?
- javascript - 我有日历功能,但有一个日期跳到明年,应该到下个月
- kotlin - 关闭后忽略协程通道的提议
- vbscript - 使用 VBScript 来 VLOOKUP 值,或评估公式?
- angular - 由于 Ngrx 版本,Angular 项目面临错误
- scala - Flink 自定义分区功能