Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all 3636 articles
Browse latest View live

Crystal Reports in deployed environment Logon Failed

$
0
0

I have read about every blog and tried every solution but to no avail.  This is my code:

 

Imports Microsoft.VisualBasic

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared

 

 

Public Class cReportSetup

    Dim crtableLogoninfos As New TableLogOnInfos()

    Dim crtableLogoninfo As New TableLogOnInfo()

    Dim crConnectionInfo As New ConnectionInfo()

    Dim CrTables As Tables

    Dim CrTable As Table

    Dim TableCounter

    Dim o As New aspdata.cData

    Dim boMainPropertyBag As New DbConnectionAttributes()

    Dim boInnerPropertyBag As New DbConnectionAttributes()

 

 

    Public Function configureCR(ByRef reportName As String) As ReportDocument

        With crConnectionInfo

            If o.dbInstance Is Nothing Or o.dbInstance.Length = 0 Then

                .ServerName = o.dbServer & o.dbPort

            Else

                .ServerName = o.dbServer & "\" & o.dbInstance & o.dbPort

            End If

 

 

            .DatabaseName = "ASP"

            .UserID = o.dbUser

            .Password = o.dbPassword

            .IntegratedSecurity = False

            .Type = ConnectionInfoType.SQL

            .AllowCustomConnection = True

        End With

 

 

 

 

        'Set the attributes for the boInnerPropertyBag

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Auto Translate", "-1"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Connect Timeout", "15"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Data Source", crConnectionInfo.ServerName))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("DataTypeCompatibility", "0"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("General Timeout", "0"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Initial Catalog", "ASP"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Integrated Security", "False"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Locale Identifier", "1033"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("MARS Connection", "0"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("OLE DB Services", "-5"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Provider", "SQLNCLI10"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Tag with column collation when possible", "0"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Trust Server Certificate", "0"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Use DSN Default Properties", "False"))

        boInnerPropertyBag.Collection.Add(New NameValuePair2("Use Encryption for Data", "0"))

 

 

        'Set the attributes for the boMainPropertyBag

        boMainPropertyBag.Collection.Add(New NameValuePair2("Database DLL", "crdb_ado.dll"))

        boMainPropertyBag.Collection.Add(New NameValuePair2("QE_DatabaseName", "ASP"))

        boMainPropertyBag.Collection.Add(New NameValuePair2("QE_DatabaseType", "OLE DB (ADO)"))

 

 

        'Add the QE_LogonProperties we set in the boInnerPropertyBag Object

        boMainPropertyBag.Collection.Add(New NameValuePair2("QE_LogonProperties", boInnerPropertyBag))

        boMainPropertyBag.Collection.Add(New NameValuePair2("QE_ServerDescription", crConnectionInfo.ServerName))

        boMainPropertyBag.Collection.Add(New NameValuePair2("QE_SQLDB", "True"))

        boMainPropertyBag.Collection.Add(New NameValuePair2("SSO Enabled", "False"))

        crConnectionInfo.Attributes = boMainPropertyBag

 

 

        Dim cryRpt As New ReportDocument

        cryRpt.Load(reportName)

        setReportDb(cryRpt, False)

        Return cryRpt

    End Function

 

 

    Private Sub setReportDb(ByRef report As ReportDocument, ByVal subR As Boolean)

 

 

        'Loop through each sub report in the report and apply the LogonInfo information

        'There seems to be an issue with subreports causing the app to crash. Solution for now is to set your log on info for the subreports first and then set the main report log on info.

        Dim sSubReportName As String

        Dim objTmpReport As ReportDocument

 

 

        For Each ReportObject In report.ReportDefinition.ReportObjects

            If ReportObject.GetType().Equals(GetType(SubreportObject)) Then

                sSubReportName = ReportObject.SubreportName

                objTmpReport = report.OpenSubreport(sSubReportName)

                setReportDb(objTmpReport, True)

            End If

        Next

 

 

        report.SetDatabaseLogon(o.dbUser, o.dbPassword, crConnectionInfo.ServerName, "ASP")

        For Each dsc As InternalConnectionInfo In report.DataSourceConnections

            ' Must set the UseDSNProperties flag to True before setting the database connection otherwise the connection does not work    

            If (dsc.LogonProperties.ContainsKey("UseDSNProperties")) Then

                dsc.LogonProperties.Set("UseDSNProperties", True)

            End If

            dsc.LogonProperties.Set("Data Source", crConnectionInfo.ServerName)

            dsc.SetConnection(crConnectionInfo.ServerName, "ASP", o.dbUser, o.dbPassword)

            Dim prt As String = ""

            For i As Integer = 0 To dsc.LogonProperties.Count - 1

                Dim nvp As NameValuePair2 = dsc.LogonProperties.Item(i)

                prt = prt & "Name=" & nvp.Name & ", Value=" & nvp.Value & System.Environment.NewLine

            Next

            MsgBox(prt)

        Next

 

 

        'Loop through each table in the report and apply the LogonInfo information

        CrTables = report.Database.Tables

        For Each Me.CrTable In CrTables

            crtableLogoninfo = CrTable.LogOnInfo

            crtableLogoninfo.ConnectionInfo = crConnectionInfo

            CrTable.ApplyLogOnInfo(crtableLogoninfo)

            Try

                CrTable.Location = CrTable.Name

            Catch ex As Exception

                MsgBox(ex.ToString)

                Exit Sub

            End Try

        Next

 

 

        If Not subR Then

            report.Refresh()

        End If

    End Sub

 

 

