Quote from CSSystems on November 18, 2023, 11:48 pmI have an application for recording and reporting volunteers. The database will have some active volunteers and not-active volunteers (when they loose interest).
The Report I need help with is reporting a category e.g. Food Serving and those volunteers who indicated they will help.
Food Serving (from Master table)
Name 1 (from volunteer names table) (sub-report)
Name 2
etcRight now the report shows active and not-active volunteer names.
Active field is a boolean field
I want to only show the volunteer names that are active but I am not sure where the Query should be placed to make this happen.
Is it possible?
I have an application for recording and reporting volunteers. The database will have some active volunteers and not-active volunteers (when they loose interest).
The Report I need help with is reporting a category e.g. Food Serving and those volunteers who indicated they will help.
Food Serving (from Master table)
Name 1 (from volunteer names table) (sub-report)
Name 2
etc
Right now the report shows active and not-active volunteer names.
Active field is a boolean field
I want to only show the volunteer names that are active but I am not sure where the Query should be placed to make this happen.
Is it possible?
Quote from rafamacor on November 19, 2023, 1:38 amHello, how I would do it is by creating a view of the table with dbpCreateView
and filtering the active users, and that is what you use in Report Designer.
Hello, how I would do it is by creating a view of the table with dbpCreateView
and filtering the active users, and that is what you use in Report Designer.
Quote from CSSystems on November 19, 2023, 2:05 amThere are two tables: One acting as Master (Category) and second Slave (Volunteer Names) where I want to limit the display to only active volunteers.
I show corner of Report and Report-development.
I haven't used dbpCreateView.
There are two tables: One acting as Master (Category) and second Slave (Volunteer Names) where I want to limit the display to only active volunteers.
I show corner of Report and Report-development.
I haven't used dbpCreateView.
Uploaded files:Quote from alangonzalez91 on November 21, 2023, 10:20 pmYou must make an SQL query with the condition inside the WHERE. Ex:
SELECT * FROM my_table WHERE my_table.active = 'TRUE'
and save this into a temporary new result table:
dbpexecsql "my_db" "SELECT * FROM my_table WHERE my_table.active = 'TRUE'" "temporary"
And when you modify the report, call the "temporary" table, and not the original one.
You must make an SQL query with the condition inside the WHERE. Ex:
SELECT * FROM my_table WHERE my_table.active = 'TRUE'
and save this into a temporary new result table:
dbpexecsql "my_db" "SELECT * FROM my_table WHERE my_table.active = 'TRUE'" "temporary"
And when you modify the report, call the "temporary" table, and not the original one.