ccd6dbcb6a09864724a2ce5947e384dc54de9599
[portal/sdk.git] /
1 import {Component, OnInit, Input, Output, EventEmitter, OnDestroy} from '@angular/core';
2 import {HttpClient, HttpHeaders} from '@angular/common/http';
3 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
4 import {DefinitionSaveDialogComponent} from './definition-save-dialog/definition-save-dialog.component';
5 import {ActivatedRoute, Router} from '@angular/router';
6 import {environment} from '../../../../../../environments/environment';
7 import {DefinitionService} from './definition.service';
8 import {CdkDragDrop, moveItemInArray, transferArrayItem} from '@angular/cdk/drag-drop';
9 import {isInteger, toInteger} from '@ng-bootstrap/ng-bootstrap/util/util';
10
11 @Component({
12     selector: 'app-definition',
13     templateUrl: './definition.component.html',
14     styleUrls: ['./definition.component.css'],
15     providers: [NgbModal]
16 })
17 export class DefinitionComponent implements OnInit, OnDestroy {
18     showSpinner: boolean;
19     @Input() closable = true;
20     @Input('reportId') reportId1: string;
21     @Input('reportMode') reportMode: string;
22     @Output() outputReportType = new EventEmitter<any>();
23     finalPostObj = {};
24     finalGetObj = {};
25     isEdit: boolean;
26     reportId: number;
27     reportName: string;
28     reportDescription: string;
29     reportType: string;
30     dataSrc: string;
31     helpText: string;
32     reportDefinition: string;
33     pageSize: number;
34     hideFormFields: boolean;
35     maxRows: number;
36     colsFrozen: number;
37     gridAlign: string;
38     emptyMessage: string;
39     heightContainer: number;
40     widthContainer: number;
41     allowScheduler: boolean;
42     sizedByContent: boolean;
43     hideFormFields1: boolean;
44     hideChart: boolean;
45     hideReportData: boolean;
46     hideExcel: boolean;
47     hidePDF: boolean;
48     disableColumnSort: boolean;
49     runTimeFormNum: number;
50     reportTitle: string;
51     reportSubTitle: string;
52     oneTime: boolean;
53     hourly: boolean;
54     daily: boolean;
55     MonFri: boolean;
56     Weekly: boolean;
57     Monthly: boolean;
58     oneTime1: boolean;
59     hourly1: boolean;
60     daily1: boolean;
61     MonFri1: boolean;
62     Weekly1: boolean;
63     Monthly1: boolean;
64     displayArea: string;
65     definitionPostResponse1: any;
66     definitionPostResponse: any;
67     showDialog: boolean;
68     status: string;
69     message: string;
70     dashboardObj: any;
71     dashboardLayoutHTML: any;
72     pilotModalComponent: DefinitionSaveDialogComponent;
73     IncomingReportId: number;
74     displayOptionsArr: {}[] = [];
75
76     constructor(private _http: HttpClient, private _route: ActivatedRoute, private _definitionService: DefinitionService, private _router: Router) {
77         this.showSpinner = true;
78         this.IncomingReportId = -1;
79         this.dashboardObj = [];
80         this.dashboardLayoutHTML = '';
81         this.displayOptionsArr = [];
82     }
83
84     ngOnDestroy(): void {
85         if (this.reportMode == 'Copy') {
86             this.clearSession();
87         }
88     }
89
90     ngOnInit() {
91         sessionStorage.clear();
92         const myItem = localStorage.getItem('id');
93         localStorage.clear();
94         localStorage.setItem('id', myItem);
95         this.isEdit = true;
96         this.showDialog = false;
97         this.showSpinner = true;
98         this._route.params.subscribe(params => {
99             if (params['reportId'] !== undefined) {
100                 this.IncomingReportId = params['reportId'];
101                 this.reportId1 = params['reportId'];
102             }
103         });
104         if (this.IncomingReportId == -1 && this.reportMode == 'Create') {
105             this._definitionService.getDefinitionPageDetails(this.IncomingReportId, this.reportMode)
106                 .subscribe((response) => {
107                     this.finalGetObj = response;
108                     this.reportId = response['reportId'];
109                     this.reportName = response['reportName'];
110                     this.reportDescription = response['reportDescr'];
111                     this.reportType = response['reportType'];
112                     this.dataSrc = response['dbInfo'];
113                     this.helpText = response['formHelpText'];
114                     this.reportDefinition = response['repDefType'];
115                     this.pageSize = response['pageSize'];
116                     this.hideFormFields1 = response['hideFormFieldsAfterRun'];
117                     this.maxRows = response['maxRowsInExcelCSVDownload'];
118                     this.colsFrozen = response['frozenColumns'];
119                     this.gridAlign = response['dataGridAlign'];
120                     this.emptyMessage = response['emptyMessage'];
121                     if (response['dashboardLayoutJSON']) {
122                         this.dashboardObj = JSON.parse(response['dashboardLayoutJSON']);
123                         this.dashboardLayoutHTML = response['dashboardLayoutHTML'];
124                     }
125                     if (response['displayArea']) {
126                         for (let i = 0; i < response["displayArea"].length; i++) {
127                             if (response['displayArea'][i]['selected'] === true) {
128                                 this.displayArea = response['displayArea'][i]['name'];
129                             }
130                         }
131                     }
132                     this.heightContainer = response['dataContainerHeight'];
133                     this.widthContainer = response['dataContainerWidth'];
134                     this.allowScheduler = (response['allowScheduler'] == 'Y' ? true : false);
135                     this.sizedByContent = (response['sizedByContent'] == 'Y' ? true : false);
136                     this.displayOptionsArr = response['displayOptions'];
137                     if (this.displayOptionsArr !== null) {
138                         if (this.displayOptionsArr.length > 0) {
139                             for (let cont of this.displayOptionsArr) {
140                                 if (cont['name'] == 'HideFormFields') {
141                                     this.hideFormFields = cont['selected'];
142                                 }
143                                 if (cont['name'] == 'HideChart') {
144                                     this.hideChart = cont['selected'];
145                                 }
146                                 if (cont['name'] == 'HideReportData') {
147                                     this.hideReportData = cont['selected'];
148                                 }
149                                 if (cont['name'] == 'HideExcel') {
150                                     this.hideExcel = cont['selected'];
151                                 }
152                                 if (cont['name'] == 'HidePdf') {
153                                     this.hidePDF = cont['selected'];
154                                 }
155                             }
156                         }
157                     }
158                     this.disableColumnSort = response['runtimeColSortDisabled'];
159                     this.runTimeFormNum = response['numFormCols'];
160                     this.reportTitle = response['reportTitle'];
161                     this.reportSubTitle = response['reportSubTitle'];
162                     this.oneTime = (response['oneTimeRec'] == 'Y' ? true : false);
163                     this.hourly = (response['hourlyRec'] == 'Y' ? true : false);
164                     this.daily = (response['dailyRec'] == 'Y' ? true : false);
165                     this.MonFri = (response['dailyMFRec'] == 'Y' ? true : false);
166                     this.Weekly = (response['weeklyRec'] == 'Y' ? true : false);
167                     this.Monthly = (response['monthlyRec'] == 'Y' ? true : false);
168                     this.showSpinner = false;
169                 });
170         }
171         if ((this.IncomingReportId !== -1 && this.reportMode == 'Edit')) {
172             this._definitionService.getDefinitionPageDetails(this.IncomingReportId, this.reportMode)
173                 .subscribe((response) => {
174                     this.finalGetObj = response;
175                     this.reportId = response['reportId'];
176                     this.reportName = response['reportName'];
177                     this.reportDescription = response['reportDescr'];
178                     this.reportType = response['reportType'];
179                     if (this.reportMode == 'Copy') {
180                         this.finalPostObj['reportId'] = -1;
181                         this.IncomingReportId = -1;
182                         this.reportId = -1;
183                     }
184                     if (this.reportType === 'Linear') {
185                         this.dataSrc = response['dbInfo'];
186                         this.helpText = response['formHelpText'];
187                         this.reportDefinition = response['repDefType'];
188                         this.pageSize = response['pageSize'];
189                         this.hideFormFields1 = response['hideFormFieldsAfterRun'];
190                         this.maxRows = response['maxRowsInExcelCSVDownload'];
191                         this.colsFrozen = response['frozenColumns'];
192                         this.gridAlign = response['dataGridAlign'];
193                         this.emptyMessage = response['emptyMessage'];
194                         if (response['displayArea']) {
195                             for (let i = 0; i < response["displayArea"].length; i++) {
196                                 if (response['displayArea'][i]['selected'] === true) {
197                                     this.displayArea = response['displayArea'][i]['name'];
198                                 }
199                             }
200                         }
201                         this.heightContainer = response['dataContainerHeight'];
202                         this.widthContainer = response['dataContainerWidth'];
203                         this.allowScheduler = (response['allowScheduler'] == 'Y' ? true : false);
204                         this.sizedByContent = (response['sizedByContent'] == 'Y' ? true : false);
205                         this.displayOptionsArr = response['displayOptions'];
206                         for (let cont of this.displayOptionsArr) {
207                             if (cont['name'] == 'HideFormFields') {
208                                 this.hideFormFields = cont['selected'];
209                             }
210                             if (cont['name'] == 'HideChart') {
211                                 this.hideChart = cont['selected'];
212                             }
213                             if (cont['name'] == 'HideReportData') {
214                                 this.hideReportData = cont['selected'];
215                             }
216                             if (cont['name'] == 'HideExcel') {
217                                 this.hideExcel = cont['selected'];
218                             }
219                             if (cont['name'] == 'HidePdf') {
220                                 this.hidePDF = cont['selected'];
221                             }
222                         }
223                         this.disableColumnSort = response['runtimeColSortDisabled'];
224                         this.runTimeFormNum = response['numFormCols'];
225
226                         this.reportTitle = response['reportTitle'];
227                         this.reportSubTitle = response['reportSubTitle'];
228                         this.oneTime = (response['oneTimeRec'] == 'Y' ? true : false);
229                         this.hourly = (response['hourlyRec'] == 'Y' ? true : false);
230                         this.daily = (response['dailyRec'] == 'Y' ? true : false);
231                         this.MonFri = (response['dailyMFRec'] == 'Y' ? true : false);
232                         this.Weekly = (response['weeklyRec'] == 'Y' ? true : false);
233                         this.Monthly = (response['monthlyRec'] == 'Y' ? true : false);
234                     } else {
235                         if (response['dashboardLayoutJSON']) {
236                             this.dashboardObj = JSON.parse(response['dashboardLayoutJSON']);
237                         }
238                         if (response['dashboardLayoutHTML']) {
239                             this.dashboardLayoutHTML = response['dashboardLayoutHTML'];
240                         }
241                     }
242                     this.showSpinner = false;
243                 });
244         }
245         if (this.reportMode == 'Copy') {
246             this._definitionService.copyReportById(this.IncomingReportId)
247                 .subscribe((response) => {
248                     this._definitionService.getDefinitionPageDetails(this.IncomingReportId, this.reportMode)
249                         .subscribe((response) => {
250                             this.finalGetObj = response;
251                             this.reportId = -1;
252                             this.reportName = response['reportName'];
253                             this.reportDescription = response['reportDescr'];
254                             this.reportType = response['reportType'];
255                             if (this.reportType === 'Linear') {
256                                 this.dataSrc = response['dbInfo'];
257                                 this.helpText = response['formHelpText'];
258                                 this.reportDefinition = response['repDefType'];
259                                 this.pageSize = response['pageSize'];
260                                 this.hideFormFields1 = response['hideFormFieldsAfterRun'];
261                                 this.maxRows = response['maxRowsInExcelCSVDownload'];
262                                 this.colsFrozen = response['frozenColumns'];
263                                 this.gridAlign = response['dataGridAlign'];
264                                 this.emptyMessage = response['emptyMessage'];
265                                 if (response['displayArea']) {
266                                     for (let i = 0; i < response["displayArea"].length; i++) {
267                                         if (response['displayArea'][i]['selected'] === true) {
268                                             this.displayArea = response['displayArea'][i]['name'];
269                                         }
270                                     }
271                                 }
272                                 this.heightContainer = response['dataContainerHeight'];
273                                 this.widthContainer = response['dataContainerWidth'];
274                                 this.allowScheduler = (response['allowScheduler'] == 'Y' ? true : false);
275                                 this.sizedByContent = (response['sizedByContent'] == 'Y' ? true : false);
276                                 this.displayOptionsArr = response['displayOptions'];
277                                 for (let cont of this.displayOptionsArr) {
278                                     if (cont['name'] == 'HideFormFields') {
279                                         this.hideFormFields = cont['selected'];
280                                     }
281                                     if (cont['name'] == 'HideChart') {
282                                         this.hideChart = cont['selected'];
283                                     }
284                                     if (cont['name'] == 'HideReportData') {
285                                         this.hideReportData = cont['selected'];
286                                     }
287                                     if (cont['name'] == 'HideExcel') {
288                                         this.hideExcel = cont['selected'];
289                                     }
290                                     if (cont['name'] == 'HidePdf') {
291                                         this.hidePDF = cont['selected'];
292                                     }
293                                 }
294                                 this.disableColumnSort = response['runtimeColSortDisabled'];
295                                 this.runTimeFormNum = response['numFormCols'];
296
297                                 this.reportTitle = response['reportTitle'];
298                                 this.reportSubTitle = response['reportSubTitle'];
299                                 this.oneTime = (response['oneTimeRec'] == 'Y' ? true : false);
300                                 this.hourly = (response['hourlyRec'] == 'Y' ? true : false);
301                                 this.daily = (response['dailyRec'] == 'Y' ? true : false);
302                                 this.MonFri = (response['dailyMFRec'] == 'Y' ? true : false);
303                                 this.Weekly = (response['weeklyRec'] == 'Y' ? true : false);
304                                 this.Monthly = (response['monthlyRec'] == 'Y' ? true : false);
305                             } else {
306                                 if (response['dashboardLayoutJSON']) {
307                                     this.dashboardObj = JSON.parse(response['dashboardLayoutJSON']);
308                                 }
309                                 if (response['dashboardLayoutHTML']) {
310                                     this.dashboardLayoutHTML = response['dashboardLayoutHTML'];
311                                 }
312                             }
313                             this.showSpinner = false;
314                         });
315                     this.showSpinner = false;
316                 });
317         }
318     }
319
320
321     saveDefinitionInfo() {
322         if ((this.IncomingReportId == -1 && this.reportMode == 'Create')) {
323             this.finalPostObj['tabName'] = 'Definition';
324             this.finalPostObj['tabId'] = 'Def';
325             this.finalPostObj['reportId'] = this.reportId;
326             this.finalPostObj['reportName'] = this.reportName;
327             this.finalPostObj['reportDescr'] = this.reportDescription;
328             this.finalPostObj['reportType'] = this.reportType;
329             this.finalPostObj['reportTypeList'] = null;
330             this.finalPostObj['dbInfo'] = this.dataSrc;
331             this.finalPostObj['formHelpText'] = this.helpText;
332             this.finalPostObj['pageSize'] = this.pageSize;
333             this.finalPostObj['dbInfoList'] = [
334                 {
335                     'id': 'local',
336                     'name': 'local',
337                     'selected': false
338                 }
339             ];
340             this.finalPostObj['displayArea'] = [
341                 {
342                     'id': 'HOME',
343                     'name': 'HOME',
344                     'selected': (this.displayArea == 'HOME' ? true : false)
345                 },
346                 {
347                     'id': 'CUSTOMER',
348                     'name': 'CUSTOMER',
349                     'selected': (this.displayArea == 'CUSTOMER' ? true : false)
350                 },
351                 {
352                     'id': 'REPORTS',
353                     'name': 'REPORTS',
354                     'selected': (this.displayArea == 'REPORTS' ? true : false)
355                 }
356             ];
357             this.finalPostObj['hideFormFieldsAfterRun'] = this.hideFormFields1;
358             this.finalPostObj['maxRowsInExcelCSVDownload'] = this.maxRows;
359             this.finalPostObj['frozenColumns'] = this.colsFrozen;
360             this.finalPostObj['dataGridAlign'] = this.gridAlign;
361             this.finalPostObj['emptyMessage'] = this.emptyMessage;
362             this.finalPostObj['dataContainerHeight'] = this.heightContainer;
363             this.finalPostObj['dataContainerWidth'] = this.widthContainer;
364             this.finalPostObj['displayOptions'] = [
365                 {
366                     'name': 'HideFormFields',
367                     'selected': (this.hideFormFields == undefined ? false : this.hideFormFields)
368                 },
369                 {
370                     'name': 'HideChart',
371                     'selected': (this.hideChart == undefined ? false : this.hideChart)
372                 },
373                 {
374                     'name': 'HideReportData',
375                     'selected': (this.hideReportData == undefined ? false : this.hideReportData)
376                 },
377                 {
378                     'name': 'HideExcel',
379                     'selected': (this.hideExcel == undefined ? false : this.hideExcel)
380                 },
381                 {
382                     'name': 'HidePdf',
383                     'selected': (this.hidePDF == undefined ? false : this.hidePDF)
384                 }
385             ];
386             this.finalPostObj['runtimeColSortDisabled'] = this.disableColumnSort;
387             this.finalPostObj['numFormCols'] = this.runTimeFormNum;
388             this.finalPostObj['reportTitle'] = this.reportTitle;
389             this.finalPostObj['reportSubTitle'] = this.reportSubTitle;
390             this.finalPostObj['oneTimeRec'] = this.oneTime;
391             this.finalPostObj['hourlyRec'] = this.hourly;
392             this.finalPostObj['dailyRec'] = this.daily;
393             this.finalPostObj['dailyMFRec'] = this.MonFri;
394             this.finalPostObj['weeklyRec'] = this.Weekly;
395             this.finalPostObj['monthlyRec'] = this.Monthly;
396             this.finalPostObj['allowScheduler'] = (this.allowScheduler == true ? 'Y' : 'N');
397             this.finalPostObj['sizedByContent'] = (this.sizedByContent == true ? 'Y' : 'N');
398             this.finalPostObj['repDefType'] = this.reportDefinition;
399             if (this.reportType === 'Dashboard') {
400                 this.finalPostObj['dashboardLayoutJSON'] = JSON.stringify(this.dashboardObj);
401                 this.finalPostObj['dashboardLayoutHTML'] = this.dashboardLayoutHTML;
402             }
403             this._http.post(environment.baseUrl + 'report/wizard/save_def_tab_data/Create', this.finalPostObj, {headers: new HttpHeaders({'Content-Type': 'application/json'})})
404                 .subscribe((response) => {
405                     if (response['message'] === 'Success Definition of given report is saved in session.') {
406                         this.status = 'Success!';
407                         this.message = 'Your change has been saved! Definition is updated.';
408                         if (this.reportType == 'Dashboard') {
409                             let stackTrace = '';
410                             stackTrace = response['anyStacktrace'];
411                             stackTrace = stackTrace.substring(0, stackTrace.indexOf('-'));
412                             this.reportId = parseInt(stackTrace);
413                             this._router.navigate(['v2/reports', 'Edit', this.reportId]);
414                         }
415                         this.showDialog = !this.showDialog;
416                         this.closable = true;
417                     } else {
418                         this.status = 'Failure!';
419                         this.message = 'Definition could not be updated.';
420                         this.showDialog = !this.showDialog;
421                         this.closable = true;
422                     }
423                 });
424         }
425         if ((this.IncomingReportId !== -1 && this.reportMode == 'Edit') || this.reportMode == 'Copy') {
426             this.finalPostObj['tabName'] = 'Definition';
427             this.finalPostObj['tabId'] = 'Def';
428             this.finalPostObj['reportId'] = this.reportId;
429             this.finalPostObj['reportName'] = this.reportName;
430             this.finalPostObj['reportDescr'] = this.reportDescription;
431             this.finalPostObj['reportType'] = this.reportType;
432             if (this.reportMode == 'Copy') {
433                 this.finalPostObj['reportId'] = -1;
434                 this.IncomingReportId = -1;
435             }
436             if (this.reportType === 'Dashboard') {
437                 this.finalPostObj['dashboardLayoutJSON'] = JSON.stringify(this.dashboardObj);
438                 this.finalPostObj['dashboardLayoutHTML'] = this.dashboardLayoutHTML;
439             } else {
440                 this.finalPostObj['reportTypeList'] = null;
441                 this.finalPostObj['dbInfo'] = this.dataSrc;
442                 this.finalPostObj['formHelpText'] = this.helpText;
443                 this.finalPostObj['pageSize'] = this.pageSize;
444                 this.finalPostObj['dbInfoList'] = [
445                     {
446                         'id': 'local',
447                         'name': 'local',
448                         'selected': false
449                     }
450                 ];
451                 this.finalPostObj['displayArea'] = [
452                     {
453                         'id': 'HOME',
454                         'name': 'HOME',
455                         'selected': (this.displayArea == 'HOME' ? true : false)
456                     },
457                     {
458                         'id': 'CUSTOMER',
459                         'name': 'CUSTOMER',
460                         'selected': (this.displayArea == 'CUSTOMER' ? true : false)
461                     },
462                     {
463                         'id': 'REPORTS',
464                         'name': 'REPORTS',
465                         'selected': (this.displayArea == 'REPORTS' ? true : false)
466                     }
467                 ];
468                 this.finalPostObj['hideFormFieldsAfterRun'] = this.hideFormFields1;
469                 this.finalPostObj['maxRowsInExcelCSVDownload'] = this.maxRows;
470                 this.finalPostObj['frozenColumns'] = this.colsFrozen;
471                 this.finalPostObj['dataGridAlign'] = this.gridAlign;
472                 this.finalPostObj['emptyMessage'] = this.emptyMessage;
473                 this.finalPostObj['dataContainerHeight'] = this.heightContainer;
474                 this.finalPostObj['dataContainerWidth'] = this.widthContainer;
475                 this.finalPostObj['displayOptions'] = [
476                     {
477                         'name': 'HideFormFields',
478                         'selected': (this.hideFormFields == undefined ? false : this.hideFormFields)
479                     },
480                     {
481                         'name': 'HideChart',
482                         'selected': (this.hideChart == undefined ? false : this.hideChart)
483                     },
484                     {
485                         'name': 'HideReportData',
486                         'selected': (this.hideReportData == undefined ? false : this.hideReportData)
487                     },
488                     {
489                         'name': 'HideExcel',
490                         'selected': (this.hideExcel == undefined ? false : this.hideExcel)
491                     },
492                     {
493                         'name': 'HidePdf',
494                         'selected': (this.hidePDF == undefined ? false : this.hidePDF)
495                     }
496                 ];
497                 this.finalPostObj['runtimeColSortDisabled'] = this.disableColumnSort;
498                 this.finalPostObj['numFormCols'] = this.runTimeFormNum;
499                 this.finalPostObj['reportTitle'] = this.reportTitle;
500                 this.finalPostObj['reportSubTitle'] = this.reportSubTitle;
501                 this.finalPostObj['oneTimeRec'] = this.oneTime;
502                 this.finalPostObj['hourlyRec'] = this.hourly;
503                 this.finalPostObj['dailyRec'] = this.daily;
504                 this.finalPostObj['dailyMFRec'] = this.MonFri;
505                 this.finalPostObj['weeklyRec'] = this.Weekly;
506                 this.finalPostObj['monthlyRec'] = this.Monthly;
507                 this.finalPostObj['allowScheduler'] = (this.allowScheduler == true ? 'Y' : 'N');
508                 this.finalPostObj['sizedByContent'] = (this.sizedByContent == true ? 'Y' : 'N');
509                 this.finalPostObj['repDefType'] = this.reportDefinition;
510             }
511             this._definitionService.portDefinitionPageDetails(this.IncomingReportId, this.finalPostObj)
512                 .subscribe((response) => {
513                     if (response['message'] === 'Success Definition of given report is saved in session.') {
514                         this.status = 'Success!';
515                         this.message = 'Your change has been saved! Definition is updated.';
516                         if (this.reportMode == 'Copy') {
517                             let stackTrace = '';
518                             stackTrace = response['anyStacktrace'];
519                             stackTrace = stackTrace.substring(0, stackTrace.indexOf('-'));
520                             this.reportId = parseInt(stackTrace);
521                             this._router.navigate(['v2/reports', 'Edit', this.reportId]);
522                         }
523                         this.showDialog = !this.showDialog;
524                         this.closable = true;
525                         if (this.reportType == 'Dashboard') {
526
527                         }
528                     } else {
529                         this.status = 'Failure!';
530                         this.message = 'Definition could not be updated.';
531                         this.showDialog = !this.showDialog;
532                         this.closable = true;
533                     }
534                 });
535         }
536     }
537
538     close() {
539         this.showDialog = !this.showDialog;
540         this.closable = false;
541     }
542
543     onTransferDashboardObj(transferredDashboardObj: any) {
544         this.dashboardObj = transferredDashboardObj;
545
546     }
547
548     clearSession() {
549         this._definitionService.clearSession()
550             .subscribe((response) => {
551                 console.log(response);
552                 this._router.navigate(['v2/report-list']);
553             });
554
555     }
556
557     getReportType() {
558         let outPutValues = [];
559         outPutValues['reportType'] = this.reportType;
560         this.outputReportType.emit(outPutValues);
561     }
562 }