Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral
  1. Hi, Ended up using example from aehimself. That was the easiest to implement in my app and worked straight away. regards Bill
  2. Thank you to all. This gives me a lot to try so will let you know at a later date whatever has ended up working for me. Thanks again to everyone. regards Bill Zwirs
  3. I need to collect all tubes data. At this stage, specifically the coin_unit and coin_count fields. Bill Zwirs
  4. Sorry...normally first thing I add. FMX application on Delphi 11.3. Bill
  5. I am trying to parse a json response to retrieve a nested record without any success. Example of the json response is: { "status": "1", "info": "success", "page_info": { "total_page": "1", "record_per_page": "1", "current_page": "1", "total_record": "1" }, "records": [ { "machine_id": "25884", "imei": "", "install_date": "", "last_report": "", ....... ....... "coin_mech": { "coin_mech_id": "12345", "cm_model": "", "serial_no": "", "revision": "", "coin_in_tube": "", "tubes": [ { "tube_id": "3469107", "tube_no": "4", "coin_unit": "100", "coin_count": "93", "coin_inserted": "0", "coin_dispensed": "0", "tube_full": "0" }, { "tube_id": "3469105", "tube_no": "5", "coin_unit": "200", "coin_count": "9", "coin_inserted": "0", "coin_dispensed": "0", "tube_full": "0" } ] } }] } The info I am after is the records for "tubes" which can contain up to 5 records (2 in the above example) . Have tried several of the coding examples that I found in stackoverflow without success although I have not found an example with a similar record structure. Can someone please advise me on how to retrieve those records (would be great if in a dataset). Thanks in advance. Bill Zwirs
  6. bzwirs

    JSON records in TFDMemTable

    Thanks....you were right. I was able to increase the records_per_page setting in the url request which maxed at 200. Any higher and it went to default of 30. I then did multiple requests (of 200) for each page (as you suggested) which were combined into one dataset and all worked fine. Thanks for your help. Bill
  7. I have used Rest Debugger to set up my components (Client, Request, Response, DatasetAdapter and TDFMemTbl) to populate the MemTable with all the records from the "records' part of the response. When I execute the Request I get a Response Ok, part of which is shown below: {"status":"1","info":"success","page_info":{"total_page":"21","record_per_page":"50","current_page":"1","total_record":"1029"},"records":[{"machine_id":"16748","imei":"8615850........................ If I right click the MemTable to view the "records" data all I get is the 50 records (ie. "records_per_page":"50"). I simply want to use the MemTable dataset in a report (using Fast Report) so need ALL records available which, according to the response should be 1029. The report I have created only shows the 50 records at this stage. So my question is......how do I get all the records from the Response to show in the MemTable? Any assistance would be appreciated. Thanks Bill
  8. bzwirs

    Unsupported Pixal Format

    I have sent an email to Winsoft a week ago but as in past requests to them, I have not received any response. So am looking for help elsewhere. Bill
  9. bzwirs

    Unsupported Pixal Format

    Delphi 11.2 I use Winsoft Pdfium for FireMonkey to create a PDF that includes a graphic (png saved to a SQLite table field). The graphic is inserted into the pdf document (as the document is being created) with the following code: Sig := tMemoryStream.Create; try MarafillerDM.EMUInvQrySIGNATURE.SaveToStream(Sig); var aBitMap := FMX.Graphics.TBitmap.Create; try aBitMap.LoadFromStream(Sig); MarafillerDM.FPdf1.AddPicture(aBitMap,18,135,230,80); finally aBitMap.Free; end; finally Sig.Free; end; Up until a couple of weeks ago this worked for both Windows and Android without any problems but now I get an 'Unsupported Pixal Format' error from the Winsoft AddPicture procedure - but only on Android devices (Samsung Tab 6 Lite). On Windows it still works fine. Haven't changed anything in my Delphi environment (updates etc) between it working and not working. Has anyone else experienced this. Would appreciate any help with this issue. Bill Zwirs
  10. Have recompiled an app for Android with Delphi 11.3 and now get the following error when entering numbers into a dbdatagrid (Firepower) and tmsfnc edit control (in both cases have keyboard set to numberpad): Eval Error in: java.lang.indexoutofboundsexception setspan(3...3) ends beyond length 1. The error only occurs on Android tablet - not on Windows version. Have never seen this error before under previous versions of Delphi. Can someone please shed some light on this problem and point me in the right direction to fix it. Bill
  11. Have updated to Delphi 11.3. FMX App Since updating I now get an access violation when using the 'Generate Sql' button from the TFDUpdateSQL component. What can I do to fix this problem? This has never happened under previous versions of Delphi. Bill
  12. bzwirs

    Stack Overflow error

    The first install I opted to save registry entries which normally means I don't have to reinstall the 3rd party components that I use and then I was getting that error. This time I did the opposite and reinstalled the 3rd party components I use and get no error when opening that project. So assume that it must have something to do with a corrupted 3rd party setting in registry from first install. In hindsight, I may have achieved the same result by simply just reinstalling the 3rd party components. Just for your interest, the 3rd party components I use in that particular project are TMS, Woll2Woll, HTML Editor and PDFium (WinSoft).
  13. bzwirs

    Stack Overflow error

    Have reinstalled Delphi with delete registry entries option this time and reinstalled all 3rd party components.....project now opens without error and compiles for Win32. Unable to compile for Android yet but have found that SDK paths are not there so probably need to reinstall Android SDK.
  14. bzwirs

    Stack Overflow error

    I tried your suggestion re copying the dpr and dproj files to another directory. Opened Ok, just complained about other units not being there which would be expected. There are only 3 pas files to this project - Main, Datamodule and proxy file. I first introduced the proxy and datamodule files and in both cases opened Ok except for complaining about the file not there. So finally got the error when I introduced the main file. The main file code shows in the IDE but when I select the Design tab then Delphi closes down completely. So I figure the problem is in the .fmx file. Is there anything in particular that I can look for in that file? At this stage I am thinking about a complete reinstall of Delphi (third party components and all) to see if that helps before I try anything else.
  15. bzwirs

    Stack Overflow error

    Dalija, There are no .dsk files. The exact error is: Bill