Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom reports #363

Closed
alensiljak opened this issue Jun 25, 2015 · 23 comments
Closed

Support for custom reports #363

alensiljak opened this issue Jun 25, 2015 · 23 comments

Comments

@alensiljak
Copy link

Similar to desktop application, users want to be able to create and use custom reports.

The display is HTML so a webView can be used to render reports.
Export option might also be handy.

@alensiljak
Copy link
Author

Initial implementation could be just the viewer for the already created reports. The reports are found in the Report_v1 table.
Template is the HTML content and the SQL is in SQLContent field.

@velmuruganc
Copy link
Contributor

@mistery , I use custom report very frequently and will pick this up after moving sms transaction feature to stable release.

@velmuruganc
Copy link
Contributor

@mistery, could you please tell me where i can add values like this "R.id.menu_reports". I want to use as "R.id.menu_custom_reports", but throws error "Error:(1065, 55) error: cannot find symbol variable menu_custom_reports"

@alensiljak
Copy link
Author

You should check strings.xml.

@velmuruganc
Copy link
Contributor

@mistery , thanks i got. Also I have completed the UI changes. Now learning the fragments to implement the report activity.

2017-12-18 06_36_01-android emulator - pixel_xl_api_27_5554

2017-12-18 06_36_36-android emulator - pixel_xl_api_27_5554

@alensiljak
Copy link
Author

You can have a look at a web browser activity/fragment. I think it is used a few places in the app already, like the intro or donations page. I think it would be the best to have an HTML output from custom reports and display it in a web browser activity.

@velmuruganc
Copy link
Contributor

@mistery, What is the use of adapters. Could you please give some idea in this?

@alensiljak
Copy link
Author

alensiljak commented Dec 18, 2017

Hi,
I would recommend reading (a lot) about any unclear parts of the code. Specifically:

As we are not in a rush to get the features out, it would be more preferrable to have the quality and maintainable code instead. That way other devs could easily jump in and modify the code in the future.
Also, please look at the existing code and try to follow any patterns set there. There is, of course, a lot of old code that should be updated with the changes in Java and Android but that is a fairly big task in itself.

You can try to use Google and Stack Overflow more to see the latest information regarding any Android concepts. Best of luck!

@velmuruganc
Copy link
Contributor

@mistery, Thanks for the link. I will go thru these topics.

I don't think, we can use the web content for custom report, bcz i dont see any way to inject the data into html content available in report table.

@alensiljak
Copy link
Author

What I had in mind is to use a templating engine. These, at least, are not in short supply:

If not, how else would you render custom reports to the user?

@velmuruganc
Copy link
Contributor

@mistery, It would be straight fwd to fetch the result of sql query and show the row/clmns thru views & adapter. This would be similar to how we shows the payee and other reports. May be I am wrong. Let me learn and explore the possible options.

@alensiljak
Copy link
Author

alensiljak commented Dec 18, 2017

You may be right. I don't use custom reports so I don't really know what exactly is required.
My understanding was that the custom reports are alredy stored as HTML templates.

If you look at the second comment on this issue, you'll see what I mean.

@Spoker
Copy link
Contributor

Spoker commented Dec 18, 2017

It would be great if custom reports worked the same as in the desktop version.
Don't forget that de sql output gets transformed through the lua script before being shown in the html. Also, some custom reports use javascript to show the results visually in a graph.

@alensiljak
Copy link
Author

Yes, that is the original purpose of this request. Not to have just any report but to utilise the custom reports that are stored within the database file, matching the desktop functionality as much as is possible with a mobile device. With HTML, this should be possible to an extent.

@velmuruganc
Copy link
Contributor

@mistery , App getting crashed when I call following line in my activity. It looks some issue with constructor. Could you please help me?

CustomReportAdapter reportAdapter = new CustomReportAdapter(this, getCustomReportCursor());

Following is the constructor in CustomReportAdapter,

public CustomReportAdapter(Context context, Cursor cursor) {
super(context, cursor, false);
}

@alensiljak
Copy link
Author

Can you at least tell me what the error is? I can not tell what the issue is just by looking at this code.

@velmuruganc
Copy link
Contributor

@Spoker, As of now, I could able to generate my own html page as a first step. Do you have any docs that explains how we should inject the sql output to html template?

image

@alensiljak
Copy link
Author

Please look into some of the libraries I shared earlier. Preferably Jinja, as it will fit into some other work that is going on in parallel.

@velmuruganc
Copy link
Contributor

One question. Do we need to call this as custom report or general report? Desktop version ref as general Report.

@alensiljak
Copy link
Author

Hm, it used to be custom reports at a time when this request was created. :)
I have not been following closely. The name "general reports" makes no sense to me, to be honest.
These are user-generated reports or custom reports and the name should indicate their purpose.
However, if that is the name in the desktop version, then so be it.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 15, 2024
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@luisdev luisdev removed the Stale label Mar 21, 2024
@luisdev
Copy link

luisdev commented Mar 21, 2024

This would still be a good feature, so I think it should stay open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants