Skip to content

Commit 33ad468

Browse files
committed
Updated examples and documents
1 parent 9b7e262 commit 33ad468

File tree

90 files changed

+114
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+114
-427
lines changed

Examples/ApiExamples/Java/src/main/java/Examples/ExReportingEngine.java

+42-45
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Examples/Data/Reporting engine template - Data table (base64).txt

-1
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Examples/Data/Reporting engine template - base64 image.txt

-1
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Examples/DocsExamples/Java/src/main/java/DocsExamples/LINQ_Reporting_Engine/BaseOperations.java

+24-22
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
package DocsExamples.LINQ_Reporting_Engine;
22

33
import DocsExamples.DocsExamplesBase;
4-
import DocsExamples.LINQ_Reporting_Engine.Helpers.Common;
5-
import DocsExamples.LINQ_Reporting_Engine.Helpers.Data_Source_Objects.*;
4+
import TestData.Common;
5+
import TestData.TestBuilders.ColorItemTestBuilder;
6+
import TestData.TestClasses.ClientTestClass;
7+
import TestData.TestClasses.ColorItemTestClass;
8+
import TestData.TestClasses.ManagerTestClass;
9+
import TestData.TestClasses.SenderTestClass;
610
import org.testng.annotations.Test;
711
import com.aspose.words.Document;
812
import com.aspose.words.DocumentBuilder;
913
import com.aspose.words.ReportingEngine;
14+
15+
import java.awt.*;
1016
import java.util.ArrayList;
11-
import java.awt.Color;
1217

1318
@Test
1419
public class BaseOperations extends DocsExamplesBase
@@ -22,7 +27,9 @@ public void helloWorld() throws Exception
2227

2328
builder.write("<<[sender.getName()]>> says: <<[sender.getMessage()]>>");
2429

25-
Sender sender = new Sender(); { sender.setName("LINQ Reporting Engine"); sender.setMessage("Hello World"); }
30+
SenderTestClass sender = new SenderTestClass();
31+
sender.setName("LINQ Reporting Engine");
32+
sender.setMessage("Hello World");
2633

