FreeReportv0.9.0한국어

Frameworks and eGovFrame

Ready-made viewer and designer components for React, Vue 3, Svelte 5 and Angular, and an eGovFrame 4.3 (Spring, JSP, MyBatis) sample project to download.

The core works in any framework: create the viewer or designer when the component mounts and destroy it when it unmounts. Ready-made components are published on npm: @freereportjs/react, @freereportjs/vue (Vue 3), @freereportjs/svelte (Svelte 5) and @freereportjs/angular, each with a viewer and a designer. Install the core alongside the wrapper, for example npm i @freereportjs/core @freereportjs/react.

  • React: <FreeReportViewer> and <FreeReportDesigner>. The viewer ref is { viewer, report }; the designer takes onChange and onSave.
  • Vue: the viewer exposes viewer and report; the designer supports v-model:definition and emits change, update:definition and save.
  • Svelte: viewer.getViewer() / getReport() and designer.getDesigner(), or onReady.
  • Angular: <free-report-viewer> and <free-report-designer> (standalone). The designer emits (definitionChange), so [(definition)] works, and (save).

definition, data, params and zoom update the viewer in place; other props recreate it. Both components default to height: 100% with a 480px minimum.

// npm i @freereportjs/core @freereportjs/react
import { useRef, useState } from 'react';
import { FreeReportDesigner, FreeReportViewer, type ReportDefinition } from '@freereportjs/react';
import '@freereportjs/core/styles.css';

export function SalesReport({ definition, rows }) {
  const ref = useRef(null);   // { viewer, report }
  return <FreeReportViewer ref={ref} definition={definition} data={{ rows }} lang="ko" style={{ height: 720 }} />;
}

export function SalesDesigner({ initial, rows, save }) {
  const [def, setDef] = useState<ReportDefinition>(initial);
  return <FreeReportDesigner definition={def} data={{ rows }} onChange={setDef} onSave={save} />;
}

eGovFrame sample project

The sample is an eGovFrame 4.3 project (Spring 5.3, MyBatis, JDK 8+) that shows report viewing, printing, PDF and Excel and an output log. The server returns only the report definition and the data as JSON; layout, printing and files are made in the browser, with no report server, ActiveX or installer. For eGovFrame 3.x, change the imports and the groupId from org.egovframe.rte to egovframework.rte.

RouteReturnsDescription
GET /report/view.do?name=salesJSPViewer page (reportView.jsp)
GET /report/designer.do?name=salesJSPDesigner page (reportDesigner.jsp)
GET /report/def/{name}.doJSONReport definition: the copy saved in REPORT_DEF, or classpath:reports/{name}.json
POST /report/def/{name}.doJSONSaves the definition from the designer
GET /report/data/sales.doJSONReport data (Service → MyBatis)
POST /report/log.doJSONRecords the viewer onOutput event in REPORT_OUTPUT_LOG
GET /report/logs.doJSPThe latest 100 output log entries

Download the eGovFrame sample project (ZIP) eGovFrame 4.3 · Maven · JSP · MyBatis · HSQLDB — unzip and run mvn jetty:run (see README.md).