Page 1 of 1

Add Custom Function to Sti report

Posted: Tue Nov 07, 2017 9:40 am
by Abed Hamodi
hello
how can i add custom function to my sti report ?

thanks

Re: Add Custom Function to Sti report

Posted: Tue Nov 07, 2017 11:12 am
by Alex K.
Hello,

please see the following video:
https://www.youtube.com/watch?v=TEYuQmia9IY

Thank you.

load stimual designer report from josn string in angular 4

Posted: Mon Sep 03, 2018 5:36 pm
by Abed Hamodi
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');

}




}

Re: Add Custom Function to Sti report

Posted: Wed Sep 05, 2018 6:51 am
by Lech Kulikowski
Hello,

You can find samples at the following link:
https://github.com/stimulsoft/Samples-JS

Thank you.