Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3189

Re: Cannot understand the error 'The type Initializer for CrystalDecisions.Shared.Sharedutils threw an exception'

$
0
0

Thank you for the reply, Dell..

 

I un-installed all versions and re-installed the suggested.

On the development machine I have the version v.13.0.15.1840

On my deployment machine, I installed the 32-bit.msi runtime of the same version.

Things have improved but not resolved.

 

This time I get the database logon screen but database name is not picked.

 

cr1.png

 

In reply to no.4 of your list and with my limited knowledge, I am not sure where I am using CrystalDecisions.Shared.SharedUtils and which code you are after.

 

As all my reports are behaving in the same manner, I can tell you that the simplest of them has database fields with no sql expressions or formulae fields defined. There is only one parameter field and I pass data to this from the reportviewer.

 

Server parameters are pre-defined and passed to the reportviewer (marked in red). They work well on development machine.

 

I hope this information helps and await your reply.

 

 

[Code from Report Viewer]

 

Public Class viewrptInvoice

 

 

    Private m_theID As Decimal

    Private m_PersonName As String = ""

    Private m_bDirectPrint As Boolean

 

 

    Public Sub New(ByVal theid As Decimal, ByVal personname As String, ByVal bdirectprint As Boolean)

 

 

        ' This call is required by the designer.

        InitializeComponent()

        m_theID = theid

        m_PersonName = personname

        m_bDirectPrint = bdirectprint

 

 

        ' Add any initialization after the InitializeComponent() call.

 

 

    End Sub

 

 

    Private Sub frmcrvInvoice_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Try

            Dim rptViewer As New rptInvoice

 

 

            rptViewer.Refresh()

 

 

            rptViewer.DataSourceConnections.Clear()

            rptViewer.DataSourceConnections.Item(0).SetConnection(g_strServer, g_strServerDB, False)

 

 

            ' Set Database Logon Details

            rptViewer.SetDatabaseLogon(g_strServerUN, g_strServerPW)

 

 

            ' display Company Address on Report

            Dim sFooter As Object

            sFooter = rptViewer.ReportDefinition.ReportObjects("txtFooterLine")

            sFooter.Text = g_FooterLineMasjid

 

 

            ' Invoice Info

            Dim sPersonName As Object

            sPersonName = rptViewer.ReportDefinition.ReportObjects("txtPersonName")

            sPersonName.Text = m_PersonName

 

 

            ''Pass filter Paramter

            rptViewer.SetParameterValue("theID", m_theID)

            crvInvoice.ReportSource = rptViewer

            If m_bDirectPrint Then

                rptViewer.PrintToPrinter(1, True, 0, 0)

                Me.Close()

            End If

 

         

        Catch ex As Exception

            MsgBox(ex.Message)

        End Try

    End Sub

 

 

    Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click

        Me.Close()

    End Sub


Viewing all articles
Browse latest Browse all 3189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>