2734
ReportingEngine engine = new ReportingEngine();
2835
engine.buildReport(doc, sender, "sender");
@@ -35,10 +42,10 @@ public void helloWorld() throws Exception
3542
public void singleRow() throws Exception
3643
{
3744
//ExStart:SingleRow
38-
Document doc = new Document(getMyDir() + "Reporting engine template - Table row.docx");
45+
Document doc = new Document(getMyDir() + "Reporting engine template - Table row (Java).docx");
3946

4047
ReportingEngine engine = new ReportingEngine();
41-
engine.getKnownTypes().add(Manager.class);
48+
engine.getKnownTypes().add(ManagerTestClass.class);
4249
engine.buildReport(doc, Common.getManagers(), "Managers");
4350

4451
doc.save(getArtifactsDir() + "ReportingEngine.SingleRow.docx");
@@ -49,10 +56,10 @@ public void singleRow() throws Exception
4956
public void commonMasterDetail() throws Exception
5057
{
5158
//ExStart:CommonMasterDetail
52-
Document doc = new Document(getMyDir() + "Reporting engine template - Common master detail.docx");
59+
Document doc = new Document(getMyDir() + "Reporting engine template - Common master detail (Java).docx");
5360

5461
ReportingEngine engine = new ReportingEngine();
55-
engine.getKnownTypes().add(Manager.class);
62+
engine.getKnownTypes().add(ManagerTestClass.class);
5663
engine.buildReport(doc, Common.getManagers(), "managers");
5764

5865
doc.save(getArtifactsDir() + "ReportingEngine.CommonMasterDetail.docx");
@@ -63,10 +70,10 @@ public void commonMasterDetail() throws Exception
6370
public void conditionalBlocks() throws Exception
6471
{
6572
//ExStart:ConditionalBlocks
66-
Document doc = new Document(getMyDir() + "Reporting engine template - Table row conditional blocks.docx");
73+
Document doc = new Document(getMyDir() + "Reporting engine template - Table row conditional blocks (Java).docx");
6774

6875
ReportingEngine engine = new ReportingEngine();
69-
engine.getKnownTypes().add(Client.class);
76+
engine.getKnownTypes().add(ClientTestClass.class);
7077
engine.buildReport(doc, Common.getClients(), "clients");
7178

7279
doc.save(getArtifactsDir() + "ReportingEngine.ConditionalBlock.docx");
@@ -77,20 +84,15 @@ public void conditionalBlocks() throws Exception
7784
public void settingBackgroundColor() throws Exception
7885
{
7986
//ExStart:SettingBackgroundColor
80-
Document doc = new Document(getMyDir() + "Reporting engine template - Background color.docx");
81-
82-
ArrayList<BackgroundColor> colors = new ArrayList<>();
83-
{
84-
colors.add(new BackgroundColor()); {
85-
colors.get(0).setName("Black"); colors.get(0).setColor(Color.BLACK);}
86-
colors.add(new BackgroundColor()); {
87-
colors.get(1).setName("Red"); colors.get(1).setColor(new Color((255), (0), (0)));}
88-
colors.add(new BackgroundColor()); {
89-
colors.get(2).setName("Empty"); colors.get(2).setColor(null);}
90-
}
87+
Document doc = new Document(getMyDir() + "Reporting engine template - Background color (Java).docx");
88+
89+
ArrayList<ColorItemTestClass> colors = new ArrayList<>();
90+
colors.add(new ColorItemTestBuilder().withColor("Black", Color.BLACK).build());
91+
colors.add(new ColorItemTestBuilder().withColor("Red", new Color((255), (0), (0))).build());
92+
colors.add(new ColorItemTestBuilder().withColor("Empty", null).build());
9193

9294
ReportingEngine engine = new ReportingEngine();
93-
engine.getKnownTypes().add(BackgroundColor.class);
95+
engine.getKnownTypes().add(ColorItemTestClass.class);
9496
engine.buildReport(doc, colors, "Colors");
9597

9698
doc.save(getArtifactsDir() + "ReportingEngine.BackColor.docx");

Examples/DocsExamples/Java/src/main/java/DocsExamples/LINQ_Reporting_Engine/BuildOptions.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package DocsExamples.LINQ_Reporting_Engine;
22

33
import DocsExamples.DocsExamplesBase;
4-
import DocsExamples.LINQ_Reporting_Engine.Helpers.Common;
5-
import DocsExamples.LINQ_Reporting_Engine.Helpers.Data_Source_Objects.Manager;
4+
import TestData.Common;
5+
import TestData.TestClasses.ManagerTestClass;
66
import org.testng.annotations.Test;
77
import com.aspose.words.Document;
88
import com.aspose.words.ReportingEngine;
@@ -15,10 +15,10 @@ public class BuildOptions extends DocsExamplesBase
1515
public void removeEmptyParagraphs() throws Exception
1616
{
1717
//ExStart:RemoveEmptyParagraphs
18-
Document doc = new Document(getMyDir() + "Reporting engine template - Remove empty paragraphs.docx");
18+
Document doc = new Document(getMyDir() + "Reporting engine template - Remove empty paragraphs (Java).docx");
1919

2020
ReportingEngine engine = new ReportingEngine(); { engine.setOptions(ReportBuildOptions.REMOVE_EMPTY_PARAGRAPHS); }
21-
engine.getKnownTypes().add(Manager.class);
21+
engine.getKnownTypes().add(ManagerTestClass.class);
2222
engine.buildReport(doc, Common.getManagers(), "Managers");
2323

2424
doc.save(getArtifactsDir() + "ReportingEngine.RemoveEmptyParagraphs.docx");

Examples/DocsExamples/Java/src/main/java/DocsExamples/LINQ_Reporting_Engine/Charts.java

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
package DocsExamples.LINQ_Reporting_Engine;
22

33
import DocsExamples.DocsExamplesBase;
4-
import DocsExamples.LINQ_Reporting_Engine.Helpers.Data_Source_Objects.Contract;
5-
import DocsExamples.LINQ_Reporting_Engine.Helpers.Data_Source_Objects.Manager;
4+
import TestData.Common;
5+
import TestData.TestClasses.ContractTestClass;
6+
import TestData.TestClasses.ManagerTestClass;
67
import org.testng.annotations.Test;
78
import com.aspose.words.Document;
89
import com.aspose.words.ReportingEngine;
9-
import DocsExamples.LINQ_Reporting_Engine.Helpers.Common;
10-
11-
import java.awt.*;
12-
import java.time.LocalDate;
13-
import java.util.Date;
1410

1511
@Test
1612
public class Charts extends DocsExamplesBase
@@ -19,10 +15,10 @@ public class Charts extends DocsExamplesBase
1915
public void createBubbleChart() throws Exception
2016
{
2117
//ExStart:BubbleChart
22-
Document doc = new Document(getMyDir() + "Reporting engine template - Bubble chart.docx");
18+
Document doc = new Document(getMyDir() + "Reporting engine template - Bubble chart (Java).docx");
2319

2420
ReportingEngine engine = new ReportingEngine();
25-
engine.getKnownTypes().add(Manager.class);
21+
engine.getKnownTypes().add(ManagerTestClass.class);
2622
engine.buildReport(doc, Common.getManagers(), "managers");
2723

2824
doc.save(getArtifactsDir() + "ReportingEngine.CreateBubbleChart.docx");
@@ -33,10 +29,10 @@ public void createBubbleChart() throws Exception
3329
public void setChartSeriesNameDynamically() throws Exception
3430
{
3531
//ExStart:SetChartSeriesNameDynamically
36-
Document doc = new Document(getMyDir() + "Reporting engine template - Chart.docx");
32+
Document doc = new Document(getMyDir() + "Reporting engine template - Chart (Java).docx");
3733

3834
ReportingEngine engine = new ReportingEngine();
39-
engine.getKnownTypes().add(Manager.class);
35+
engine.getKnownTypes().add(ManagerTestClass.class);
4036
engine.buildReport(doc, Common.getManagers(), "managers");
4137

4238
doc.save(getArtifactsDir() + "ReportingEngine.SetChartSeriesNameDynamically.docx");
@@ -47,10 +43,10 @@ public void setChartSeriesNameDynamically() throws Exception
4743
public void chartWithFilteringGroupingOrdering() throws Exception
4844
{
4945
//ExStart:ChartWithFilteringGroupingOrdering
50-
Document doc = new Document(getMyDir() + "Reporting engine template - Chart with filtering.docx");
46+
Document doc = new Document(getMyDir() + "Reporting engine template - Chart with filtering (Java).docx");
5147

5248
ReportingEngine engine = new ReportingEngine();
53-
engine.getKnownTypes().add(Contract.class);
49+
engine.getKnownTypes().add(ContractTestClass.class);
5450
engine.buildReport(doc, Common.getContracts(), "contracts");
5551

5652
doc.save(getArtifactsDir() + "ReportingEngine.ChartWithFilteringGroupingOrdering.docx");
@@ -61,10 +57,10 @@ public void chartWithFilteringGroupingOrdering() throws Exception
6157
public void pieChart() throws Exception
6258
{
6359
//ExStart:PieChart
64-
Document doc = new Document(getMyDir() + "Reporting engine template - Pie chart.docx");
60+
Document doc = new Document(getMyDir() + "Reporting engine template - Pie chart (Java).docx");
6561

6662
ReportingEngine engine = new ReportingEngine();
67-
engine.getKnownTypes().add(Manager.class);
63+
engine.getKnownTypes().add(ManagerTestClass.class);
6864
engine.buildReport(doc, Common.getManagers(), "managers");
6965

7066
doc.save(getArtifactsDir() + "ReportingEngine.PieChart.docx");
@@ -75,10 +71,10 @@ public void pieChart() throws Exception
7571
public void scatterChart() throws Exception
7672
{
7773
//ExStart:ScatterChart
78-
Document doc = new Document(getMyDir() + "Reporting engine template - Scatter chart.docx");
74+
Document doc = new Document(getMyDir() + "Reporting engine template - Scatter chart (Java).docx");
7975

8076
ReportingEngine engine = new ReportingEngine();
81-
engine.getKnownTypes().add(Contract.class);
77+
engine.getKnownTypes().add(ContractTestClass.class);
8278
engine.buildReport(doc, Common.getContracts(), "contracts");
8379

8480
doc.save(getArtifactsDir() + "ReportingEngine.ScatterChart.docx");

Examples/DocsExamples/Java/src/main/java/DocsExamples/LINQ_Reporting_Engine/Helpers/Common.java

-179
This file was deleted.

0 commit comments

Comments
 (0)