You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
I've got a number of basic queries working and found the gem to be quite useful.
However, I have the following crosstab query:
class OverflowPivotReport < Dossier::Report
def sql
'
SELECT * FROM crosstab('
SELECT zip, status, status_count
FROM "status_counts"
ORDER BY 1, 2;')
AS ct (zip character varying, "0" bigint, "1" bigint, "2" bigint, "8" bigint);
'
end
end
status_counts is a DB view.
when I run the query directly on the DB it works fine.
I get the following error when I run the .html report:
undefined local variable or method `zip' for #<OverflowPivotReport:0x007fc2dd1cacd0>
I saw the following in the documentation:
Show how to do "crosstab" reports (preliminary query to determine columns, then build SQL case statements?)