End Class

 

This is the prompts I am getting:

 

 

 

I noticed is that for some reason the datasource is picking up a database instance that is incorrect in the deployed environment.  Not sure where that comes from....  I have a database instance in my development environment but it is different.

 

Any help will be appreciated...


Reports not working properly after upgrading app from Visual Studio 2008 to VS2010

$
0
0

So, I've done lots of searches both here and on google... have tried lots of suggestions but nothing seems to work. 

 

I have a 'test' application that wrote that replicates our applications reporting functionality.  It is currently written in VS2008/VB.Net .NET 3.5 framework and uses the crystal reports 11.5 run time.  All reports are external files, this code and this set of report has been working fine for several years.  We are now trying to upgrade our dev env to VS2010 using .NET 4.0 framework (full version not the client version).

 

The test application does the following:

     - Shows dialog for user to pick the report file to run

     - .Load : load the report

     - Reads our DB connection info from our reg key

     - Updates the login info for the report (and any sub report if they exist)

     - Goes through the Parameters looking for one named @LocationId

          If the parameter exists, we set it a defined value so the user never gets prompted.

         (Any other parameters are untouched and the Crystal Viewer prompts for them as designed)

     - We then assign the report document to the crystal viewer .ReportSource

 

This all works fine in the current environment.

 

To test for upgrade I did the following.

     - Installed CR for VS2010 (have tried the Release, SP1-SP5)

     - Upgraded the test project to VS2010

     - Changed the .NET Framework to 4.0

     - Cleaned the project and rebuilt.

 

I then started testing various reports.  Most seem to work just fine, but a few are having serious issue.  The CR Viewer is prompting for the @LocationId parameter we are setting.. it does so over and over ... and the report never runs.

 

So, same exact report, just different run time versions .... very different results.

 

We have multiple customers, each has copies of the report(s) for our application...

each customer has their own copy of .Crystal Reports designer to modify/add reports.

 

What we are trying to avoid is manually updating a bunch of report across a large number of customers.

 

I do not write the reports, only maintain the code that displays them....

 

One example is as follows

 

There are 2 Stored Procedures

Both SP's have the @LocationId parameter as their only parameter.

 

There are 2 Parameter Fields Defined

@LocationId : is set in code

 

StatementDate : Is the Dynamic LOV (displays a String, but returns an numeric ID Value)

 

The first SP is used to build a dynamic LOV's from one of our tables

The second is actually used to build the report details from another table, based on what is picked in the first.

 

There are no 'Links' defined in the Database Expert (although I have tried adding them to see if it made a difference.. it did not)

 

On the reports Record Selection Formula Editor it does the following to filter the records

     {tl_sp_StatementGroups_AgedAR_Report;1.ID} = {?StatementDate}

 

 

Again, all this worked exactly as is with VS2008/CR Runtime 11.5.....

(The @LoationId was set in code and the user was not prompted for this value

The LOV of statement dates was displayed and allowed the user to pick a value as desired)

 

my question(s)

 

- Is this a bug in the VS2010 run time / or was it a bug in the 11.5 that it actually ran to begin with

