将创建交叉表查询的表单 [英] Form that will create a cross tab query

查看:64
本文介绍了将创建交叉表查询的表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我想帮助解决以下问题。我想创建一个将有两个下拉列表(组合框或列表框)的表单,其中一个将是一行而另一个将是一列。列值将是基于每个行值的计数。我已经从下面的Northwind数据中复制了一个例子。基本上,我希望有人能够选择一个变量(字段)然后另一个变量进行比较并点击SUBMIT并根据交叉表查询生成报表。非常感谢任何帮助!

Hi all,

I would like help on the following problem. I would like to create a form that will have two drop downs (combo or list box), one of which will be a row and the other will be a column. The column values will be a count based on each row value. I''ve reproduced an example from the Northwind data below. Basically, I would like someone to be able to select one variable (field) and then another to compare and hit SUBMIT and generate a report based on a cross tab query. Any assistance is much appreciated!

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

此示例中的SQL是您的两个值想从ComboBox控件中选择吗?


我担心你没有很好地解释这个问题,所以很难提供帮助。
Where in this example SQL are the two values that you want to select from the ComboBox controls?

I''m afraid you haven''t explained the problem very well so it''s hard to help.


我读了我写的内容,也许我并没有说得太清楚。我想创建一个表单,我可以提供一个字段列表。用户将选择一个字段,比如X,这是信息的排序方式,然后可以选择另一个下拉列表中的另一个字段,比如Y,它将是交叉表查询的列标题。 Y也将是每个列和行交叉点的计算计数。因此:
I read what I wrote and perhaps I didn''t make it too clear. I would like to create a form where I can provide a list of fields. The user will select one field, say X which is how the information is sorted and then can select another field in another drop down, say Y that would be the column headings for a cross tab query. That Y will also be the calculated count for each column and row intersection. Hence:
展开 | 选择 | Wrap | 行号


X是字段列表中的X1 ... Xi之一

Y是第二个字段列表中的Y1 ... Yi之一


根据用户选择的内容,特定的X和Y将填充到SQL中,创建一个交叉表查询。我可能会注意到,示例中的SQL对我来说并不重要,因为我试图找出如何根据表单的输入将字段名称插入X和Y.


希望我有道理: - )
X is one of X1...Xi in a list of fields
Y is one of Y1...Yi in a second list of fields

Depending on what the user chooses, the particular X and Y will then be filled into the SQL, creating a crosstab query. I might note that the SQL in the example is not as important to me as trying to figure out how to insert a field name into X and Y based on input from a form.

Hope I''m making sense :-)


这篇关于将创建交叉表查询的表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