How to create a report in excel with rows grouping (Expand + / Collapse -)



  • Is there a way to create a excel report with rows grouping (Expand + / Collapse -).


  • administrators

    hi! i would say that it is just a matter of looking at the XML format that represents row groups.

    so the best you can do is to do what we say in the docs:

    create the whole excel the first, upload it into jsreport and then only replace its data

    try to create an excel file with row groups in it, then look at the generated format and structure of XML files in the excel (excel is just a normal zip file that you can open with any unzip program), try to find the needed format for row groups and you are ready to create rows with such format.

    everything is possible in the excel recipe, it is just a matter of investigation, we don't have examples for such functionality because it would be time consuming for us, so if you find a solution please share the example with us so we can added it to the official examples.

    thanks!



  • Thank you. I have got some knowledge about it. I will definitely share the example once I am done with it.
    Can we accommodate the dynamic data in between grouping. That is if the group 1 has 10 rows in it and the same group may have 14 rows at later point of time.
    Please suggest me.



  • Hi,
    I could complete most of the part. Now I am getting an error while adding an image. Here is the error that I am getting.

    Error occured - Error during rendering report: Cannot read property 'r:id' of undefined
    Stak - TypeError: Cannot read property 'r:id' of undefined
    at Object.ensureDrawingOnSheet (evalmachine.<anonymous>:247:98)
    at Object.addImage (evalmachine.<anonymous>:322:48)
    at Object.<anonymous> (evalmachine.<anonymous>:406:17)
    at Object.eval (eval at createFunctionContext (F:\jsReportServer\node_modules\handlebars\dist\cjs\handlebars\compiler\javascript-compiler.js:254:23), <anonymous>:9:86)
    at main (F:\jsReportServer\node_modules\handlebars\dist\cjs\handlebars\runtime.js:173:32)
    at ret (F:\jsReportServer\node_modules\handlebars\dist\cjs\handlebars\runtime.js:176:12)
    at ret (F:\jsReportServer\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:525:21)
    at F:\jsReportServer\node_modules\jsreport-handlebars\lib\handlebarsEngine.js:25:14
    at evalmachine.<anonymous>:1:41
    at ContextifyScript.Script.runInContext (vm.js:35:29)

    Early reply in this regard is highly appreciated.


  • administrators

    hi! with only that information i'm not able to tell you what is happening, do you have some way to reproduce the problem? maybe it is best if you create an example here https://playground.jsreport.net so it will be easy to see all the context.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.