Unable download CSV/XLS report, if there are more than 30 variables

Hi there @dhis2-analytics team,

I have proposal amend the request string for the downloading EVENT reports in CSV/XLS formats as Line list. This is actual especially when you have 30 or more variables in the event report.
Example:
this is normal request string:
https://yourServerAddress/api/29/analytics/events/query/programUID.xls?dimension=pe:THIS_YEAR;LAST_YEAR&dimension=ou:D8Evpci1hnF&dimension=pBjfKnZinRH.oj5w2G1zpLy&dimension=pBjfKnZinRH.MwZ5LUeneKg&dimension=pBjfKnZinRH.pfmfSfcX3PQ&dimension=pBjfKnZinRH.uASH4VKYnLJ&dimension=pBjfKnZinRH.KQppTFXLN8m&dimension=pBjfKnZinRH.f6zpmjKrJwK&dimension=pBjfKnZinRH.Gr9ELxL4reZ&dimension=pBjfKnZinRH.TUV4BluY2Fs&dimension=pBjfKnZinRH.kqGK9kuqZj7&dimension=pBjfKnZinRH.PSJ3llAd8Hs&dimension=pBjfKnZinRH.vXbAN2fyxZw&dimension=pBjfKnZinRH.xPoTiE5nUzS&dimension=pBjfKnZinRH.uCjMYPPGosE&dimension=pBjfKnZinRH.hbVxn1Qe4mo&dimension=pBjfKnZinRH.Ib9AjMAY8bL&dimension=pBjfKnZinRH.YW495MGdU92&dimension=pBjfKnZinRH.YjIO86CvfQZ&dimension=pBjfKnZinRH.GWX6CX1DYzh&dimension=pBjfKnZinRH.l2TdCAjDsbO&dimension=pBjfKnZinRH.dEbUSnSW8eE&dimension=pBjfKnZinRH.OqHOElFjQ3N&dimension=pBjfKnZinRH.Ehg79AINP5W&dimension=pBjfKnZinRH.QplBRjGSRMX&dimension=pBjfKnZinRH.pLgusMQJpMd&dimension=pBjfKnZinRH.N6QEQ0hNqKp&dimension=pBjfKnZinRH.d0ar5yJkwKm&dimension=pBjfKnZinRH.UHeMOs0Q2M9&dimension=pBjfKnZinRH.GlkaB00cilN&dimension=pBjfKnZinRH.PLmfM3DUvTO&dimension=pBjfKnZinRH.NCipIi1MFQ3&dimension=pBjfKnZinRH.UO7TPJU4UZc&dimension=pBjfKnZinRH.ta0nQjFF3xT&dimension=pBjfKnZinRH.D6OL7632dJJ&dimension=pBjfKnZinRH.EWcxAxi6nde&dimension=pBjfKnZinRH.L8USvFHrto2&dimension=pBjfKnZinRH.o0RR3jHIIek&dimension=pBjfKnZinRH.Cui8fPdlgTz&dimension=pBjfKnZinRH.PAvIr9Ca9wl&dimension=pBjfKnZinRH.aMoi36mdvqa&dimension=pBjfKnZinRH.anMoHNDWMCR&dimension=pBjfKnZinRH.kI1QipFm01e&dimension=pBjfKnZinRH.B32JvQ2G2Wj&dimension=pBjfKnZinRH.obYcxoXNRFo&dimension=pBjfKnZinRH.ukOUQLkpYcG&dimension=pBjfKnZinRH.Y7OjPMHyuL9&dimension=pBjfKnZinRH.GdX4g8ejBx5&dimension=pBjfKnZinRH.oLKOgOg9N2g&dimension=pBjfKnZinRH.gTesFZonBn3&dimension=pBjfKnZinRH.aopG2kQgykZ&dimension=pBjfKnZinRH.vmTw5oWxIgQ&dimension=pBjfKnZinRH.BpRIbLwZD2s&dimension=pBjfKnZinRH.Fy9bBVQ0hcW&dimension=pBjfKnZinRH.Ovv8teGs2tW&dimension=pBjfKnZinRH.FX1v6LtOW7Z&dimension=pBjfKnZinRH.ygBCfVz14tu&dimension=pBjfKnZinRH.hoDarbMwJy2&dimension=pBjfKnZinRH.cHwcjoBZ3bh&dimension=pBjfKnZinRH.FHX4yJs34As&dimension=pBjfKnZinRH.hroWchXuHML&dimension=pBjfKnZinRH.VPM4k8WSpGw&dimension=pBjfKnZinRH.NYl4UdnKrbn&dimension=pBjfKnZinRH.CYUsd3NzVI5&dimension=pBjfKnZinRH.ELPVEUTgnUJ&dimension=pBjfKnZinRH.ZrohDiLoqxe&dimension=pBjfKnZinRH.yOJxWVtGk12&dimension=pBjfKnZinRH.aN8vB1kxlsG&dimension=pBjfKnZinRH.LWRgREzJYw9&dimension=pBjfKnZinRH.MAAZE5o4ioy&dimension=pBjfKnZinRH.GzI39OP2jVe&dimension=pBjfKnZinRH.zjkEeQLZP2e&dimension=pBjfKnZinRH.LfJOsw6qWfD&dimension=pBjfKnZinRH.Xmhj6rEugbe&dimension=pBjfKnZinRH.wO8ttHrE4ee&dimension=pBjfKnZinRH.sNyTQarQkPv&dimension=pBjfKnZinRH.yIHkZzLhzVu&dimension=pBjfKnZinRH.F0hMESJEyFV&dimension=pBjfKnZinRH.o10xZW9atcw&dimension=pBjfKnZinRH.gbfYd3V90Zq&dimension=pBjfKnZinRH.qA0MakdtwHj&dimension=pBjfKnZinRH.znv4yhXLP0J&dimension=pBjfKnZinRH.NSyNJx4WGnZ&dimension=pBjfKnZinRH.g4CCDMYRT4h&dimension=pBjfKnZinRH.PwhXnUeLB6E&dimension=pBjfKnZinRH.q3HyofE1a4v&dimension=pBjfKnZinRH.BshLgzckRYI&dimension=pBjfKnZinRH.pXH5er2cOn7&dimension=pBjfKnZinRH.gCjBW1aJxor&dimension=pBjfKnZinRH.bAOBflhNgWk&dimension=pBjfKnZinRH.a1iqGwrq0rd&dimension=pBjfKnZinRH.H4DDKBgDDsl&dimension=pBjfKnZinRH.XhZ2L4Tsmwc&dimension=pBjfKnZinRH.RfG42uTGRQ8&dimension=pBjfKnZinRH.A3ujuykNQj3&dimension=pBjfKnZinRH.jpxiF4jW9bf&dimension=pBjfKnZinRH.CcpJ77W9asQ&dimension=pBjfKnZinRH.Yo7eAHD4SCv&dimension=pBjfKnZinRH.Ou6cDc9VtKT&dimension=pBjfKnZinRH.wocjXonNY6x&dimension=pBjfKnZinRH.Y2soALhByhV&dimension=pBjfKnZinRH.vY4OXda8cFV&dimension=pBjfKnZinRH.oupOUh5RJ5Z&dimension=pBjfKnZinRH.aBonqwc1Nbj&dimension=pBjfKnZinRH.DITEe5ZCInL&dimension=pBjfKnZinRH.mM1jFIAoigH&dimension=pBjfKnZinRH.hluk7boF1jR&dimension=pBjfKnZinRH.yFW1sAkyunD&dimension=pBjfKnZinRH.K4qsRdgPIHX&dimension=pBjfKnZinRH.ERV1xtzI6eR&dimension=pBjfKnZinRH.cSjbHLMiaYT&dimension=pBjfKnZinRH.TwThaThnpxH&dimension=pBjfKnZinRH.ZYNvjJwPT23&dimension=pBjfKnZinRH.c4e8h9z9jFN&dimension=pBjfKnZinRH.ad9ZjUxxRgc&dimension=pBjfKnZinRH.IDg1RLn6lt7&dimension=pBjfKnZinRH.XNc0Wva7Fgv&dimension=pBjfKnZinRH.g6iMOL0FhdT&dimension=pBjfKnZinRH.ad9ZjUxxRg1&dimension=pBjfKnZinRH.qP3rL7CKfZT&dimension=pBjfKnZinRH.CejQfCBUdNk&dimension=pBjfKnZinRH.Mk9L57tQkuK&dimension=pBjfKnZinRH.B98CbDQQ0YP&dimension=pBjfKnZinRH.GbjMpn1Ex75&dimension=pBjfKnZinRH.CejQfCBUdN1&dimension=pBjfKnZinRH.w1Osl58upNR&dimension=pBjfKnZinRH.T7KEwMsvwHI&dimension=pBjfKnZinRH.Rcfu7PTW0o8&dimension=pBjfKnZinRH.xuPFgMGOBej&dimension=pBjfKnZinRH.VEJxLDZGTDg&dimension=pBjfKnZinRH.rZbZ8kPYGOO&stage=pBjfKnZinRH&displayProperty=NAME&tableLayout=true&dataIdScheme=NAME&columns=pe;ou;oj5w2G1zpLy;MwZ5LUeneKg;pfmfSfcX3PQ;uASH4VKYnLJ;KQppTFXLN8m;f6zpmjKrJwK;Gr9ELxL4reZ;TUV4BluY2Fs;kqGK9kuqZj7;PSJ3llAd8Hs;vXbAN2fyxZw;xPoTiE5nUzS;uCjMYPPGosE;hbVxn1Qe4mo;Ib9AjMAY8bL;YW495MGdU92;YjIO86CvfQZ;GWX6CX1DYzh;l2TdCAjDsbO;dEbUSnSW8eE;OqHOElFjQ3N;Ehg79AINP5W;QplBRjGSRMX;pLgusMQJpMd;N6QEQ0hNqKp;d0ar5yJkwKm;UHeMOs0Q2M9;GlkaB00cilN;PLmfM3DUvTO;NCipIi1MFQ3;UO7TPJU4UZc;ta0nQjFF3xT;D6OL7632dJJ;EWcxAxi6nde;L8USvFHrto2;o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Jx4WGnZ;g4CCDMYRT4h;PwhXnUeLB6E;q3HyofE1a4v;BshLgzckRYI;pXH5er2cOn7;gCjBW1aJxor;bAOBflhNgWk;a1iqGwrq0rd;H4DDKBgDDsl;XhZ2L4Tsmwc;RfG42uTGRQ8;A3ujuykNQj3;jpxiF4jW9bf;CcpJ77W9asQ;Yo7eAHD4SCv;Ou6cDc9VtKT;wocjXonNY6x;Y2soALhByhV;vY4OXda8cFV;oupOUh5RJ5Z;aBonqwc1Nbj;DITEe5ZCInL;mM1jFIAoigH;hluk7boF1jR;yFW1sAkyunD;K4qsRdgPIHX;ERV1xtzI6eR;cSjbHLMiaYT;TwThaThnpxH;ZYNvjJwPT23;c4e8h9z9jFN;ad9ZjUxxRgc;IDg1RLn6lt7;XNc0Wva7Fgv;g6iMOL0FhdT;ad9ZjUxxRg1;qP3rL7CKfZT;CejQfCBUdNk;Mk9L57tQkuK;B98CbDQQ0YP;GbjMpn1Ex75;CejQfCBUdN1;w1Osl58upNR;T7KEwMsvwHI;Rcfu7PTW0o8;xuPFgMGOBej;VEJxLDZGTDg;rZbZ8kPYGOO&paging=false
and this will result :

It has 2 solutions:

  1. Simplest one, while you will fix the issue:
    Shorten the request string by removing everything between &dataIdScheme=NAME and &paging=false it will download your report as intended.

  2. Send all request to the server as payload, so no one will see the request

Please make life easier for everyone.
Thank you.
Regards, Ulanbek

2 Likes

Hi @Ulanbek!
Thank you for sharing this workaround! Would you like to create a Jira issue describing your solution? Thank you! (: