Page 1 of 1

2020.3.1 Symbol Problem

Posted: Sat Jun 13, 2020 11:36 am
by scx0074
TIM截图20200613192428.png
TIM截图20200613192428.png (12.52 KiB) Viewed 1442 times
The new version of Symbol caused our code to go wrong.
How to solve the conflict?

Re: 2020.3.1 Symbol Problem

Posted: Sat Jun 13, 2020 11:39 am
by scx0074
1 Error return
2 Normal return

stimulsoft.reports.js

Re: 2020.3.1 Symbol Problem

Posted: Wed Jun 17, 2020 7:20 pm
by scx0074
The problem has been solved
TIM截图20200618031814.png
TIM截图20200618031814.png (38.54 KiB) Viewed 1397 times
Judgment should be made in the environment supporting ES6,Conflict prevention

Code: Select all

Ot(l, o, d, e)    Change to     l.hasOwnProperty(o)||Ot(l, o, d, e)

Re: 2020.3.1 Symbol Problem

Posted: Wed Jun 17, 2020 7:38 pm
by scx0074
It is hoped to add the following functions to the system to support data source search without creating data relationship, so as to facilitate multi-dimensional data

Code: Select all

Stimulsoft.Report.Dictionary.StiFunctions.addFunction(
	"custom",
	"",
	"search",
	"Find field contents based on index in specified data source", "", "", "Return to specified content",
	[Object,String,String,String],
	["this", "source", "index", "field"],
	["Reference this object", "Data source name", "Specify index fields","Field information"],
	function(that, source, index, field) {
		var dataTable = {};
		for (var x = 0; x < that.dataSources.list.length; x++) {
			if (that.dataSources.list[x].name == source) {
				dataTable = that.dataSources.list[x].dataTable;
				break
			}
		}
		var columnIndex = null;
		var relationIndex = null;
		for (var y = 0; y < dataTable.columns.list.length; y++) {
			if (dataTable.columns.list[y].columnName == field) {
				columnIndex = y
			} else {
				if (dataTable.columns.list[y].columnName == "relationId") {
					relationIndex = y
				}
			}
		}
		var record = "";
		for (var z = 0; z < dataTable.rows.list.length; z++) {
			var itemArray = dataTable.rows.list[z].itemArray;
			if (itemArray[relationIndex] == index) {
				record = itemArray[columnIndex];
				break
			}
		}
		return record
	}
);
usage method {search(this,"bor_supplierData",bor.supplierData,"name")}

These are just my thoughts,Believe that developers have better solutions

Re: 2020.3.1 Symbol Problem

Posted: Fri Jun 19, 2020 9:41 pm
by Lech Kulikowski
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?

Thank you.