- The behavior is definitely different, is there any way via VB code that I can compensate? (nothing that I've found leads me to believe this is true).

- Are we stuck with manually 'updating' a bunch of report across many different customers?

 

I've spent a considerable amount of time researching / experimenting with the code.. with no luck.  The only

thing that has worked so far is to modify the report and associated SP's.

 

Any input much appreciated.

ExportToStream method no longer returns System.IO.MemoryStream in CR 2008 SP5

$
0
0

We updated our Crystal 2008 Runtime from SP3 to SP5 (in attempt to fix the intermittent "invalid printer specified" error).  The application is a web service running in IIS.  This application has existed in this form for 9 years (started with crystal 8, then 10, then 11.5 r2 then 2008 sp3, now 2008 sp5).  It is currently used in 20+ production environments with different platforms (32 & 64 bit), different versions of Windows, Crystal, etc.  The same code has always worked fine in all of those instances.  As soon as we moved from SP3 to SP5, whenever we make the call to

 

Dim stream as System.IO.MemoryStream = myReportDocument.ExportToStream(ExportFormatType.PortableDocFormat)

 

we get the exception:  "Unable to cast object of type 'FileStreamDeleteOnClose' to type 'System.IO.MemoryStream'."

 

I verified the type of object now being returned by the ExportToStream method, and it is in fact of type FileStreamDeleteOnClose. Why all of a sudden does the ExportToStream method no longer return a memory stream??  Is anyone else experiencing this issue with Crystal 2008 SP5 (or SP4)?  Anyone found a solution?

Notes:

1. We can reproduce this error on our development machine (32 bit Windows Server 2003 SP2 / IIS 5 / .Net 2.0) and on the production machine (64 bit Windows Server 2008 SP2 / IIS 6 / .Net 3.0)

2. When I upgraded the service to VS2010 and ran the service in .Net 4.0, I still see the same problem (ExportToStream method does not return a memory stream), but the type of object returned in thise case is actually of type:  CrystalDecisions.ReportSource.EromReportSourceBase.%

3. Our web service runs in a separate app pool with administrator privileges.

License and Maximum Report Processing Jobs Limit

$
0
0

Hi,

 

I am using Crystal Reports 2008.  .Net Web forms are used for launching the reports. Currently the number of concurrent users exceeds 75 and in future number of report users will increase up to 150.  From the crystal knowledge I got the following informations.  I am not very sure which solution I need to go

 

1. As per the Crystal knowledge base site http://search.sap.com/notes?id=0001776014&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735F6E756D6265723D30303031373736303134

and

http://scn.sap.com/docs/DOC-21533

It states that we can modify the registry entry.  I changed the registry entry and it works fine.  I am able to launch more than 100 reports.


2. As per the crystal knowledge base site
http://search.sap.com/notes?id=0001496619&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735F6E756D6265723D30303031343936363139

In the resolution it has stated to go for crystal report server which is stable one.

 

If I have to support 150 open reports at a point of time in developer version what should I have to do ? 
If I purchase additional CAL license whether it will solve the issue (without modifying the registry) ?

 

If I purchase Crystal Reports Server to support 150 open reports at a point of time what is license it is required ?

Deploy problems, I can't find dll in client machines

$
0
0

I have created an application that lunch small programs (a menu), each option is a diferent exe. The menu can load any option created without problems, but when I tried to load the exe with the crystal viewer on it, the system crash.

My dev machine is a win 7 pro sp1, vb2010 ultimatium, and CR for VS2010 v.10.0.20.

I have tried in win xp pro sp3 and win 7 pro clients, installing the dotnet 4.0 and the CRRuntime_32bit_13_0 (even I try with the diferentv versions), with the same problem.

When I try to load the application from the dev machine, there's no problems executing the exe with the viewer on it.

I'm attaching the image of the msg error in win xp

I appreciate any help, because I'm really late to install the software.

 

Thanks

Stop Email Notifications

$
0
0

  I am getting an email notification for every  post.  No thanks.

 

Someone please tell me how to turn this off.

 

Thanks very much.

Invalidate pointer error! Export report to Microsoft Word

$
0
0

hello!

I developed an application in which I generate reports that include images, but the problem is when I want to export a generated report that is 800 pages. A MESSAGE I get "invalid pointer", then another message "Unable to export."

 

Anyone know if this has to do with the amount of images or pages in the report?

 

I appreciate your answers.

How to create own button in CrystalReportViewer1?

$
0
0

How to create own button in CrystalReportViewer1?

I did created button, but when I run the report it doesn’t
show up. I am Vb 2008 and CrystalReport 8

I have two forms main and report. Report review works and
prints fine. I need to update in SQL if report is printed on which date.

 

I try this:

 

'find the print button
control and attach an event to it

For Each Obj As Object In myToolStrip.Items

If TypeOf Obj Is ToolStripButton Then

'Adding a handler for our propose

Dim b As ToolStripButton = CType(Obj, ToolStripButton)

If b.ToolTipText = "Print Report" Then

AddHandler CType(Obj, ToolStripButton).Click, AddressOf printButton_Click

End If

End If
Next

 

It never went to PrintButton_Click.

 

 

Now, I created
button name is PrintButton, but PrintButton doesn’t show up in
CrystalReportViewer1

 

 

PrivateSub PrintButton_Click(ByVal sender As System.Object, ByVal e As system.EventArgs) Handles PrintButton.Click

 

Dim dialog AsNew PrintDialog

dialog.UseEXDialog = True

dialog.AllowSomePages = True

 

If dialog.ShowDialog() = DialogResult.OK Then

Dim objRpt As ReportDocument = CType(Me.CrystalReportViewer1.ReportSource,
ReportDocument)

 

objRpt.PrintOptions.PrinterName = dialog.PrinterSettings.PrinterName

objRpt.PrintToPrinter(1, False, 0, 0)

PrintedDate()

Else

MessageBox.Show("print cancel")

Return

EndIf

EndSub

 

 

Can anyone out there help me Please?
I have been trying for two months.

 

 

Thank you


Read the Definition of dynamic Parameter-Fields via Code

$
0
0

I want to read the definition of the parameter fields. I use VB.NET/VS2010

 

The Name and some other helpfull informations i can meanwhile read and work with them. But I didn´t find the information where dynamic Paramters store the Query (example: Country => ZIPRange => City = Parameter 'CityName')

 

Where is defined the Query and how can I read it

 

Thank you very much

Reg. Crystal Report Dlls - hanging issue

$
0
0

In our applications we are using VS 2005, SQL Server 2008 and Cyrstal reports for .NET framework 2.0. Our application is not responding to any requests and it is hanging for long time. While we are doing the memory dump analysis, we found that it was the issue with Crystal report Dlls. We have contacted Microsoft support team and they also confirmed that it was due to due to possible blocking or leaked critical section from the third-party  assembly crpe32.dll and they will not support this.

 

Could someone please help me, why the issue is happening and what will be the workaround or permanent fix for this issue?

 

Note:  As a temporary work arount, I am restarting the application pool whenever the issue happens.

 

Memory dump analysis result:

=========================

Issue Analysis

=========================

There are 7 threads blocked at crpe32!SetDialogFont

ChildEBP RetAddr  Args to Child             

18a98230 7748da8c 00000002 18a98280 00000001 ntdll!NtWaitForMultipleObjects+0x15 [e:\obj.x86fre\base\ntdll\wow6432\objfre\i386\usrstubs.asm @ 829]

18a982cc 75da8f86 18a98280 18a982f4 00000000 kernel32!WaitForMultipleObjectsEx+0x11d [d:\vistasp2_gdr\base\win32\client\synch.c @ 1810]

18a98320 75da8fcf 000009dc 18a98380 ffffffff user32!RealMsgWaitForMultipleObjectsEx+0x14d [d:\longhorn\windows\core\ntuser\client\client.c @ 1695]

18a9833c 3a9b0b25 00000001 18a98380 00000000 user32!MsgWaitForMultipleObjects+0x1f [d:\longhorn\windows\core\ntuser\client\client.c @ 1574]

WARNING: Stack unwind information not available. Following frames may be wrong.

18a9835c 3a7d842e ffffffff 00000000 000004ff crpe32!SetDialogFont+0x448c1

18a983fc 3a7dcd19 00000001 124c7c40 18a98450 crpe32!CRPEConnectionInit+0x1b8e5f

18a9841c 3a5b39dc 18a98450 125088a0 18a98504 crpe32!CRPEConnectionInit+0x1bd74a

18a98434 3a5e0f51 18a98450 17d64963 0000058a crpe32!PESetSectionHeight+0x6d

18a98dbc 005c003a 00690057 0064006e 0077006f crpe32!PESetLogonProperty+0x47f

18a98dc0 00690057 0064006e 0077006f 005c0073 0x5c003a

18a98dc4 0064006e 0077006f 005c0073 00450054 0x690057

18a98dc8 0077006f 005c0073 00450054 0050004d 0x64006e

18a98dcc 005c0073 00450054 0050004d 0074005c 0x77006f

18a98dd0 00450054 0050004d 0074005c 006d0065 0x5c0073

 

.NET Call Stack

ESP       EIP    

18a9e180 77a69bd5 [ComPlusMethodFrameGeneric: 18a9e180] CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(System.Object ByRef, Int32) e:\obj.x86fre\base\ntdll\wow6432\objfre\i386\usrstubs.asm:829

18a9e194 113f3820 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(System.Object ByRef, Int32)

18a9e1cc 113f3648 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

18a9e20c 113f2c48 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(System.String, CrystalDecisions.Shared.OpenReportMethod, Int16)

18a9e24c 113f2383 CrystalDecisions.CrystalReports.Engine.ReportClass.Load(System.String, CrystalDecisions.Shared.OpenReportMethod, Int16)

18a9e29c 113f174d CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()

18a9e2c8 113f1661 CrystalDecisions.CrystalReports.Engine.ReportDocument.get_Database()

18a9e570 720d1b4c [CustomGCFrame: 18a9e570]  f:\dd\ndp\clr\src\vm\i386\asmhelpers.asm:934

18a9e538 720d1b4c [GCFrame: 18a9e538]  f:\dd\ndp\clr\src\vm\i386\asmhelpers.asm:934

18a9e554 720d1b4c [GCFrame: 18a9e554]  f:\dd\ndp\clr\src\vm\i386\asmhelpers.asm:934

18a9e738 720d1b4c [HelperMethodFrame_1OBJ: 18a9e738] System.RuntimeMethodHandle._InvokeMethodFast(System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeTypeHandle) f:\dd\ndp\clr\src\vm\i386\asmhelpers.asm:934

18a9e7a8 0f0d9f25 System.RuntimeMethodHandle.InvokeMethodFast(System.Object, System.Object[], System.Signature, System.Reflection.MethodAttributes, System.RuntimeTypeHandle) f:\dd\ndp\clr\src\BCL\System\RuntimeHandles.cs:637

18a9e7f4 0f0d98b4 System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean) f:\dd\ndp\clr\src\BCL\System\Reflection\XXXInfos.cs:1474

18a9e838 0f0d9760 System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) f:\dd\ndp\clr\src\BCL\System\Reflection\XXXInfos.cs:1421

18a9e84c 112948a0 Microsoft.VisualBasic.CompilerServices.Symbols+Container.InvokeMethod(Method, System.Object[], Boolean[], System.Reflection.BindingFlags)

18a9e88c 1101c8b1 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(System.Object, System.Type, System.String, System.Object[], System.String[], System.Type[], Boolean[])

18a9e8d0 111d38b0 CBA.RatesToday.Reports.Reporting.CreateReport(System.Object ByRef, System.String, System.String, Int32)

18a9e950 111d2e53 RatesToday.MMReports.ShowReport(System.String)

18a9ea9c 111d220e RatesToday.MMReports.lbMMIntRateSheet_Click(System.Object, System.EventArgs)

18a9ead0 111d1957 RatesToday.MMReports.Page_Load(System.Object, System.EventArgs)

18a9ebdc 10ff31a4 System.Web.UI.Control.OnLoad(System.EventArgs) f:\dd\ndp\fx\src\xsp\System\Web\UI\Control.cs:1798

18a9ebf0 10ff30b3 System.Web.UI.Control.LoadRecursive() f:\dd\ndp\fx\src\xsp\System\Web\UI\Control.cs:1813

