I have following problem:
I have a program, which i want to control mainly via command line. The parameters for the command line, are "template" (which is the mrt-file), "report" (which is the disered target file) and "autosave" which indicates, if the programm shall save the file automatically or wait for the user to do it. The parameter "report" shall contains the desired type of file, like 'report="c:\test.pdf"', or 'report="c:\test.docx"', and so on.So if autosave is false, the programm shall disable all export-formats, except for the one in the report-parameter.
This is the code for this part of my program:
Code: Select all
Dim services As Stimulsoft.Base.Services.StiServiceContainer = Stimulsoft.Report.StiConfig.Services.GetServices(GetType(StiExportService))
Dim service As StiService
StiConfig.Load()
If ext = ".pdf" Then
For Each service In services
If TypeOf service Is StiPdfExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
ElseIf ext = ".docx" Then
For Each service In services
If TypeOf service Is StiWord2007ExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
ElseIf ext = ".xls" Then
For Each service In services
If TypeOf service Is StiExcel2007ExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
ElseIf ext = ".csv" Then
For Each service In services
If TypeOf service Is StiCsvExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
ElseIf ext = ".png" Then
For Each service In services
If TypeOf service Is StiPngExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
ElseIf ext = ".rtf" Then
For Each service In services
If TypeOf service Is StiRtfExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
ElseIf ext = ".odt" Then
For Each service In services
If TypeOf service Is StiOdtExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
End If
StiConfig.Save()
Is there a way to store the StiConfig-settings only for one Session of the Program?
I hope you understood my problem.
Regards.