mikromundo Posted June 10, 2021 Share Posted June 10, 2021 Hi... I hope everyone is okay. I am creating runtime uniDbGrid for Export data and I receive this: Thanks any help !!! procedure tdm_rc.rc_GridExport(pGrid: TUniDBGRID; pType: TRCExportType); var pGridTemp : TUniDBGrid; begin try //pGrid.ShowMask( '' ); pGridTemp := TUniDBGrid.Create( TComponent( pGrid.Owner ) ); pGridTemp.Parent := TUniControl( pGrid.GetParentComponent ) ; pGridTemp.Exporter.Enabled := True; pGridTemp.DataSource := pGrid.DataSource; pGridTemp.WebOptions.Paged := false; pGridTemp.DataSource.DataSet.close; pGridTemp.DataSource.DataSet.Open; pGridTemp.Exporter.Title := APP_NAME + ' Dataexport'; pGridTemp.Exporter.FileName := 'DataExport-' + FormatDateTime('yyyymmdd_hhmmss', Now() ); case pType of etExcel : pGridTemp.Exporter.Exporter := dm_rc.UniGridExcelExporter1; etHTML : pGridTemp.Exporter.Exporter := dm_rc.UniGridHTMLExporter1; etXML : pGridTemp.Exporter.Exporter := dm_rc.UniGridXMLExporter1; etCSV : pGridTemp.Exporter.Exporter := dm_rc.UniGridCSVExporter1; end; pGridTemp.Exporter.IncludeGroups := true; pGridTemp.Exporter.IncludeSummary := true; pGridTemp.Exporter.ExportGrid; finally pGridTemp.DataSource.DataSet.close; pGridTemp.Free; //pGrid.HideMask; end; end; Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted June 11, 2021 Share Posted June 11, 2021 3 hours ago, mikromundo said: Hi... I hope everyone is okay. I am creating runtime uniDbGrid for Export data and I receive this: Thanks any help !!! procedure tdm_rc.rc_GridExport(pGrid: TUniDBGRID; pType: TRCExportType); var pGridTemp : TUniDBGrid; begin try //pGrid.ShowMask( '' ); pGridTemp := TUniDBGrid.Create( TComponent( pGrid.Owner ) ); pGridTemp.Parent := TUniControl( pGrid.GetParentComponent ) ; pGridTemp.Exporter.Enabled := True; pGridTemp.DataSource := pGrid.DataSource; pGridTemp.WebOptions.Paged := false; pGridTemp.DataSource.DataSet.close; pGridTemp.DataSource.DataSet.Open; pGridTemp.Exporter.Title := APP_NAME + ' Dataexport'; pGridTemp.Exporter.FileName := 'DataExport-' + FormatDateTime('yyyymmdd_hhmmss', Now() ); case pType of etExcel : pGridTemp.Exporter.Exporter := dm_rc.UniGridExcelExporter1; etHTML : pGridTemp.Exporter.Exporter := dm_rc.UniGridHTMLExporter1; etXML : pGridTemp.Exporter.Exporter := dm_rc.UniGridXMLExporter1; etCSV : pGridTemp.Exporter.Exporter := dm_rc.UniGridCSVExporter1; end; pGridTemp.Exporter.IncludeGroups := true; pGridTemp.Exporter.IncludeSummary := true; pGridTemp.Exporter.ExportGrid; finally pGridTemp.DataSource.DataSet.close; pGridTemp.Free; //pGrid.HideMask; end; end; Hello Why are you using uniDBGrid to export? Fastreport will be suitable for this. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted June 11, 2021 Author Share Posted June 11, 2021 Thanks @Hayri ASLAN But I would just like to use the feature that exists in unigui. Quote Link to comment Share on other sites More sharing options...
Pep Posted June 11, 2021 Share Posted June 11, 2021 Did you try to give a name to the temp uniDbGrid like pGridTemp.Name := 'pGridExport'; Quote Link to comment Share on other sites More sharing options...
mikromundo Posted June 11, 2021 Author Share Posted June 11, 2021 Thanks @Pep but do not work too. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 11, 2021 Administrators Share Posted June 11, 2021 @mikromundo Hi, Please send us a test app. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted June 11, 2021 Author Share Posted June 11, 2021 Thanks @Farshad Mohajeri Grid - Exporter - TestCase.rar Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 11, 2021 Administrators Share Posted June 11, 2021 3 hours ago, mikromundo said: Thanks @Farshad Mohajeri Grid - Exporter - TestCase.rar 21.62 kB · 1 download This will not work because our exporter is a client side utility and it requires a visible Grid with data loaded. In your case grid is created and destroyed before any data is loaded. Why don't you use the original grid to export data? Quote Link to comment Share on other sites More sharing options...
mikromundo Posted June 11, 2021 Author Share Posted June 11, 2021 That's what I was thinking... I was trying an alternative to be able to export ALL PAGES from the grid and not just 1. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted June 11, 2021 Author Share Posted June 11, 2021 Sorted out. I left an instance of the grid "hidden" with the same datasource but with Paged = false and used it as a reference to export the data. Note: In HTML export with large amount (13k records) some information was lost and the same export to Excel worked 100%. Thanks @Hayri ASLAN, @Pep and @Farshad Mohajeri 1 Quote Link to comment Share on other sites More sharing options...
mikromundo Posted February 20 Author Share Posted February 20 On 6/11/2021 at 1:36 PM, Farshad Mohajeri said: This will not work because our exporter is a client side utility and it requires a visible Grid with data loaded. In your case grid is created and destroyed before any data is loaded. Why don't you use the original grid to export data? Accessing the application by a mobile phone, and exporting the grid (CSV for example) is opened a second screen and is not exported. Could this be resolved? https://prime.fmsoft.net/demo/desktop/mdemo.dll Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 21 Share Posted February 21 17 hours ago, mikromundo said: https://prime.fmsoft.net/demo/desktop/mdemo.dll Hello, Does the mobile solution work? Quote Link to comment Share on other sites More sharing options...
mikromundo Posted February 21 Author Share Posted February 21 I would like to use this feature with standard components and not using hybrid mobile. I think that, just as it is possible to download PDF files (unipdfframe), it would also be possible to download the grid export files. It's possible? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 21 Share Posted February 21 26 minutes ago, mikromundo said: I would like to use this feature with standard components and not using hybrid mobile. Possibly export (desktop) will not work on mobile. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 21 Share Posted February 21 28 minutes ago, mikromundo said: I think that, just as it is possible to download PDF files (unipdfframe), it would also be possible to download the grid export files. It's possible? Clarify your question. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted February 21 Author Share Posted February 21 Sorry Sherzod, I can't clarify more than what was said in the original post (I don't know if it's being translated wrong). I just need (and other users) that the data export through UniDBGrid works on a cell phone. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 21 Share Posted February 21 2 minutes ago, mikromundo said: I can't clarify more than what was said in the original post (I don't know if it's being translated wrong). I just need (and other users) that the data export through UniDBGrid works on a cell phone. Sorry, (above post) I thought you were asking about something else. Well, don’t know, need to check because the desktop application may not work fully on the mobile one. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted February 21 Author Share Posted February 21 There's no need to apologize... after all, you're here to help and you're always kind to everyone. I apologize... I need Google translate to write in English and sometimes I think there may be an error in the translation. Quote Link to comment Share on other sites More sharing options...
zanona Posted March 7 Share Posted March 7 Em 21/02/2024 às 08:39, Sherzod disse: Desculpe, (post acima) eu pensei que você estava perguntando sobre outra coisa. Bem, não sei, precisa verificar porque o aplicativo de desktop pode não funcionar totalmente no móvel. Consegui analisar uma possível solução? Quote Link to comment Share on other sites More sharing options...
mikromundo Posted March 7 Author Share Posted March 7 Ainda não.Aguardando resposta da FMSOFT. Quote Link to comment Share on other sites More sharing options...
zanona Posted April 9 Share Posted April 9 Em 21/02/2024 às 08:39, Sherzod disse: Desculpe, (post acima) eu pensei que você estava perguntando sobre outra coisa. Bem, não sei, precisa verificar porque o aplicativo de desktop pode não funcionar totalmente no móvel. Há previsão para ajustar o problema? 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.