Thanks David,
your sample showed up my mistake. The "left" property of the Container has to be -width, out of the menu,
otherwise it keeps visible. Now it works as expected.
Thanks David,
your sample showed up my mistake. The "left" property of the Container has to be -width, out of the menu,
otherwise it keeps visible. Now it works as expected.
Hi there,
i used the SwipeMenu Samples to make an swipe menu in my app.
In MainView i do:
Show
SwipeLeft:
SwipeRight:
1. I open and clode the menu in MainView
2. I change to editview (cancel or save it) --> ReplaceView "MainView"
3. Back in MainView the menu is opened
I tried using Hide "MenuContainer" on MenuHide after the AddClass, that works, but then i do not have any animation
I've seen that there is no sample with more views, so this problem maybe hasn't been seen before?
thanks and regards
Antonio
Hi David,
as i don't know if you see edited posts....
I've edited my first post of the thread and uploaded the reworked sample.
I have now completely solved my problem.
I've taken your thoughts and made a new routine in Javascript without touching too much the report control.
The data gets sorted accordingly to the grouping and then i write some header property into the array for every first record of the grouped data. If an header exists, the report control shall show it using ng-if=".." but the calculations are made before and not in the report control anymore.
Thank for your help again, it's great what can be done with AB.
regards
Antonio
Good Evening,
your example doesn't work for me. I do not need to highlight expired records but group records with the same expiration date, together under one header. When the expiration date is today or tomorrow than in the header there should stand "today" or "tomorrow" for all other records in their corresponding group header should stand the "expiration date".
The sample i sent you is nearly correct. The error there is, that even if the result of the AB-Functions produce the correct value true/false,
the headers are displayed despite their values. So it doesn't matter if they are true or false, they are always shown and that is wrong.
Can you follow me?
Edit:
I found the bugs in my sample and now it works like expected. I have uploaded the new sample to the same place, if you like to see it.
These were the bugs:
1. In AB-Functions using:
2. I thought [Result] inside of AB-Function was somekind of built-in variable like in delphi... I used it wrong,
because in an other Function i tried to read it using "FunctionNameResult" like you had written in one of your previous answers.
My mistake. Now I got it ;-)
Changing the above things made the trick.
Conclusion: It works. But you are right, in the debugger we can see that it runs through felt a thousand times. A better approach probably would be an special functionality inside of the report control, like you do with filter or sort.
But for now I'm happy with that.
Thank you David for your help and thoughts about this
regards
Antonio
Hi David,
here is an simple sample app that shows the problem.
Thanks
Antonio
Hi David,
i can not figure out why this does not work.
Here is an Screenshot of the Result it produces including some Console Warnings with the AB-Function Results.
This is the report html part:
This is one the "ReportIsGroupToday" Function:
Any Idea why the headers are still shown, even if the results are false?
regards
Antonio
I use this:
ReportIsGroupToday and ReportIsGroupTomorrow are also AB-Functions with Index Parameter and boolean return
But this doesn't work...
Hi David,
I'm quite there, just one last question to complete this functionality...
Is it possible to call existing functions with return result inside of other functions?
Example:
Yes, but the main problem here is...
while the report goes through the records, i need to know not only current record details, but also the previous one to check against them.
Is this possible?
Hi David,
the sample looks nice. I think it could be an solution. What i need in that case is the change of the record value in order to show the header or not. Here an Sample Code:
Is that possible to achieve? I think something about a Script Execution inside of the ng-if (like in the input ng-change="$parent.ReportCountChange(Record.ID)), where i can check the old record.expiration against current record expiration?
The Problem is, that i need as much headers as groups and that is variable, depending on the records in data.
The case is, i have a list of products with an expiration date, the groupfield is this date. I may have 2 products expiring tomorrow,
three in a week, 10 in two weeks... and so on.
I hope this is clearer?
Edit 1:
If grouping is not possible...
An other idea could be, that instead of grouping i use an filter mechanism. A select control with two pregiven filters:
default (today, tomorrow and the next day), only today, the rest of the select would be filled with the dates from the whole data (without today). Selecting one, filters the report to the given value, so that only records with that date are shown. That would be a possible
solution to show the data.
Hi there,
I've seen that it is possible to order data in report control.
I would need to group data, means i like to have a group header for every records that match that group.
Example: Group by Date
01-02-2017 (Header)
Record 1 (Row)
Record 3 (Row)
Record 6 (Row)
15-02-2017 (Header)
Record 2 (Row)
Record 5 (Row)
Record 9 (Row)
20-02-2017 (Header)
Record 4 (Row)
Record 7 (Row)
Record 8 (Row)
and so on
Is that somehow possible?
regards
Antonio
Edit: Solution
Here is an ready solution sample on how we can group records and show it in the report control with an group header.
Definition of Group:
1. Logical sorting. Means, first sort the data by a sort criteria
2. Show the sorted record under a given group name/description: Header
This sample:
Uses an usually german datestr DD.MM.YYYY as sort criteria. That means, that i had to convert it into something
sortable. For this there are some converting routines in the sample that first makes an JS-Date from the string, and
then casts the value into an number value that is used for the sorting.
Sorting: A bubblesort algorithm is used. See, that in the algorithm itself i have implemented the above described conversion
for the datestring before the comparing could be done.
The code is commented, so it shouldn't be too hard to customize for other needs.
The report control is not touched too much, just to check if a group header shall be shown.
The sorting and setting of group header is done completely with Javascript in the data array.
Aah, yes. I used the debug only when i wanted to really debug something. I didn't see thats it saves my changes first...
Works nice, no need to change things (but my own behaviour ;-) )
Then it's really cool that the build, rebuilds also the icons and splash
Thanks and regards
Antonio
Hi David,
i don't think this was an good idea. The build process is needed to run also the app after every change. Processing also the icons now, increases the build time, means longer wait before execute...
Anyway, despite your current change the run and build functions in AB could be improved for a better workflow.
What about following workflow ideas:
1. Clicking on run button saves the project, builds it (build without icons and splash screen) and runs the app
2. Clicking on build button, builds it including the icons and splash screen
What do you think?
regards
Antonio
Hi David,
thats strange. I've did that before, as i read it in a post prior to ask, and it didn't work. I've tried it again after your answer.
Now it works.
Thanks
Antonio
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.