18a9ec08 10ff0a93 System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean) f:\dd\ndp\fx\src\xsp\System\Web\UI\Page.cs:4134

18a9ed68 10f0c0b7 System.Web.UI.Page.ProcessRequest(Boolean, Boolean) f:\dd\ndp\fx\src\xsp\System\Web\UI\Page.cs:3870

18a9eda0 10f0bfd8 System.Web.UI.Page.ProcessRequest() f:\dd\ndp\fx\src\xsp\System\Web\UI\Page.cs:3841

18a9edd8 10f01508 System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext) f:\dd\ndp\fx\src\xsp\System\Web\UI\Page.cs:3812

18a9ede4 10f014a0 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext) f:\dd\ndp\fx\src\xsp\System\Web\UI\Page.cs:3802

18a9edf8 102ff7c6 ASP.mmreports_aspx.ProcessRequest(System.Web.HttpContext)

18a9ee08 10f0131d System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() f:\dd\ndp\fx\src\xsp\System\Web\HttpApplication.cs:3360

18a9ee3c 10327ce5 System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef) f:\dd\ndp\fx\src\xsp\System\Web\HttpApplication.cs:2190

18a9ee7c 10326857 System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception) f:\dd\ndp\fx\src\xsp\System\Web\HttpApplication.cs:3651

18a9eecc 103265e8 System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object) f:\dd\ndp\fx\src\xsp\System\Web\HttpApplication.cs:1326

18a9eee4 0f60b3d9 System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest) f:\dd\ndp\fx\src\xsp\System\Web\HttpRuntime.cs:1611

18a9ef18 0f60b044 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest) f:\dd\ndp\fx\src\xsp\System\Web\HttpRuntime.cs:2270

18a9ef28 0f60917a System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32) f:\dd\ndp\fx\src\xsp\System\Web\Hosting\ISAPIRuntime.cs:143

18a9f138 722184dd [ContextTransitionFrame: 18a9f138]  f:\dd\ndp\clr\src\vm\comtoclrcall.cpp:476

