ReportBuilder

Inheritance: java.lang.Object

public class ReportBuilder

Provides methods intended to fill template with data using LINQ Reporting Engine.

Methods

MethodDescription
buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data)
buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, ReportBuilderOptions reportBuilderOptions)
buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, String dataSourceName)
buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)
buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object[] data, String[] dataSourceNames)
buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)
buildReport(String inputFileName, String outputFileName, int saveFormat, Object data)
buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, ReportBuilderOptions reportBuilderOptions)
buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, String dataSourceName)
buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)
buildReport(String inputFileName, String outputFileName, int saveFormat, Object[] data, String[] dataSourceNames)
buildReport(String inputFileName, String outputFileName, int saveFormat, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)
buildReport(String inputFileName, String outputFileName, Object data)Populates the template document with data from the specified source, generating a completed report.
buildReport(String inputFileName, String outputFileName, Object data, ReportBuilderOptions reportBuilderOptions)Populates the template document with data from the specified source, generating a completed report with additional options.
buildReport(String inputFileName, String outputFileName, Object data, String dataSourceName)Populates the template document with data from the specified source, generating a completed report with a named data source reference.
buildReport(String inputFileName, String outputFileName, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options.
buildReport(String inputFileName, String outputFileName, Object[] data, String[] dataSourceNames)Populates the template document with data from multiple sources, generating a completed report from the specified input and output file names.
buildReport(String inputFileName, String outputFileName, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)Populates the template document with data from multiple sources, generating a completed report with additional options.

buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data)

public static void buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data)

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStream
outputStreamjava.io.OutputStream
saveFormatint
datajava.lang.Object

buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, ReportBuilderOptions reportBuilderOptions)

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStream
outputStreamjava.io.OutputStream
saveFormatint
datajava.lang.Object
reportBuilderOptionsReportBuilderOptions

buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, String dataSourceName)

public static void buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, String dataSourceName)

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStream
outputStreamjava.io.OutputStream
saveFormatint
datajava.lang.Object
dataSourceNamejava.lang.String

buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStream
outputStreamjava.io.OutputStream
saveFormatint
datajava.lang.Object
dataSourceNamejava.lang.String
reportBuilderOptionsReportBuilderOptions

buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object[] data, String[] dataSourceNames)

public static void buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object[] data, String[] dataSourceNames)

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStream
outputStreamjava.io.OutputStream
saveFormatint
datajava.lang.Object[]
dataSourceNamesjava.lang.String[]

buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(InputStream inputStream, OutputStream outputStream, int saveFormat, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStream
outputStreamjava.io.OutputStream
saveFormatint
datajava.lang.Object[]
dataSourceNamesjava.lang.String[]
reportBuilderOptionsReportBuilderOptions

buildReport(String inputFileName, String outputFileName, int saveFormat, Object data)

public static void buildReport(String inputFileName, String outputFileName, int saveFormat, Object data)

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.String
outputFileNamejava.lang.String
saveFormatint
datajava.lang.Object

buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, ReportBuilderOptions reportBuilderOptions)

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.String
outputFileNamejava.lang.String
saveFormatint
datajava.lang.Object
reportBuilderOptionsReportBuilderOptions

buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, String dataSourceName)

public static void buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, String dataSourceName)

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.String
outputFileNamejava.lang.String
saveFormatint
datajava.lang.Object
dataSourceNamejava.lang.String

buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(String inputFileName, String outputFileName, int saveFormat, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.String
outputFileNamejava.lang.String
saveFormatint
datajava.lang.Object
dataSourceNamejava.lang.String
reportBuilderOptionsReportBuilderOptions

buildReport(String inputFileName, String outputFileName, int saveFormat, Object[] data, String[] dataSourceNames)

public static void buildReport(String inputFileName, String outputFileName, int saveFormat, Object[] data, String[] dataSourceNames)

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.String
outputFileNamejava.lang.String
saveFormatint
datajava.lang.Object[]
dataSourceNamesjava.lang.String[]

buildReport(String inputFileName, String outputFileName, int saveFormat, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(String inputFileName, String outputFileName, int saveFormat, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.String
outputFileNamejava.lang.String
saveFormatint
datajava.lang.Object[]
dataSourceNamesjava.lang.String[]
reportBuilderOptionsReportBuilderOptions

buildReport(String inputFileName, String outputFileName, Object data)

public static void buildReport(String inputFileName, String outputFileName, Object data)

Populates the template document with data from the specified source, generating a completed report.

Examples:

Shows how to populate document with data.


 public void buildReportData() throws Exception {
     // There is a several ways to populate document with data:
     String doc = getMyDir() + "Reporting engine template - If greedy (Java).docx";

     AsposeData obj = new AsposeData();
     {
         obj.setList(new ArrayList<>());
         {
             obj.getList().add("abc");
         }
     }

     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.1.docx", obj);
     ReportBuilderOptions options = new ReportBuilderOptions();
     options.setOptions(ReportBuildOptions.ALLOW_MISSING_MEMBERS);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.2.docx", obj, options);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.3.docx", SaveFormat.DOCX, obj);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.4.docx", SaveFormat.DOCX, obj, options);
 }

 public static class AsposeData
 {
     public ArrayList getList() { return mList; }; public void setList(ArrayList value) { mList = value; };

     private ArrayList mList;
 }
 

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.StringThe input file name.
outputFileNamejava.lang.StringThe output file name.
datajava.lang.ObjectA data source object.

buildReport(String inputFileName, String outputFileName, Object data, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(String inputFileName, String outputFileName, Object data, ReportBuilderOptions reportBuilderOptions)

Populates the template document with data from the specified source, generating a completed report with additional options.

Examples:

Shows how to populate document with data.


 public void buildReportData() throws Exception {
     // There is a several ways to populate document with data:
     String doc = getMyDir() + "Reporting engine template - If greedy (Java).docx";

     AsposeData obj = new AsposeData();
     {
         obj.setList(new ArrayList<>());
         {
             obj.getList().add("abc");
         }
     }

     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.1.docx", obj);
     ReportBuilderOptions options = new ReportBuilderOptions();
     options.setOptions(ReportBuildOptions.ALLOW_MISSING_MEMBERS);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.2.docx", obj, options);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.3.docx", SaveFormat.DOCX, obj);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportWithObject.4.docx", SaveFormat.DOCX, obj, options);
 }

 public static class AsposeData
 {
     public ArrayList getList() { return mList; }; public void setList(ArrayList value) { mList = value; };

     private ArrayList mList;
 }
 

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.StringThe input file name.
outputFileNamejava.lang.StringThe output file name.
datajava.lang.ObjectA data source object.
reportBuilderOptionsReportBuilderOptionsAdditional report build options.

buildReport(String inputFileName, String outputFileName, Object data, String dataSourceName)

public static void buildReport(String inputFileName, String outputFileName, Object data, String dataSourceName)

Populates the template document with data from the specified source, generating a completed report with a named data source reference.

Examples:

Shows how to populate document with data sources.


 public void buildReportDataSource() throws Exception
 {
     // There is a several ways to populate document with data sources:
     String doc = getMyDir() + "Report building.docx";

     MessageTestClass sender = new MessageTestClass("LINQ Reporting Engine", "Hello World");

     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.1.docx", sender, "s");
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.2.docx", new Object[] { sender }, new String[] { "s" });
     ReportBuilderOptions options = new ReportBuilderOptions();
     options.setOptions(ReportBuildOptions.ALLOW_MISSING_MEMBERS);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.3.docx", sender, "s", options);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.4.docx", SaveFormat.DOCX, sender, "s");
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.5.docx", SaveFormat.DOCX, sender, "s", options);
 }

 public static class MessageTestClass
 {
     public String getName() { return mName; }; public void setName(String value) { mName = value; };

     private String mName;
     public String getMessage() { return mMessage; }; public void setMessage(String value) { mMessage = value; };

     private String mMessage;

     public MessageTestClass(String name, String message)
     {
         setName(name);
         setMessage(message);
     }
 }
 

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.StringThe input file name.
outputFileNamejava.lang.StringThe output file name.
datajava.lang.ObjectA data source object.
dataSourceNamejava.lang.StringA name to reference the data source object in the template.

buildReport(String inputFileName, String outputFileName, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(String inputFileName, String outputFileName, Object data, String dataSourceName, ReportBuilderOptions reportBuilderOptions)

Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options.

Examples:

Shows how to populate document with data sources.


 public void buildReportDataSource() throws Exception
 {
     // There is a several ways to populate document with data sources:
     String doc = getMyDir() + "Report building.docx";

     MessageTestClass sender = new MessageTestClass("LINQ Reporting Engine", "Hello World");

     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.1.docx", sender, "s");
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.2.docx", new Object[] { sender }, new String[] { "s" });
     ReportBuilderOptions options = new ReportBuilderOptions();
     options.setOptions(ReportBuildOptions.ALLOW_MISSING_MEMBERS);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.3.docx", sender, "s", options);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.4.docx", SaveFormat.DOCX, sender, "s");
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.5.docx", SaveFormat.DOCX, sender, "s", options);
 }

 public static class MessageTestClass
 {
     public String getName() { return mName; }; public void setName(String value) { mName = value; };

     private String mName;
     public String getMessage() { return mMessage; }; public void setMessage(String value) { mMessage = value; };

     private String mMessage;

     public MessageTestClass(String name, String message)
     {
         setName(name);
         setMessage(message);
     }
 }
 

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.StringThe input file name.
outputFileNamejava.lang.StringThe output file name.
datajava.lang.ObjectA data source object.
dataSourceNamejava.lang.StringA name to reference the data source object in the template.
reportBuilderOptionsReportBuilderOptionsAdditional report build options.

buildReport(String inputFileName, String outputFileName, Object[] data, String[] dataSourceNames)

public static void buildReport(String inputFileName, String outputFileName, Object[] data, String[] dataSourceNames)

Populates the template document with data from multiple sources, generating a completed report from the specified input and output file names. This overload automatically determines the save format based on the output file extension.

Examples:

Shows how to populate document with data sources.


 public void buildReportDataSource() throws Exception
 {
     // There is a several ways to populate document with data sources:
     String doc = getMyDir() + "Report building.docx";

     MessageTestClass sender = new MessageTestClass("LINQ Reporting Engine", "Hello World");

     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.1.docx", sender, "s");
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.2.docx", new Object[] { sender }, new String[] { "s" });
     ReportBuilderOptions options = new ReportBuilderOptions();
     options.setOptions(ReportBuildOptions.ALLOW_MISSING_MEMBERS);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.3.docx", sender, "s", options);
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.4.docx", SaveFormat.DOCX, sender, "s");
     ReportBuilder.buildReport(doc, getArtifactsDir() + "LowCode.BuildReportDataSource.5.docx", SaveFormat.DOCX, sender, "s", options);
 }

 public static class MessageTestClass
 {
     public String getName() { return mName; }; public void setName(String value) { mName = value; };

     private String mName;
     public String getMessage() { return mMessage; }; public void setMessage(String value) { mMessage = value; };

     private String mMessage;

     public MessageTestClass(String name, String message)
     {
         setName(name);
         setMessage(message);
     }
 }
 

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.StringThe input file name.
outputFileNamejava.lang.StringThe output file name.
datajava.lang.Object[]An array of data source objects.
dataSourceNamesjava.lang.String[]An array of names to reference the data source objects within the template.

buildReport(String inputFileName, String outputFileName, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)

public static void buildReport(String inputFileName, String outputFileName, Object[] data, String[] dataSourceNames, ReportBuilderOptions reportBuilderOptions)

Populates the template document with data from multiple sources, generating a completed report with additional options. This overload automatically determines the save format based on the output file extension.

Parameters:

ParameterTypeDescription
inputFileNamejava.lang.StringThe input file name.
outputFileNamejava.lang.StringThe output file name.
datajava.lang.Object[]An array of data source objects.
dataSourceNamesjava.lang.String[]An array of names to reference the data source objects within the template.
reportBuilderOptionsReportBuilderOptionsAdditional report build options.