Dmitriy Posted April 17, 2020 Share Posted April 17, 2020 Hi, sorry if my question looks like noob) but i setup my dbgrid on export (see fotos) and i have 7 pages in my grid, after export i see that exported only 1 page. I dont want to change grid option on not paged. How can i solve this case? ) Quote Link to comment Share on other sites More sharing options...
fraxzi Posted April 18, 2020 Share Posted April 18, 2020 Hi, I have the same problem... and also the filename which I set was not followed.. always "export.xlsx" instead of "something.xlsx" Regards, Frances Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 18, 2020 Administrators Share Posted April 18, 2020 This is a client side exporter developed by Sencha, so it can only export the visible page. If your grid is paged and you need to export all pages you must use a server side exporter such as FlexCell. Also you can switch to a non-paged grid. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 18, 2020 Administrators Share Posted April 18, 2020 51 minutes ago, fraxzi said: Hi, I have the same problem... and also the filename which I set was not followed.. always "export.xlsx" instead of "something.xlsx" Regards, Frances I will check this. Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted April 18, 2020 Share Posted April 18, 2020 in unit uniBasicGrid; TUniGridExporter.ExportGrid to correct the line in JSConfig('filename', [FFileName + '.' + Self.FExporter.FileExtention], ExpCfgObj); JSConfig('fileName', [FFileName + '.' + Self.FExporter.FileExtention], ExpCfgObj); n -> N please .Farshad Mohajeri ... for me you can also add this code TUniGridExporter = class(TPersistent) private function FileNameIsStored: Boolean; function TitleIsStored: Boolean; ... published ... property FileName: string read FFileName write SetFileName stored FileNameIsStored; property Title: string read FTitle write SetTitle stored TitleIsStored; end; function TUniGridExporter.FileNameIsStored: Boolean; begin Result := FFileName <> 'Export'; end; function TUniGridExporter.TitleIsStored: Boolean; begin Result := FTitle <> 'Exported Grid'; end; so as not to store the two values in dfm thank you 1 Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 20, 2020 Administrators Share Posted April 20, 2020 On 4/18/2020 at 4:57 PM, gerardocrisci said: JSConfig('fileName', [FFileName + '.' + Self.FExporter.FileExtention], ExpCfgObj); Quote Link to comment Share on other sites More sharing options...
gerardocrisci Posted April 20, 2020 Share Posted April 20, 2020 thank you ... also applies the suggestion for string properties Quote Link to comment Share on other sites More sharing options...
EDOM Posted May 13, 2020 Share Posted May 13, 2020 How can I export to excel when content with image ? Ex: Demos\Desktop\GridImages (column: Gender) Quote Link to comment Share on other sites More sharing options...
MarcoPis Posted July 7, 2020 Share Posted July 7, 2020 Hi, I found a solution for print the whole grid, but it is not a best practice. I created an invisible UniPanel with a UniDbGrid inside that has Paged property False. When I export the Grid I do as follow. UniPanel3.Visible := True; //Panel that contains the UniDBGrid to Export UniDbGrid1.Visible := False; //Hide the grid with WebOptions.Paged = True UniDBGrid2.Exporter.Exporter := UniGridExcelExporter1; UniDBGrid2.Exporter.ExportGrid; // Export the grid with WebOptions.Paged = False; UniPanel3.Visible := False; //Hide the panel that contains the grid with WebOptions.Paged =False; UniDbGrid1.Visible := True; //Show the real Grid Pros : You can print the whole grid using UniGui native components, Cons : You have a clone of your UniDBGrid just for export. Hope it helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.