Page 1 of 1

Report-Viewer is crashing

Posted: Tue Dec 20, 2011 8:12 am
by mietzekotze
Hey Guys,

i have following problem:

I'm trying to run your software via command line, so you can give the program parameters, but the problem is, when i'm trying to show the report, the preview-windo crashes. If i do it via GUI it works fine. Unfortunatly i have no Idea where the mistake is, maybe you can tell me. This is the sourcecode:

Code: Select all

Imports Stimulsoft.Report
Imports Stimulsoft.Report.Dictionary
Imports Stimulsoft.Base.Drawing
Imports Stimulsoft.Report.Components
Imports Stimulsoft.Base
Imports Stimulsoft.Base.Serializing
Imports Stimulsoft.Controls
Imports Stimulsoft.Report.CodeDom
Imports Stimulsoft.Report.Design

Module Module1
    Dim paraDic As New Dictionary(Of String, String)
    Sub Main()
        Dim parm = Command()
        Parameter(parm)
        Dim Report As New StiReport
        Report.Load(paraDic.Item("dir"))
        Report.Show()

        'Console.WriteLine(CompiledReportFileName)
        Console.ReadLine()
    End Sub

    Sub Parameter(ByVal args As String)

        Dim words As String() = args.ToString.Split("|")
        Dim word As String
        For Each word In words
            'Console.WriteLine(word)

            If word.Contains("dir") Then
                Dim splitted As String() = word.Split("=")
                paraDic.Add(splitted(0), splitted(1))
                Console.WriteLine(splitted(1))
            End If

            If word.Contains("target") Then
                Dim splitted As String() = word.Split("=")
                paraDic.Add(splitted(0), splitted(1))
            End If



        Next
    End Sub

End Module
Regards

Report-Viewer is crashing

Posted: Wed Dec 21, 2011 5:07 am
by HighAley
Hello.

Please, send us a sample project and step-by-step guide how to reproduce the issue.
What report do you get?

Thank you.

Report-Viewer is crashing

Posted: Wed Dec 21, 2011 7:15 am
by mietzekotze
I decided to use the GUI-Interface-version. Its much easier to use. But i still have a question:
Is it possible under VB.Net to disable Exportfunctions. For example i just want to export to pdf?

Regards

Report-Viewer is crashing

Posted: Thu Dec 22, 2011 2:28 am
by HighAley
Hello.
mietzekotze wrote:I decided to use the GUI-Interface-version. Its much easier to use. But i still have a question:
Is it possible under VB.Net to disable Exportfunctions. For example i just want to export to pdf?
Please, try to use next code:

Code: Select all

StiConfig.Load()
Dim services As StiServiceContainer = StiConfig.Services.GetServices(GetType(StiExportService))

Dim service As StiService
For Each service In services
	If TypeOf service Is StiPdfExportService Then
		service.ServiceEnabled = true
	Else
		service.ServiceEnabled = false
	End If
Next

StiConfig.Save()
Thank you.

Report-Viewer is crashing

Posted: Mon Jan 02, 2012 4:31 am
by mietzekotze
Unfortunatly this code doesnt work for me.

This is my project, maybe you'll be able to find my mistake.
http://www.mediafire.com/file/7mmws0rhr ... Viewer.zip

Report-Viewer is crashing

Posted: Mon Jan 02, 2012 10:43 am
by Stephan1
Hi MietzeKotze,

Try this:

Dim Services As Stimulsoft.Base.Services.StiServiceContainer = Stimulsoft.Report.StiConfig.Services.GetServices(GetType(StiExportService))
Dim service As StiService
For Each service In Services
If TypeOf service Is StiPdfExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next

P.S: Achja: Cooler name :byebye:

Report-Viewer is crashing

Posted: Tue Jan 03, 2012 3:14 am
by mietzekotze
Stephan1 wrote: Dim Services As Stimulsoft.Base.Services.StiServiceContainer = Stimulsoft.Report.StiConfig.Services.GetServices(GetType(StiExportService))
Dim service As StiService
For Each service In Services
If TypeOf service Is StiPdfExportService Then
service.ServiceEnabled = True
Else
service.ServiceEnabled = False
End If
Next
That did the trick. Thanks :D
Stephan1 wrote: P.S: Achja: Cooler name :byebye:
Danke :biggrin:

Report-Viewer is crashing

Posted: Tue Jan 03, 2012 5:10 am
by Andrew
Hello Stephan1,

Thank you for sharing your experience.

Thank you.