18a9f16c 722184dd [GCFrame: 18a9f16c]  f:\dd\ndp\clr\src\vm\comtoclrcall.cpp:476

18a9f2c8 722184dd [ComMethodFrame: 18a9f2c8]  f:\dd\ndp\clr\src\vm\comtoclrcall.cpp:476

 

When the function is trying to enter the above critical section:

0:029> kb

ChildEBP RetAddr  Args to Child             

13a0e6ec 77a50177 00000780 00000000 00000000 ntdll!ZwWaitForSingleObject+0x15 [e:\obj.x86fre\base\ntdll\wow6432\objfre\i386\usrstubs.asm @ 133]

13a0e750 77a50142 00000000 00000000 00000000 ntdll!RtlpWaitOnCriticalSection+0x155 [d:\vistasp2_gdr\base\ntdll\resource.c @ 582]

13a0e778 3a5712fe 3ad1617c 1cdf2bcb 3ad16174 ntdll!RtlEnterCriticalSection+0x152 [d:\vistasp2_gdr\base\ntdll\resource.c @ 911]

WARNING: Stack unwind information not available. Following frames may be wrong.

13a0e7ac 3a999098 12508840 13a0e7e4 13a0e800 crpe32!Ordinal930+0x112fe

13a0e7c0 3a93e3cc ffffffff 00000000 3a93e3fe crpe32!SetDialogFont+0x2ce34

13a0e7cc 3a93e3fe 1cdf2467 3abc3208 12547798 crpe32!MWSetupPrinterW+0x14cf9e

00000000 00000000 00000000 00000000 00000000 crpe32!MWSetupPrinterW+0x14cfd0

 

We can see that the problematic assembly is owned by the third-party company Business Objects.

start    end        module name

3a560000 3ae83000   crpe32     (export symbols)       crpe32.dll

    Loaded symbol image file: crpe32.dll

    Image path: C:\Program Files (x86)\Common Files\Business Objects\2.7\Bin\crpe32.dll

    Image name: crpe32.dll

    Timestamp:        Thu Jan 11 22:52:30 2007 (45A64F2E)

    CheckSum:         00921FEA

    ImageSize:        00923000

    File version:     10.2.0.1624

    Product version:  10.2.0.0

    File flags:       0 (Mask 3F)

    File OS:          4 Unknown Win32

    File type:        2.0 Dll

    File date:        00000000.00000000

    Translations:     1009.04b0

    CompanyName:      Business Objects

    ProductName:      Crystal Reports for .NET Framework 2.0

    InternalName:     CRPE

    OriginalFilename: CRPE32.DLL

    ProductVersion:   10.2.0.0

    FileVersion:      10.2.0.1624

    FileDescription:  Crystal Reports Print Engine

    LegalCopyright:   Copyright © 1995-2007 Business Objects

    Comments:         Crystal Reports

Unable to cast object to type 'FileStreamDeleteOnClose'

$
0
0

Good morning,

 

We have a three tier application, a desktop application that uses crystal viewer to view reports, a web service running on IIS which then talks to our database.

 

With our workstation install we deploy CRRuntime_12_2_mlb_f23.msi

 

Recently, we thought about updating our web service crystal runtime. The web service is in charge of Loading the report, and talking to the database to generate the report. The web service then passes the generated report with the data to the workstation. The workstation uses the crystal viewer to open the report with the data.

 

On the web service side we updated to Crystal Reports 2008 SP4 runtime. Now, when we open a report on the workstation, the workstation gets this error that comes from the web service

 

System.InvalidCastException: Unable to cast object of type 'FileStreamDeleteOnClose' to type 'System.IO.MemoryStream'. at Hdl.Prime.Service.PrimeWCFService.RunReport(Int32 repId, List'1 repParams, List'1 licenseIDs, Int32 storeImage)

 

We believe it is generating this error when our web service makes this call within the RunReport() method

 



MemoryStream mstream = (MemoryStream)crystalRep.ExportToStream(ExportFormatType.CrystalReport); 


 

It didn't used to make this error until we upgraded to the SP4 runtime on the web server.

 

Has anything changed with the ExportToStream call. Is it returning a different object type?

 

Thank you for your time in advanced

Crystal Reports v. 13.0.5. Out of Memory

$
0
0

Hi,

 

We are looking to upgrade to Visual Studio 2012 from Visual Studio 2008 and were hoping to also upgrade to the new version of Crystal Reports.

 

We use a webservice to generate CR's on demand. However, initial tests have shown that our webservices-server will run out of memory after roughly 800 CR's. We had a similar problem when trying to upgrade to Visual Studio 2010 and as such cancelled that upgrade all together.

 

I have checked our testing code and it all seems to dispose things whereever possible including a GC.Collect() after the report has been generated and sent back over the line.

 

