How to Dynamically Build Checkboxes based on a SQL Report
Using Oracle APEX v4.2.2, I would like to dynamically build a checkbox selection list based on data from an Oracle Classic Report.
For example:
Location Dept A. Dept. B Dept. C Total Employees
----------------- ----------- ----------- ------------ ---------------
Paris 5 10 3 18
Using the above report, I would like to dynamically build three checkboxes based on the columns Dept. A, Dept. B and Dept. C
So beneath my report I would expect to see checkboxes:
Dept. A Dept. B Dept. C
Obviously if my report only returned just Dept. A then I would expect to see just one checkbox:
Dept. A
sql checkbox oracle11g oracle-apex
add a comment |
Using Oracle APEX v4.2.2, I would like to dynamically build a checkbox selection list based on data from an Oracle Classic Report.
For example:
Location Dept A. Dept. B Dept. C Total Employees
----------------- ----------- ----------- ------------ ---------------
Paris 5 10 3 18
Using the above report, I would like to dynamically build three checkboxes based on the columns Dept. A, Dept. B and Dept. C
So beneath my report I would expect to see checkboxes:
Dept. A Dept. B Dept. C
Obviously if my report only returned just Dept. A then I would expect to see just one checkbox:
Dept. A
sql checkbox oracle11g oracle-apex
add a comment |
Using Oracle APEX v4.2.2, I would like to dynamically build a checkbox selection list based on data from an Oracle Classic Report.
For example:
Location Dept A. Dept. B Dept. C Total Employees
----------------- ----------- ----------- ------------ ---------------
Paris 5 10 3 18
Using the above report, I would like to dynamically build three checkboxes based on the columns Dept. A, Dept. B and Dept. C
So beneath my report I would expect to see checkboxes:
Dept. A Dept. B Dept. C
Obviously if my report only returned just Dept. A then I would expect to see just one checkbox:
Dept. A
sql checkbox oracle11g oracle-apex
Using Oracle APEX v4.2.2, I would like to dynamically build a checkbox selection list based on data from an Oracle Classic Report.
For example:
Location Dept A. Dept. B Dept. C Total Employees
----------------- ----------- ----------- ------------ ---------------
Paris 5 10 3 18
Using the above report, I would like to dynamically build three checkboxes based on the columns Dept. A, Dept. B and Dept. C
So beneath my report I would expect to see checkboxes:
Dept. A Dept. B Dept. C
Obviously if my report only returned just Dept. A then I would expect to see just one checkbox:
Dept. A
sql checkbox oracle11g oracle-apex
sql checkbox oracle11g oracle-apex
edited Nov 20 '18 at 23:13
halfer
14.6k758113
14.6k758113
asked May 6 '14 at 15:36
tonyftonyf
12.6k37114191
12.6k37114191
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Two ways to do it:
1) If the number of checkboxes are (a) known and (b) small, you can create each checkbox and make it conditional on an associated hidden page item (say :PXX_DEPTA_COUNT). Then you can have each of those hidden items either their value using 'Always / SQL Query', or they can be set all at once via a Page Process.
2) You can also create a PL/SQL dynamic content region, and use the apex.item API to create the checkboxes:
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#AEAPI1006
If you go with the dynamic content region, you're going to have to do the HTML work yourself, but you can cheat by first creating a test region with some checkboxes laid out the way you want, then look at the page source and use the same HTML in your dynamic region.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23499055%2fhow-to-dynamically-build-checkboxes-based-on-a-sql-report%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Two ways to do it:
1) If the number of checkboxes are (a) known and (b) small, you can create each checkbox and make it conditional on an associated hidden page item (say :PXX_DEPTA_COUNT). Then you can have each of those hidden items either their value using 'Always / SQL Query', or they can be set all at once via a Page Process.
2) You can also create a PL/SQL dynamic content region, and use the apex.item API to create the checkboxes:
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#AEAPI1006
If you go with the dynamic content region, you're going to have to do the HTML work yourself, but you can cheat by first creating a test region with some checkboxes laid out the way you want, then look at the page source and use the same HTML in your dynamic region.
add a comment |
Two ways to do it:
1) If the number of checkboxes are (a) known and (b) small, you can create each checkbox and make it conditional on an associated hidden page item (say :PXX_DEPTA_COUNT). Then you can have each of those hidden items either their value using 'Always / SQL Query', or they can be set all at once via a Page Process.
2) You can also create a PL/SQL dynamic content region, and use the apex.item API to create the checkboxes:
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#AEAPI1006
If you go with the dynamic content region, you're going to have to do the HTML work yourself, but you can cheat by first creating a test region with some checkboxes laid out the way you want, then look at the page source and use the same HTML in your dynamic region.
add a comment |
Two ways to do it:
1) If the number of checkboxes are (a) known and (b) small, you can create each checkbox and make it conditional on an associated hidden page item (say :PXX_DEPTA_COUNT). Then you can have each of those hidden items either their value using 'Always / SQL Query', or they can be set all at once via a Page Process.
2) You can also create a PL/SQL dynamic content region, and use the apex.item API to create the checkboxes:
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#AEAPI1006
If you go with the dynamic content region, you're going to have to do the HTML work yourself, but you can cheat by first creating a test region with some checkboxes laid out the way you want, then look at the page source and use the same HTML in your dynamic region.
Two ways to do it:
1) If the number of checkboxes are (a) known and (b) small, you can create each checkbox and make it conditional on an associated hidden page item (say :PXX_DEPTA_COUNT). Then you can have each of those hidden items either their value using 'Always / SQL Query', or they can be set all at once via a Page Process.
2) You can also create a PL/SQL dynamic content region, and use the apex.item API to create the checkboxes:
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#AEAPI1006
If you go with the dynamic content region, you're going to have to do the HTML work yourself, but you can cheat by first creating a test region with some checkboxes laid out the way you want, then look at the page source and use the same HTML in your dynamic region.
answered May 7 '14 at 14:22
cjscjs
32419
32419
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23499055%2fhow-to-dynamically-build-checkboxes-based-on-a-sql-report%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown