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

Dynamic report export #1400

Closed
yamelsenih opened this issue Oct 20, 2017 · 12 comments
Closed

Dynamic report export #1400

yamelsenih opened this issue Oct 20, 2017 · 12 comments

Comments

@yamelsenih
Copy link
Member

Currently just exist some file export from report (See pic)
screenshot_20171019_195559
My proposal is add a abstract class for handle standard export and it can be extended for add more format to default list.

It allows create more custom formats for export from report view.

@yamelsenih
Copy link
Member Author

For use and documentation you can see: http://wiki.adempiere.net/Spin_Contribution:_FR:_Export_Format_From_Report

Best Regard

@e-Evolution
Copy link
Contributor

e-Evolution commented Oct 29, 2017

@yamelsenih This commit break the back compatibility not exit the method , this cause that Mexico Localization to generate CFDI electronic invoice

public boolean createXML (File file)

public boolean createXML (Writer writer)

a new functionality not should break the back compatibility

Please fix or revert.

@yamelsenih
Copy link
Member Author

Hi Victor, I can add this method, but I was assured that all core functionality is the same. No problem I will add to it

@e-Evolution
Copy link
Contributor

yes , not should be remove , you can implement new implement but not should remove.

I saw other methods was removed

public boolean createDelimitedFile (Writer writer, char delimiter, Language language, boolean printHeader)

private void createCSVvalue (StringBuffer sb, char delimiter, String content)

@yamelsenih
Copy link
Member Author

You can try use the new custom format, is more easy

@yamelsenih
Copy link
Member Author

private void createCSVvalue (StringBuffer sb, char delimiter, String content) a private method is not used for other, it should not add for back compatibility.

yamelsenih added a commit that referenced this issue Oct 29, 2017
yamelsenih added a commit that referenced this issue Oct 30, 2017
@e-Evolution
Copy link
Contributor

This change continue break the back compatibility.

the original method was with 2 parameters , some customization launch this error org.compiere.print.ReportEngine.createXLSX(Ljava/io/File;Lorg/compiere/util/Language;)V

Again a new functionality not should change public methods

/**
* Create Excel file
* @param outFile output file
* @param language
* @throws Exception if error
*/
public void createXLS(File outFile, Language language)
throws Exception
{
PrintDataExcelExporter exp = new PrintDataExcelExporter(getPrintData(), getPrintFormat());
exp.export(outFile, language);
}

public void createXLSX(File outFile, Language language)
throws Exception
{
	PrintDataExcelExporter exp = new PrintDataExcelExporter(getPrintData(), getPrintFormat(), true);
	exp.export(outFile, language);
}

@yamelsenih
Copy link
Member Author

Hi @e-Evolution please test it for close

@yamelsenih
Copy link
Member Author

When exists two formats with the same extension always is selected first instead real user choice

@e-Evolution
Copy link
Contributor

@yamelsenih would you fix the issue , this change damaged the export Print format Definition.

In commit 23e90f2

this code was removed

// BR [1019]
if (m_IsCanLoad) {
cboType.appendItem("arxml" + " - " + Msg.getMsg(Env.getCtx(), "Adempiere Report Definition"), "arxml");
}

@yamelsenih
Copy link
Member Author

@yamelsenih
Copy link
Member Author

Hi @e-Evolution please test it. Best regards

e-Evolution pushed a commit to e-Evolution/adempiere that referenced this issue Mar 12, 2018
e-Evolution pushed a commit to e-Evolution/adempiere that referenced this issue Mar 12, 2018
e-Evolution pushed a commit to e-Evolution/adempiere that referenced this issue Mar 12, 2018
e-Evolution pushed a commit to e-Evolution/adempiere that referenced this issue Mar 12, 2018
e-Evolution pushed a commit to e-Evolution/adempiere that referenced this issue Mar 12, 2018
e-Evolution pushed a commit to e-Evolution/adempiere that referenced this issue Mar 12, 2018
e-Evolution pushed a commit to e-Evolution/adempiere that referenced this issue Mar 12, 2018
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

2 participants