Is there any additional calls that we need to do in order to clear out the memory, or is this simply the same memory leak as in 2010. If the latter, is there anything we can do to prevent this? We generate a large amount of reports and having to reset the webserver daily is not a desireable situation.

 

Thanks in advance.

 

Regards,

Chris de Bruijn

Vs2010 scaling problem

$
0
0

Hi, I am using VS2010 with crystal report 13.0.5.

I am trying to print a report in A6 with some barcodes inside, but the print out is scaled casuing the barcode cannot be read by the barcode reader.

 

It is perfect in the preview using crystalreportviewer, however, the print out is smaller than what you see.

(And it worked fine in VS2003 with CR9)

 

I have searched the internet and have tried different combinations of "No Printer" and "DissociatePageSizeAndPrinterPaperSize",

Nothing works as I want.

 

What is the correct setting actually to prevent the autoscaling?

 

Thanks.

 

YL

Passing Values From Subreport to Main Report

$
0
0

I have a subreport that totals the number of hours different machines are operating. In the subreport the machines are grouped by type. The hours are summed for the group and then overall. I am trying to pass these values to the main report that is also grouped by machine type. I can get the overall hours to pass through correctly to the report header but I can't pass the group totals through to the corresponding group headers in the main report. Any ideas?

Invalidate pointer error! Export report to Microsoft Word

$
0
0

hello!

I developed an application in which I generate reports that include images, but the problem is when I want to export a generated report that is 800 pages. A MESSAGE I get "invalid pointer", then another message "Unable to export."

 

Anyone know if this has to do with the amount of images or pages in the report?

 

I appreciate your answers.


The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception

$
0
0

I've created an application with Crystal Reports Engine 13.0.5 and Visual Studio 2012. The application works on my development machine (Win8 64-bit).

 

I would like to run my application on other computer. I've installed therefore Crystal Reports Runtime 13.0.5 from:

 

32 bit

http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_5.zip

 

64-bit

http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_64bit_13_0_5.zip

 

Application displays error message after run: "The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception".

 

Can you help me?

Export to pdf causing a crash after upgrading to version 13.0.5

$
0
0

Hi,

 

I've upgraded to the latest version of SAP Crystal Reports, version for Visual Studio, using CRforVS_13_0_5.exe from version 13.0.4.

Right after the upgrade, I've run the same code that used to work on the last version and suddenly it crashes when I use the following code:

ReportDocument crystalReport = new ReportDocument();
crystalReport.Load(reportPath);
crystalReport.SetDataSource(dtData);
try
{     crystalReport.Export();  //Crashes here
}
catch (Exception e)
{
}

 

crystal crash.png

Problem signature:

  Problem Event Name:          APPCRASH

  Application Name:          ReportsMailer.vshost.exe

  Application Version:          10.0.30319.1

  Application Timestamp:          4ba2084b

  Fault Module Name:          crxf_pdf.dll

  Fault Module Version:          13.0.5.891

  Fault Module Timestamp:          50e9684c

  Exception Code:          c00000fd

  Exception Offset:          00060c37

  OS Version:          6.1.7601.2.1.0.272.7

  Locale ID:          1033

  Additional Information 1:          dbcc

  Additional Information 2:          dbcccc288555cd9c867bb7543f79ff62

  Additional Information 3:          9576

  Additional Information 4:          95762008e7f9a6425b6ab9ab5943492e

 

 

Read our privacy statement online:

  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

 

 

If the online privacy statement is not available, please read our privacy statement offline:

  C:\Windows\system32\en-US\erofflps.txt

 

One more important thing to mention - the code is running with different datatables as input and only crashes when the data exceeds a certain amount.

After click to print on toolpanel, response.redirect will not exit page!

$
0
0

Good Morning

I read these topics http://scn.sap.com/thread/3215478, http://scn.sap.com/thread/2060624 despite implements them not getting hit my application does not return to calling page, only works when print command in ActiveX, put down the code used.

Thank you.

 

