jaspergo

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

README

Jasper Converter

This is a Jasper report converter from version 6 JRXML to version 7 JRXML files using GO.

Description

This tool converts Jasperreport v6 JRXML files into Jasperreport v7 files.

It can convert either a single file or all files in a directory. The converted files are stored in the destination directory preserving the directory structure of the source directory.

To convert a single JRXML file, use following command

> bin/darwin_arm64/convert -f tests6x/OrphanFooterReport.36.jrxml -d output 
Load and parsing JRXML ... tests6x/OrphanFooterReport.36.jrxml

API

You can use the API of JasperGO to call it inside an application. Either use the path as input

ConvertFileToPath("./test", "./output")

or by providing the corresponding io.Reader structure.

To convert a single file use

var r io.Reader
s,_:=ConvertReader("OrphanFooterReport.36.jrxml", r)
... work on output s

Documentation

Overview

* Copyright 2026 Thorsten A. Knieling * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *

* Copyright 2026 Thorsten A. Knieling * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *

* Copyright 2026 Thorsten A. Knieling * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDirectoryToPath

func ConvertDirectoryToPath(path, destination string) error

ConvertDirectoryToPath converts all JRXML v6 files in a directory into JRXML v7 files stored in destination path preserving the directory structure. If parsing is fail an error is returned.

func ConvertFileToPath

func ConvertFileToPath(file, destination string) error

ConvertFileToPath converts a JRXML v6 file into a JRXML v7 file stored in destination path

func ConvertNode

func ConvertNode(fileName string, m *xmlquery.Node) error

ConvertNode converts a JRXML v6 DOM node into a JRXML v7 DOM node The fileName is used as reference inside the JRXML file working with references. If parsing is fail an error is returned.

func ConvertReader

func ConvertReader(fileReference string, r io.Reader) (string, error)

ConvertReader converts a JRXML v6 from reader and returns the converted content as string The fileReference is as reference used inside the JRXML file working with references.

func InitLogLevelWithFile

func InitLogLevelWithFile(fileName string) (err error)

Types

This section is empty.

Directories

Path Synopsis
cmd
convert command
* Copyright 2026 Thorsten A. Knieling * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright 2026 Thorsten A. Knieling * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL