Hi all,
I've confirmed that my linked report is setup correctly to obtain a TEXT list of DB record ID's separated by a comma. I provided the report with a manual set of comma-separated values and it worked as expected. Thus, the issue isn't processing the IDs, it's getting the IDs over to this report from the Selectable report.
So, the code for the Selectable report is as follows:
DROP PROCEDURE IF EXISTS sp_DBR_OutstandingEmissions
$$
CREATE PROCEDURE `sp_DBR_OutstandingEmissions`(inLogin varchar(128))
BEGIN select 'dbr.button', 'Print Work Orders';
select 'dbr.report', 'sp_DBR_workorder_report_listing','inIds=selectable.workOrderIds';
select 'dummy'; select 'dbr.selectable', 'ID';
select 'dbr.resultclass', 'workOrderIds'; select
fm.ID as 'ID',
ca.CLIENT_NAME as 'Client',
fm.GPE_TAG_NUMBER as 'GPE Tag Number',
fs.SOURCE_DESCRIPTION as 'Source Description'
from database.ss_fugitive_measurements fm
join database.ss_fugitive_sources fs on fs.ID = fm.FUGITIVE_SOURCE_ID
join database.ss_client_accounts ca on ca.ID = fs.CLIENT_ACCOUNT_ID
join database.mydbr_groupsusers mgu on ca.GROUP_ID = mgu.group_id
where mgu.user = inLogin; END
$$
The Selectable report shown above generates perfectly and shows the content I expect. The issue is that when I select 3 checkboxes and fire over the "selectable.workOderIds" the linked report is obviously receiving nothing or garbage and there's no results. As I explained above, I know the linked report is correctly configured as I tested it above.
This being said, I suspect the issue is that the IDs I am selecting above are not being entered into a CSV list, unless there's some magic behind the scenes that automatically CSV's selectable values? I believe this is the case because the document states that values will be sent over as a comma-separated list...
Thus, if CSV'ing the IDs automatically occurs, there must be something else wrong with my Selectable report, can you help me spot it?
Moreover, is there a way to debug results so I can see what is being attempted to be sent over to the linked report within workOrderIds? That would be very helpful in this situation.
Thank you!
PS: "select 'dummy'" is not explained in the documentation for Selectable, is this my oversight or the documentation's? Typically workarounds are heavily documented, I think this is a workaround, but perhaps I am wrong?