Public Class ImpCustoPadrao

    Inherits System.Web.UI.Page

    Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument

 

     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 

        Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument

        report.Load(Server.MapPath("RelCustoPadrao.rpt"))

        Session.Add("report", report)

        report.SetDatabaseLogon("USER", "PASSWORD", "DB", "")

 

 

        Dim mUsuario As String

        mUsuario = Server.HtmlEncode(Request.Cookies("UserCustos").Value)

        Dim SS As String

        SS = ""

        SS = SS & "{custopadrao.User}='" & mUsuario & "'"

        report.RecordSelectionFormula = SS

        CrystalReportViewer1.ReportSource = report

        CrystalReportViewer1.RefreshReport()

   End Sub

  

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click

        report.Close()

        CrystalReportViewer1.ReportSource = vbNull

        CrystalReportViewer1.RefreshReport()

        GC.Collect()

        Response.Redirect("~/GridCustoPadrao.aspx", True)

     End Sub

 

      

    Private Sub ImpCustoPadrao_Unload(sender As Object, e As EventArgs) Handles Me.Unload

        If report IsNot Nothing Then

            report.Close()

            report.Dispose()

        End If

    End Sub

 

 

    Private Sub CrystalReportSource1_Unload(sender As Object, e As EventArgs) Handles CrystalReportSource1.Unload

        If report IsNot Nothing Then

            report.Close()

            report.Dispose()

        End If

    End Sub

End Class

CR2008 SP3 CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception

$
0
0

Hi,

I'm using CRRuntime_12_3_mlb.msi (CR2008 SP3),

While creating an instance for report document i am getting the following error:

Message:Exception of type 'System.Web.HttpUnhandledException' was thrown.
Stack:   at System.Web.UI.Page.HandleError(Exception e)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

   at System.Web.UI.Page.ProcessRequest()

   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)

   at System.Web.UI.Page.ProcessRequest(HttpContext context)

   at ASP.net_reports_crystalviewer_aspx.ProcessRequest(HttpContext context)

   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Inner Exception:

Message:The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
Stack:   at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()

   at ChameleonNET.CrystalViewer.Page_Init(Object sender, EventArgs e) in c:\inetpub\wwwroot\ChameleonNET\NET\Reports\CrystalViewer.aspx.vb:line 32

   at System.Web.UI.Control.OnInit(EventArgs e)

   at System.Web.UI.Page.OnInit(EventArgs e)

   at System.Web.UI.Control.InitRecursive(Control namingContainer)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

I've tried to reinstall CR2008 SP3 but it doesn't help.

Remarkably, I using the same configuration (HW and SW) on other sites and it works without any problems.

 

Any suggestions?

 

Regards,

Steve

Dot net Application is hanging while accessing crystal report DLL (Crpe32.Dll)

$
0
0

Hi,

 

In one of our client we are having one web application uses Crystal Reports 10.2 in Visual Studio 2005. In this application in last one month we are getting hang issue in morning (Business start times while access crystal report). To solve this we are doing app pool restarting.Sometime single app pool restareting is not solving the problem we are doing 2 to 3 times.(We sheduled app pool recycle everyday  night 12 O clock)

 

Based on this issue  we analysed the windows crash dump using windebug tool and we found Lock problem in Crpe32.dll. I have  mentioned those windebug results below. Please review and provide some permant  fix for this problem. If you are required anymore details please let me know.

 

Thanks in advance.

 

Windebug result for 2 days dumb analysis

 

============================

 

 

27th Dump File

28th dump file

CPU utilization while system slow

65%

85%

Hanging processes

Process ID Thread       Time

  26 :3a7c      0 days 0:07:31.671

15 :253c      0 days 0:00:04.734

18 :f8        0 days 0:00:01.531

Process ID Thread       Time

28 :13d4      0 days 0:23:50.453

15 :22d4      0 days 0:00:03.781

18 :2824      0 days 0:00:01.718

Process Detail

0:000> ~26s

eax=c0000425 ebx=12feec54 ecx=00000000 edx=00000000 esi=12feec70 edi=12feec48

eip=77a6955a esp=12feebf0 ebp=12feec20 iopl=0         nv up ei pl nz na po nc

cs=0023  ss=002b ds=002b  es=002b  fs=0053 gs=002b efl=00000202

ntdll!NtQueryKey+0x12:

77a6955a c21400 ret     14h

0:000> ~28s

eax=c0000425 ebx=170debec ecx=00000000 edx=00000000 esi=170dec08 edi=170debe0

eip=77a6955a esp=170deb88 ebp=170debb8 iopl=0         nv up ei pl nz na po nc

cs=0023  ss=002b ds=002b  es=002b  fs=0053 gs=002b efl=00000202

ntdll!NtQueryKey+0x12:

77a6955a c21400 ret     14h

Locks

CritSec crpe32!SetDialogFont+3a9f18 at 3ad1617c

WaiterWoken No

LockCount 4

RecursionCount 1

OwningThread 256c

EntryCount 0

ContentionCount 4

*** Locked

CritSec crpe32!SetDialogFont+3a9f18 at 3ad1617c

WaiterWoken No

LockCount 3

RecursionCount 1

OwningThread 2014

EntryCount 0

ContentionCount 3

Viewing all 3636 articles
Browse latest View live