Code Monkey home page Code Monkey logo

Comments (4)

javier-godoy avatar javier-godoy commented on July 26, 2024 1

It seems the same issue fixed in POI 5.2.3 (quietSet instead of trySet).

@mlopezFC Should we upgrade the dependency version?

<poi.version>5.2.2</poi.version>

from gridexporteraddon.

mlopezFC avatar mlopezFC commented on July 26, 2024

Can you provide sample code to reproduce the issue?
Thanks for the feedback!

from gridexporteraddon.

allenvpn312 avatar allenvpn312 commented on July 26, 2024

Yes, of course.

` taxJournalGrid = new Grid<>();
taxJournalGrid.addThemeVariants(GridVariant.LUMO_COLUMN_BORDERS, GridVariant.LUMO_ROW_STRIPES,
GridVariant.LUMO_WRAP_CELL_CONTENT);

	taxJournalGrid.setSelectionMode(SelectionMode.NONE);
	taxJournalGrid.setMultiSort(true);

	taxJournalGrid.addColumn(TaxJournal::getEmployeeName).setHeader("Employee").setAutoWidth(true)
			.setSortable(true);
	Column<TaxJournal> employeeNo = taxJournalGrid.addColumn(journal -> journal.getEmployee().getEmployeeNo())
			.setHeader("Employee No").setAutoWidth(true).setSortable(true);
	employeeNo.setVisible(false);
	taxJournalGrid.addColumn(TaxJournal::getCheckNo).setHeader("Check No").setAutoWidth(true).setSortable(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.DEFAULT_DATE_FORMAT.format(journal.getPaymentDate()))
			.setHeader("Date").setAutoWidth(true).setSortable(true);
	Column<TaxJournal> totalHours = taxJournalGrid.addColumn(TaxJournal::getTotalHours).setHeader("Total Hours")
			.setAutoWidth(true).setSortable(true);
	totalHours.setVisible(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getGrossIncome()))
			.setHeader("Gross Income").setAutoWidth(true).setSortable(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getFedIncomeTax()))
			.setHeader("FED Tax").setAutoWidth(true).setSortable(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getSocialSecurity()))
			.setHeader("Social Security").setAutoWidth(true).setSortable(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getMedicare()))
			.setHeader("Medicare").setAutoWidth(true).setSortable(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getStateIncomeTax()))
			.setHeader("State Tax").setAutoWidth(true).setSortable(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getStateOtherTax()))
			.setHeader("State Other").setAutoWidth(true).setSortable(true);
	Column<TaxJournal> localTax = taxJournalGrid
			.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getLocalOtherTax()))
			.setHeader("Local Tax").setAutoWidth(true).setSortable(true);
	localTax.setVisible(true);
	taxJournalGrid.addColumn(journal -> FormatUtils.US_CURRENCY_FORMAT.format(journal.getNetIncome()))
			.setHeader("Net Pay").setAutoWidth(true).setSortable(true);

	GridExporter<TaxJournal> exporter = GridExporter.createFor(taxJournalGrid);
	exporter.setAutoSizeColumns(true);
	exporter.setButtonsAlignment(ButtonsAlignment.LEFT);
	exporter.setTitle("Employee Payroll Detail Report");
	exporter.setCsvExportEnabled(true);
	exporter.setExcelExportEnabled(true);
	exporter.setPdfExportEnabled(false);
	exporter.setDocxExportEnabled(false);

	GridHelper.setHidingToggleCaption(employeeNo, "Employee No.");
	GridHelper.setHidingToggleCaption(totalHours, "Total Hours");
	GridHelper.setHidingToggleCaption(localTax, "Local/Other Taxes");

	GridHelper.setColumnToggleVisible(taxJournalGrid, isVisible());

	taxJournalGrid.setItems(taxJournalProvider);`

from gridexporteraddon.

allenvpn312 avatar allenvpn312 commented on July 26, 2024

from gridexporteraddon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.