hello
how can i add custom function to my sti report ?
thanks
Add Custom Function to Sti report
-
- Posts: 19
- Joined: Wed May 18, 2016 9:55 am
-
- Posts: 19
- Joined: Wed May 18, 2016 9:55 am
load stimual designer report from josn string in angular 4
hello ,
how can load stimual designer report from josn string in angular 4
the error occur in this method SetData
SetData() {
this.designer = new Stimulsoft.Designer.StiDesigner(this.options, 'StiDesigner', false);
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.report.load(this.josnData);
this.designer.renderHtml('designer');
}
and this mehtod call after SaveData()
SaveData() {
var json = this.designer.report.saveDocumentToJsonString();
this.josnData = json;
}
Please see all code
import { Component } from '@angular/core';
import { ViewEncapsulation } from '@angular/core';
import { Headers} from '@angular/http';
import {Observable}from 'rxjs';
import {Injectable} from '@angular/core';
import { Http } from '@angular/http';
declare var Stimulsoft: any;
@Injectable()
@Component({
selector: 'app-root',
template: `<div>
<h2>Stimulsoft Reports.JS Designer</h2>
<div id="designer"></div>
</div>
<button (click)="SaveData()">SaveData</button><button (click)="SetData()">SetData</button>
`
})
export class AppComponent {
options: any;
designer: any;
ngOnInit() {
this.options = new Stimulsoft.Designer.StiDesignerOptions();
this.options.appearance.fullScreenMode = false;
this.designer = new Stimulsoft.Designer.StiDesigner(this.options, 'StiDesigner', false);
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.renderHtml('designer');
}
constructor(private _http: Http) {
}
josnData:string;
SaveData() {
var json = this.designer.report.saveDocumentToJsonString();
this.josnData = json;
}
SetData() {
this.designer = new Stimulsoft.Designer.StiDesigner(this.options, 'StiDesigner', false);
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.report.load(this.josnData);
this.designer.renderHtml('designer');
}
}
how can load stimual designer report from josn string in angular 4
the error occur in this method SetData
SetData() {
this.designer = new Stimulsoft.Designer.StiDesigner(this.options, 'StiDesigner', false);
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.report.load(this.josnData);
this.designer.renderHtml('designer');
}
and this mehtod call after SaveData()
SaveData() {
var json = this.designer.report.saveDocumentToJsonString();
this.josnData = json;
}
Please see all code
import { Component } from '@angular/core';
import { ViewEncapsulation } from '@angular/core';
import { Headers} from '@angular/http';
import {Observable}from 'rxjs';
import {Injectable} from '@angular/core';
import { Http } from '@angular/http';
declare var Stimulsoft: any;
@Injectable()
@Component({
selector: 'app-root',
template: `<div>
<h2>Stimulsoft Reports.JS Designer</h2>
<div id="designer"></div>
</div>
<button (click)="SaveData()">SaveData</button><button (click)="SetData()">SetData</button>
`
})
export class AppComponent {
options: any;
designer: any;
ngOnInit() {
this.options = new Stimulsoft.Designer.StiDesignerOptions();
this.options.appearance.fullScreenMode = false;
this.designer = new Stimulsoft.Designer.StiDesigner(this.options, 'StiDesigner', false);
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.renderHtml('designer');
}
constructor(private _http: Http) {
}
josnData:string;
SaveData() {
var json = this.designer.report.saveDocumentToJsonString();
this.josnData = json;
}
SetData() {
this.designer = new Stimulsoft.Designer.StiDesigner(this.options, 'StiDesigner', false);
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.report.load(this.josnData);
this.designer.renderHtml('designer');
}
}
-
- Posts: 6247
- Joined: Tue Mar 20, 2018 5:34 am
Re: Add Custom Function to Sti report
Hello,
You can find samples at the following link:
https://github.com/stimulsoft/Samples-JS
Thank you.
You can find samples at the following link:
https://github.com/stimulsoft/Samples-JS
Thank you.