Page 1 of 1

DateTime Issue

Posted: Thu Mar 12, 2020 8:49 pm
by BCS
I have a report with two columns, one for date and one for time.

The data comes to me in JSON format as follows:

Code: Select all

[
        {
            "effectiveDateTime": "2020-01-22 04:45"
        },
        {
            "effectiveDateTime": "2020-01-22 09:45"
        },
        {
            "effectiveDateTime": "2020-01-23 13:15"
        }
]
When I set the text as Custom and use the mask "MM/dd/yyyy" for the date column and "hh:mm tt" for the time column, inside the editor via preview it displays correctly. However, when I try to load it via javascript (Vue)

Code: Select all

ShowReport(reportName, data, dataSetName) {
				var viewer = new window.Stimulsoft.Viewer.StiViewer(this.SetupOptions(), 'StiViewer', false);
				var report = new window.Stimulsoft.Report.StiReport();
				var dataset = new window.Stimulsoft.System.Data.DataSet(dataSetName)

				dataset.readJson(data)

				report.loadFile(reportName);
				report.dictionary.databases.clear()
				report.regData(dataset.dataSetName, dataSetName, dataset)
				report.dictionary.synchronize()

				viewer.report = report;
				viewer.renderHtml('viewer');
			},
I have also tried using General format and using the .ToString(**format**) and Format(**format***) method in the expression which again works in the editor but not in the runtime environment via Javascript.

The built in formats don't satisfy the customer's needs, they want columns to line up with zero padded dates and times.

Also, is there not an updated version of the Designer for Mac, I can't seem to find one past 2019.3.7. When I try to update it wants to download the exe version which is useless for me.
Enduser JS Client
Enduser JS Client
Screen Shot 2020-03-12 at 3.36.13 PM.png (7.35 KiB) Viewed 1375 times
Editor
Editor
Screen Shot 2020-03-12 at 3.35.56 PM.png (34.57 KiB) Viewed 1376 times

Re: DateTime Issue

Posted: Sun Mar 15, 2020 9:56 pm
by Lech Kulikowski
Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.