I would like to use a tablix to display text values but I'm at a loss for how to do this
I have a query that produces data like this
PersonGroup | Person | Question | Answer
----------------------------------------
Manager | Bob | lunch | yes
Manager | Bob | break | yes
Supervisor | Tim | lunch | No
Supervisor | Tim | break | No
I would like to use a tablix to break the data out like this
Question | Managers | Supervisors
| Bob | Phil | Tim | Susan
Lunch | yes | yes | No | yes
Break | yes | no | No | no
So person group is a parent grouping to person. I've set up my tablix like this and when there is only 1 person per person group the text values(yes's and no's) are displayed. If there is one person per persongoup however the data is blank.
In order to answer your question I've recreated your scenario using this dataset:
You can achieve the desired tablix using a matrix report item with the following data arrangement.
It should preview the following tablix:
Let me know if this can help you.
Related
I am using behave to do my tests.
I want to play my scenario outlines with others parameters, a scenario outlines inside a scenario outlines in some words.
I have
Scenario outlines : Test John access
Given John enters
When He could access to <area>
Then the access is <result>
Examples:
| area | result |
| parking | authorized |
| security | refused |
I don't want to do copy this test for each employees.
I want to loop this like :
Scenario outlines : Test user autorization
Given all my employees :
| name |
| John |
| Jack |
| Lisa |
Scenario outlines : Test user access
Given <employee> enters
When He could access to <area>
Then the access is <result>
Examples:
| area | result |
| parking | authorized |
| security | refused |
How i could do it ?
Thanks in advance for your ideas.
The simplest answer would be to also add the employee to the Examples table. You wouldn't have to copy the test, but you would still have to multiply the number of rows if you want to test all areas for each employee:
Examples:
| employee | area | result |
| John | parking | authorized |
| John | security | refused |
| Jack | parking | authorized |
| Jack | security | refused |
| Lisa | parking | authorized |
| Lisa | security | refused |
This, however, also allows you to test different privilege levels per user.
I'm trying to design a database that allows for filtering according to if a specific resource fills certain categories. I've gotten to the point where I can input data that seems to be how it should be filled out but I'm not sure how I should pull it out again.
The main resource table looks like this:
Table1 - resources
| resourceID | AutoNum |
| title | short text |
| author | short text |
| publish date | date |
| type | short text |
Table2 - Department Categories
| ID | AutoNum |
| 1 | Yes/No |
| 2 | Yes/No |
| fID| Number |
Table3 - Categories
| ID | AutoNum |
| cat | Yes/No |
| dog | Yes/No |
| bird | Yes/No |
| fID | Number |
I have built a form where you can fill in items to the resource ID, and at the same time check off the Yes/No boxes in tables 2 & 3.
I'm trying to use the primary key ID from table 1 and copy it into the table 2 & 3 with referential integrity to cascade deletes, updates. Which I think is the right way to do this.
Currently, I've learnt that I can implement a search function for the columns in table 1, this seems to work fine. However I am stuck with applying the relevant columns in table 2 and 3 as filters.
apply search>
[X] - Cats
Should only return records from table 1 where in table 3 the relevant column has a tick in the Yes/No box.
I hope I have explained this properly, very new to Access and databases so if you need clarity, don't mind offering.
As the questions states, what is the best way when designing a database for types and categories?
Scenario:
I have x amount of database-tables e.g. users, feedback, facts and countries, and all these tables have a type-attribute. What I've found is that a lot of people tend to just create type-tables for each and one of these. E.g. user_types, feedback_types, fact_types and country_types.
I'm currently working on a project where I don't want to create a bunch of extra tables just to handle their individual types. Therefore I'm trying to come up with a database-design-solution that fits all tables.
My best thought of solution:
At first I thought I might just create a polymorphic table that has id, type_id, typable_id and typable_type and a types table. Then i figured that I have to specify in the types table which type-attribute belongs to which table. Then it hit me, I can create a self-referencing table where the parent name is the table name.
E.g.
---------------------------------------------
|id | parent_id | name | description |
---------------------------------------------
| 1 | null | feedback | something |
---------------------------------------------
| 2 | 1 | general | something |
---------------------------------------------
| 3 | 1 | bug | something |
---------------------------------------------
| 4 | 1 | improvement | something |
---------------------------------------------
| 5 | null | countries | something |
---------------------------------------------
| 4 | 5 | europe | something |
---------------------------------------------
| 4 | 5 | asia | something |
---------------------------------------------
| etc... |
---------------------------------------------
Is this a ok design? I'm thinking a lot about the parent names in this table, I haven't seen anyone else use table-names as parents.
If thinking about it in a front-end point of view, it's easier to get the correct types depending on which types you're looking for.
Please give me feedback on this. I'm struggling to find a good design.
I am developing a database system. It is for a canoe club. The part of the database I am stuck on is assigning a member of the canoe club to a canoe qualification course when/if they undertake one.
Here is a stripped down view of my tables:
members
-------------------------------------
| memberID | first_name | last_name |
-------------------------------------
| 1 | John | Jacobs |
| 2 | Ellie | Graham |
| 3 | Paul | Abbot |
-------------------------------------
course_info
---------------------------------------
| courseID | course_name | Instructor |
---------------------------------------
| 1 | BCU Level 1 | Ryan Adams |
| 2 | BCU Level 2 | Ryan Adams |
| 3 | BCU Level 3 | Ryan Adams |
| 4 | BCU Level 4 | Ryan Adams |
| 5 | BCU Level 5 | Ryan Adams |
---------------------------------------
course_progress
-------------------------------
| memberID | courseID | grade |
-------------------------------
| 1 | 2 | 4 |
| 1 | 4 | 5 |
| 2 | 1 | 3 |
| 3 | 5 | 2 |
-------------------------------
So as you can see,course_progress displays the courses a member has undertaken as well as their grade by using memberID and courseID.
Firstly is that the correct (or a correct) way of doing this? If so, here is my problem...
Using Access I want to create a form that allows me to assign a member to a course. So I have a combo box that lists all of the members and another that lists all of the courses. As well as a box for inputting the grade.
When I fill in this form it only adds the grade to the course_progress table. I feel as though this is the case because I am using fields from different tables in the combo box. The other solution that while works is less than ideal is to have memberID and courseID in the combo box. I believe that works as I am using fields from the table I am trying to add to. However it is not user friendly as ID's are meaningless to a user.
So I want to be able to select the member name and course name from the combo box and add them to the course_progress table as well as the grade.
Any guidance would be great.
Thanks.
Firstly, is your form bound to the course_progress table., and are the two combo boxes bound to the memberID and courseID fields of the progress table.
Secondly, what have you used as the query for each combo box. You should be querying the members table. Assuming you do, you will have 3 columns, the first being the member ID and that should be the "bound column" in the combo box properties. in the format section you will need to give column widths, and I would give the memberID column a width of 0 so it doesn't show. But you should say you want to display 3 columns (so you get firstname and last name in the combo box.
Do the same for the course combo box.
I'm trying to index a database table using a <cfindex>. I also want to categorize the index based on the values of a column of the same table. No documentation I have come across clearly mention what the "category" attribute takes. Is it a column name or just any desire value and if the later then how do the index determine which record belongs to what category?
Thanks a lot in Advance.
| ID | CATEGORY | NAME | DETAILS | DATE |
| 1 | people | John | John details | 01/23/1980 |
| 2 | animal | Dog | dogs details | 02/22/1990 |
| 3 | people | Ben | Ben's details | 10/10/2006 |
| 4 | animal | panda | panda's details | 07/17/2009 |
The docs didn't make it clear, but if you are indexing a database and there is a column that you want to use for the category, just pass the name of the db column to the category attribute.