以交叉表方式输入和显示数据 [英] Data entry and display in a crosstab way
问题描述
我刚刚开始为我的应用程序评估LightSwitch,我想知道是否可以创建一个表单
来插入更新显示记录为列的记录。
这是服装时尚行业应用的典型行为。
让我举个例子。
I just started evaluating LightSwitch for my application and I was wondering if it is possible to create a form
to insert-update-display records presented as columns.
This is the typical behavior of applications for the apparel-fashion industry.
Let me give an example.
我的表格如下所示:
My table looks like this:
StyleCode
SizePosition
SizeDescription
Quantity
a123
1
S
4
a123
2
M
3
a123
3
L
5
a124
1
S
3
a124
2
M
3
And I would like to have the following presentation:
S
M
L
a123
4
3
5
a124
3
3
请记住我希望这个
不仅用于显示,还用于插入和更新。
Please keep in mind that I want this not only for displaying, but also for insert and update.
Thanks
推荐答案
你是否在LightSwitch中创建了表?
Did you create the table within LightSwitch?
如果是这样,你可以做的是添加一个包含样式代码的StyleCode表,然后使用 a从StyleCode表到你上面的表的关系(一对多)。然后在StyleCode表上,你可以为要转置的每一列
添加一个计算属性(一个用于Small,一个用于中等,一个用于大)。然后当您在屏幕中使用StyleCode表时,它将具有每个大小的转置列。
If so, what you can do is add a StyleCode table that contains the style codes and then use a relationship (One-to-Many) from the StyleCode table to the table you have above. Then on the StyleCode table, you can add a computed property for each column that you want to transpose (one for Small, one for Medium, and one for Large). Then when you use the StyleCode table in a screen, it will have the transposed columns for each size.
这篇关于以交叉表方式输入和显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!