Android Question Drag and drop report builder - Need opinions

philone

New Member
Hey Everyone,

Says I'm a first time poster here, pretty sure I had an account under a different email years ago, couldn't figure it out. I'm definitely not a new B4X user. I've primarily used B4A but dabbled in Basic4PPC as well (yes, been around a while). Anyway, I need some opinions regarding something I need to build.

In one of my projects I'm going to add the option to basically build custom report pages in-app. Under the hood will be your pretty basic SQLite database housing data for said report. What I need to be able to do is give the end user the ability to add a report item, total sales for example, and drag it to where they want it on the screen (page, view, whatever). After arranging the items where they want they would then be saved somehow. I've toyed with saving to a local database, syncing with a remote database, saving to a file, etc. That part I have a pretty good handle on.

The path I'm leaning toward going down is (I'll use "item" for the object that is added, which will likely just be a label):
  • User clicks "add item" and selects the underlying data attached
  • The item then appears on the screen
  • The user drags it to where they want it
  • The user resizes the item to the size they want (I'd have to modify the DraggableView class to add resizing capability)
  • Repeat these steps until a report is built
  • The user clicks the save button
  • The underlying code then iterates all of the views and stores their paramaters
  • When the user loads one of these reports it simply reads the stored parameters and rebuilds the page

So as you can see if I started work on this today I could probably successfully build such a report builder. If you can think of a better way to do this or see a glaring problem in my methodology please let me know.

Thanks,
Phil
 

philone

New Member
Hi Erel, thanks for the response. I've done a lot of research into B4XCanvas and I guess I'm not quite understanding how you'd implement this. I'm finding next to nothing about moving objects around on a canvas.

Do you or anyone else have any additional pointers on where to start with this?

Thanks
 
Upvote 0
Top