英文:
Crystal Reports 11 - Correlate dynamic prompt and data
问题
我已将动态提示添加到CRXII报告中,运行正常。
然后,我想添加与他们选择的提示选项匹配的记录中的相关字段,到目前为止,我对如何进行操作感到困惑。
为了澄清,我有以下表格:
CREATE TABLE `c_crx_units` (
`crx_param` varchar(45) NOT NULL,
`crx_unit` varchar(1024) DEFAULT NULL,
`crx_address` varchar(1024) DEFAULT NULL,
PRIMARY KEY (`crx_param`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
而我的动态提示将允许他们选择一个crx_param
值。
现在,在报告中,我想添加字段@crx_address
,使用与所选的crx_param
值匹配的行中的值。
有人可以指导我正确的方向吗?
(为了澄清一件事 - 来自c_crx_units
的数据与我的主数据源无关)
英文:
I've added a dynamic prompt to a CRXII report, which works fine.
However, I then want to add correlated fields from the record matching the prompt-option they chose, and so far, I'm stumped as to how to go about this.
To clarify, I have the following table:
<code>CREATE TABLE c_crx_units
(
crx_param
varchar(45) NOT NULL,
crx_unit
varchar(1024) DEFAULT NULL,
crx_address
varchar(1024) DEFAULT NULL,
PRIMARY KEY (crx_param
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;</code>
And my dynamic prompt will allow them to select a crx_param value.
Now, in the report, I want to add the field, @crx_address, using the value from the row that matches the chosen crx_param value.
Can anyone point me in the right direction?
(and to clarify one thing - the data from c_crx_units is independent of my main data-source)
答案1
得分: 0
一种选项是将 c_crx_units 表包含在报告中(无需实际将其与主要报告表连接),并使用参数将其筛选为所选值。然后,您可以直接访问地址列。
换句话说,将参数应用于主要报告数据以及参数表。
英文:
One option is to include the c_crx_units table in the report (no need to actually join it to the main report tables) and use the parameter to filter it to the selected value. You then have direct access to the address column.
In other words, apply the parameter to both the main report data as well as to the parameter table.
答案2
得分: 0
Crystal Runtime应用中使用的类型和版本是什么?
尝试以下方法来解决应用中的问题:向c_crx_units表添加一个别名(在报表中再添加一次),然后在报表中使用别名表(将筛选器应用于别名)。这样在应用中是否有效?
英文:
What is the type and version of the Crystal Runtime used in the application?
Here is something worth trying to get around the problem in the application: add an alias of the c_crx_units table (add it a second time to the report) and use the alias table in the report (apply the filter to the alias. Does it work in the application then?
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论