If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53515 by cishpix
Thu Mar 19, 2020 11:56 am
I have a query that have around more than 500 records. When I try export all the data to XLSX (I use builtin command in panel operations of query), I only got max 101 records.
I have show all the records as unlimited in my query but I cannot get all the data as XLSX.
Is it bugs in AwareIM or it have limited when export to XLSX?
Last edited by cishpix on Fri Mar 20, 2020 4:46 am, edited 2 times in total.
#53518 by johntalbott
Thu Mar 19, 2020 3:40 pm
Even though you have your query set to Unlimited, pages sizes still apply. By default the Kendo grid exports only the current page.

https://docs.telerik.com/kendo-ui/api/j ... l.allpages

In the Init Script try this:
Code: Select allconfig.excel.allPages = true
#53519 by hpl123
Thu Mar 19, 2020 4:10 pm
johntalbott wrote:Even though you have your query set to Unlimited, pages sizes still apply. By default the Kendo grid exports only the current page.

https://docs.telerik.com/kendo-ui/api/j ... l.allpages

In the Init Script try this:
Code: Select allconfig.excel.allPages = true


John, I am curious, how do you figure out what exactly to write for these scripts? e.g in this scenario, you start with config and then figure out in some way it´s excel after that and then the actual parameter which I garther you find in the relevant documentation. Is there an index or some way of figuring out what exactly to write for the various Aware modules, components etc.? Is it possible to figure it out looking at the Aware JS files or something like that or do you have any other pointers on how to do this? I have tried to read/understand the programmers reference for this area but my JS skills are not that good so I end up guessing and rarely finding the right snippet to use.
#53520 by cishpix
Thu Mar 19, 2020 4:54 pm
hpl123 wrote:In the Init Script try this:
CODE: SELECT ALL
config.excel.allPages = true

Hi Jhon, many thanks for your respond.
I have test it but unfortunately it doesn't works, still same 101 records.
I have try remove the blank space between the equal and try change it to false but still not solved. I have try in Render script and both of init script with render script too but still same result (101 records).
I have try it in query or in form that show all the records in grid (1 to many relationship) but still not solve.
Any idea??
#53522 by Jaymer
Thu Mar 19, 2020 7:45 pm
the example code in this thread generates an error in the console for me.
what i have used in the past is this:

Code: Select allconfig.Excel = {
   AllPages: true,
   FileName: 'ROExports.xlsx'
}

config.PDF = {
   AllPages: true
}



I made a query that finds 331 records.
PDF exports them perfectly, but Excel is still doing 100, and does NOT change the filename.

This has worked for me in the past - I spent 45 mins on this just now and cannot spend any more time.
There must be something broken in the past 1-2 years since this worked and now in the latest 8.4.
I know its straightforward JS thats supposed to be posting into Kendo's memory, but I can't explain why its ignoring the code now.
#53525 by johntalbott
Thu Mar 19, 2020 11:41 pm
hpl - It's the result of investing a massive amount of time over the past few years digging through the AIM JS code and mapping to Kendo.

cishpix / jaymer - after reviewing the AIM code, the reason it's not working is that AIM doesn't use Kendo's out of the box method of export to xlsx.

To see what Kendo approach looks like, add this in the init script:
config.toolbar = ["excel"]
config.excel.allPages = true Note: config.excel = {allPages: true} is valid syntax as well.

Line 1 above adds Kendo's default button for exporting to excel to the grid toolbar (which is different than what AIM calls the toolbar.) See highlighted button in screen clip.

ExportExcel.png
ExportExcel.png (45.11 KiB) Viewed 2428 times


I expect that you'll likely want to use AIM's export button for UI consistency. To do that, AIM's export to excel method could be overridden to do it the Kendo way. There are actually a couple of different ways this can be done. Unfortunately that would take more time that I have to explain.
#53529 by cishpix
Fri Mar 20, 2020 4:44 am
johntalbott wrote:To see what Kendo approach looks like, add this in the init script:
config.toolbar = ["excel"]
config.excel.allPages = true Note: config.excel = {allPages: true} is valid syntax as well.

Hi John, many brilliant thanks and much appreciated for your time.
#53618 by Jaymer
Tue Mar 31, 2020 4:16 am
I added
config.toolbar = ["excel"]

to Init Script, and it immediately showed a new non-aware export Button.
But at runtime, clicking that button does nothing.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 20 guests