View Report in ASP.NET using VistaDB

Stimulsoft Reports.NET discussion
Post Reply
algarveweb
Posts: 11
Joined: Thu Jan 25, 2007 3:30 pm
Location: Portugal

View Report in ASP.NET using VistaDB

Post by algarveweb »

Hi

I have managed to create a report using VistaDB without problems.

In your instructions you say to insert the following:

At start of your program add following code:

StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiVistaDBAdapterService());
StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiVistaDBDatabase());


How/where do I do this in ASP.NET/VB.NET?

Thanks, Mike.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

View Report in ASP.NET using VistaDB

Post by Vital »

You can do it in static constructor of your web page.

Thank you.
algarveweb
Posts: 11
Joined: Thu Jan 25, 2007 3:30 pm
Location: Portugal

View Report in ASP.NET using VistaDB

Post by algarveweb »

I am sorry, what do you mean by that?

Thank

Mike
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

View Report in ASP.NET using VistaDB

Post by Vital »

Place to your webpage following code:

Code: Select all

Shared Sub New()
    StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiVistaDBAdapterService)
    StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiVistaDBDatabase)
End Sub

algarveweb
Posts: 11
Joined: Thu Jan 25, 2007 3:30 pm
Location: Portugal

View Report in ASP.NET using VistaDB

Post by algarveweb »

"Declaration expected" is what I get.

Thanks, Mike
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

View Report in ASP.NET using VistaDB

Post by Vital »

You need add reference to Stimulsoft.Report.VistaDBDatabase.dll in your project.

What you get is:

Code: Select all

Public Class WebForm1
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
     Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
    End Sub

    Shared Sub New()
        StiConfig.Services.Add(New Stimulsoft.Report.Dictionary.StiVistaDBAdapterService())
        StiConfig.Services.Add(New Stimulsoft.Report.Dictionary.StiVistaDBDatabase())
    End Sub

End Class
Post Reply