Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports, version for Visual Studio
Viewing all 2556 articles
Browse latest View live

Server Error in '/' Application

$
0
0

Hi,

 

I have been using Crystal reports since Visual Studio 2005 days with ASP.Net.

 

I moved over to Windows Server 2012 R2 where I installed version 13.0.15.1840, both SAP Crystal Reports runtime for .Net Framework (64 bit) and SAP Crystal Reports, version for Microsoft Visual Studio.

 

Everything works fine but every now and again I get the following error on the server:-

Retrieving the COM class factory for component with CLSID {4D.....} failed due to the following error: 800703fa Illegal operation attempt on a registry key that has been marked for deletion (Exception from HRESULT: 0x800703FA)


I am then required to restart the server.

 

Any help regarding this issue will be appreciated.



DivisionByZeroException using WPF Viewer

$
0
0

Hello, on some computers we experience DivisionByZeroException when trying to print report.

 

The full stack trace is :

 

System.DivideByZeroException: Attempted to divide by zero.

  at SAPBusinessObjects.WPF.Viewer.ReportPaginator.paginate()

  at SAPBusinessObjects.WPF.Viewer.ReportPaginator.GetPage(Int32 pageNumber)

  at System.Windows.Xps.Serialization.Toolbox.GetPage(DocumentPaginator paginator, Int32 index)

  at System.Windows.Xps.Serialization.DocumentPaginatorSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)

  at System.Windows.Xps.Serialization.DocumentPaginatorSerializer.SerializeObject(Object serializedObject)

  at System.Windows.Xps.Serialization.XpsSerializationManager.SaveAsXaml(Object serializedObject)

  at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)

  at System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator)

  at System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator, String description)

  at SAPBusinessObjects.WPF.Viewer.PrintControl.Print()

  at SAPBusinessObjects.WPF.Viewer.ReportAlbum.PrintReport()

  at SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer.PrintReport_Executed(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)

  at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)

  at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)

  at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)

  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

  at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

  at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

  at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)

  at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)

  at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)

  at System.Windows.Controls.Primitives.ButtonBase.OnClick()

  at System.Windows.Controls.Button.OnClick()

  at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

  at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)

  at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

  at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

  at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

  at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

  at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

  at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)

  at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

  at System.Windows.Input.InputManager.ProcessStagingArea()

  at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

  at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

  at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

  at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

  at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

  at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

  at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

  at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

  at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

  at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

  at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

  at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

  at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

  at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

  at System.Windows.Threading.Dispatcher.Run()

  at System.Windows.Application.RunDispatcher(Object ignore)

  at System.Windows.Application.RunInternal(Window window)

  at System.Windows.Application.Run(Window window)

 

The version we are using is SAPBusinessObjects.WPF.Viewer.dll, 13.0.1.220

 

Please advise.

Visual Studio & ASP.NET Basics

$
0
0

Im just getting started with this and have a fairly simple requirement I'm wondering if someone can point me in the right direction.

 

I wish to achieve the following

 

1. Design a report (connect to db etc)

2. Define paramaters for this report

3. Pass these paramaters into the report at run time

4. With no viewer, have the report generate and save as a PDF output

 

If someone could assure me this is all possible and if anyone has any sample code, specifically for steps 3 & 4

 

Thanks

Exporting to PDF in CR 13 for VS 2015 decreases font size

$
0
0

Hi.

 

We need to show a new report in our website giving the users the chance to download it (using Export to PDF). Users are complaining about the decreasing font size issue seeing the remarkable differences between two reports, the one shown in the website, which displayed the actual Verdana 9, and the PDF exported one, which decreases the font to Verdana 7.5.

 

We’ve learnt about the solution of changing the registry key entry ForceLargerFonts, but this will affect around 200 already developed reports which are produced by this server. But we need to set ForceLargerFonts for this particular report...

 

So the questions are:

 

  1. Is there a way to implement ForceLargerFonts per report? We’ve found this thread http://scn.sap.com/thread/1893426 from 2011 and we’re wondering if there has been any progress since then.
  2. Is there some tool to mass-convert our already developed reports? I.e. some tool to convert the fonts of the existing reports to the size actually displayed in the PDF, so we can then set ForceLargerFonts in that server.
  3. It’s also mentioned in that thread that ForceLargerFonts have to be used with care, since you may get into issues where text becomes hidden or overlaps. Is there a KB article giving more details about these issues? We haven’t been able to find any.
  4. Any other idea somebody has come up with? We really don’t know how to proceed with this, setting ForceLargerFonts and then manually changing 200 reports is unfeasible for us, and then there’s the issue of the problems we may run into down the road. But we really need to fix this new report.

 

Thank you for your time.

 

Sincerely,

Regina

error running PC application client

$
0
0

I have designed an application where I have crystal report , all is well while debugging my application with VS2010 , the problem is that when I run my application object on the client pc throws me the below Error : 


{"No se puede cargar el archivo o ensamblado 'file:///C:\\Program Files (x86)\\SAP BusinessObjects\\Crystal Reports for .NET Framework 4.0\\Common\\SAP BusinessObjects Enterprise XI 4.0\\win32_x86\\dotnet1\\crdb_adoplus.dll' ni una de sus dependencias. El sistema no puede encontrar el archivo especificado.":"file:///C:\\Program Files (x86)\\SAP BusinessObjects\\Crystal Reports for .NET Framework 4.0\\Common\\SAP BusinessObjects Enterprise XI 4.0\\win32_x86\\dotnet1\\crdb_adoplus.dll"}



and check the dll file location referred in error , and me the error persists, also manually load the dll , also install the redistributable package for x86 also istale the cr_13_1 and the problem persists me . Please I need help because I have several days fighting with this problem


thank you

Table object in crystal reports

Windows Edge Compatabilty

$
0
0

Not sure if anyone has the answer to this,

 

However,

 

What is SAP's goal for providing Windows Edge Compatibility, since ActiveX has been dropped.  CR viewer displays, however no printability using the print control!!!!

 

Thanks

CR Reports won't run against SQL Server with TLS1.0 disabled

$
0
0

In order to pass a PCI Compliance scan, we needed to disable SSL3/TLS1.0/TLS1.1 on our server running SQL Server.

After getting SQL Server patched to make this possible.  We ran our application

against the DB, at first it did not work until we had to make sure that the client PC's

had .NET framework 4.5 or higher (not specifically related).  After that the client app worked as it did before

against the SQL server ...Except one thing.  Now Crystal Reports won't run against the DB.

 

Now when we run a report, it will always prompt for DB credentials and even if we provide them it will not connect to the DB.

This is started as soon as disabled the above protocols. In our app, we pass in the DB credentials.. and it worked until now.

 

So, it is obvious related to disabling the protocols (?).

 

We then attempted to run CR2008 designer against the same DB, the designer will not connect to that SQL Server either.

 

Environment

CR 2008 report designer

Tested with both Visual Studio 2013/2015

Tested with .NET 4.0 and.NET4.5 and .NET 4.6

App is compiled as 32bit

Crystal Run Time (tested with both)

    Crystal Reports XI Release 2 .NET 2005 Server (11.5)

    SAP Crystal Reports, version for Microsoft Visual Studio (latest version sp15/v.13.0.15.1840)

SQL Server: tested with 2012 and 2014   

We do NOT use encrypted connections to SQL Server

 

 

Anyone know if/why CR run-time uses any of the protocols above?  If CR does use ssl in some form,

is there any way to force it to use TLS1.2?

 

Any other thoughts or suggestions?


How to reference a Report Section from code?

$
0
0

In VB6 w/CR8.5 I used to do this:

moCrystalReport.Sections.Item("Section1").Suppress = True

 

How can I do this in VS2013 with the latest version of CR?

It tells me Sections isn't a member of the ReportDocument.

 

How can I easily correct this?

Error 404?

$
0
0

Hi,

 

I am using Crystal Reports XI R2 to design my reports but using version 13 of the files in my project (vs2010). Everything worked on Server 2008 but on Server 2012 I get error 404. At first I thought it was because I was doing a window.open command to open a new web window. I created an empty form and the popped up fine. It only seems to be happening on forms which create a report and show it as a PDF.

 

If you need anymore information please ask, sorry if it's a bit vague but so is error 404.

 

Regards,

 

Roger

Crystal Report for Visual Studio - Change Legend Text

$
0
0

Dear all,

 

I am now designing a crystal report file (RPT) to create a chart using Visual Studio.Net using

1. Crystal Report for Visual Studio.Net 13.0.8

2. Visual Studio 2013

 

I know how to feed data to the RPT (by program written by Visual Studio 2013) such that the data is displayed as a bar chart correctly.

However, as I want to show the legend as well, and the text of the legend is "changable", I want to control the texts on each legend label by program.

 

I know how to edit a "static" legend label by right-click the label and select "Edit Axis Label" in Crystal Report. But, how can I do it inside my program (as the label is 'dynamic' in my case.)

 

Thanks,

Stephen

Web Crystal reports rpt files font are changing when used same under wpf sap report viewer

$
0
0

Hi,

 

I developed some web crystal reports with the version  Version=10.5.3700.0 .

Now i am trying to use the same rpt files in my wpf application and try to run the report, Report is getting loaded properly.

But problem is that font is getting bigger automatically and we print the report from viewer, fields are getting cutoff because of bigger font .

Same rpt files are working properly in web application.

 

In my wpf application I am using Sap SAPBusinessObjects.WPF.Viewer with version 13.0.3500.0.

Could any one help me out in this.

 

Thanks In advance,

Bharani.

How to use ADO.Recordset as Datasource for report that does not have a database?

$
0
0

I am using the newest version of CR and I am trying to convert my reports from an older version of CR (8.5).
Some of my reports do not contain a link to a database or contain field definitions (TTX,XML).  In VB6, I simply set the Datasource to the ADO.Recordset then issued a .ReadRecords.  I need to be able to do this still. Below is a watered down example of what my older VB6/CR8.5 did:

 

Private Function MyReport00() As Boolean

   Dim strSQL As String

   Dim iRow As Integer

 

   strSQL = "SELECT * "

   strSQL = strSQL & "FROM MYTABLE"

  

   moRS.Open strSQL, moLogin.Connection(moLogin),adOpenStatic,             adLockReadOnly,             adCmdText

 

   If Not moRS.EOF Then

      Set CrAppl = New Application

      Set moCrystalReport = CrAppl.OpenReport(moRpt2Make)

      With moCrystalReport

         .Database.AddADOCommand moRS.ActiveConnection, moRS.ActiveCommand

         .Database.SetDataSource moRS, 3

         .AutoSetUnboundFieldSource crBMTName

         .ReadRecords

      End With

   End If

   Exit Function

 

 

I am mainly trying to figure out how to make this block work:

      With moCrystalReport

         .Database.AddADOCommand moRS.ActiveConnection, moRS.ActiveCommand

         .Database.SetDataSource moRS, 3

         .AutoSetUnboundFieldSource crBMTName

         .ReadRecords

      End With

 

Then on my report I have about 5-10 Formula Fields that contain this:

WhileReadingRecords;

Space(10)

 

Then when my report loads all my data displays as desired.


If I need to convert my Recordset to a DataSet/DataView that wouldnt be a huge change, but having to adjust all my Formula Fields that use the While Reading Records would be a huge change and lots of work.  Is there a way to use Datasets/DataViews as the Datasource but have a Database Fields table linked to the report?

 

Any help would greatly be appreciated.

Create Color Highlight Programatically

$
0
0

Dear all,

 

I have a RPT file which contains a chart:

1.png

I can use Crystal Report to create color highlights based on values in Transaction.Group:

6.png

However, since the values of Transaction.Group is varied (based on the inputted data),

Can I create Color Highlight programmatically (in my program writtern in Visual Studio 2013, which uses libraries CrystalDecisions.CrystalReports.Engine.ReportDocument to load the RP).

 

Thanks,

Stephen

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

$
0
0

Hi,

 

On my windows 7 64 bit Development Pc with .net4 framework installed, I have developed a desktop app using visual studio 2010, SQL Express 2008 and I used crystal reports for printing purposes.

Whilst printing, On the development machine all reports print perfectly (with a few exceptions),

however on deployment machine, the app works great but when printing I get the error

'The type Initializer for CrystalDecisions.Shared.Sharedutils threw an exception'

 

This happens on all deployment PC's including windows 10 tablets.

 

I have installed the support pack 13 (v.13.0.13.1597) on development machine,

and I have attempted to install the MSI's on the deployment machine but to no avail.

 

all help is greatly appreciated.


Crystal Reports Viewer KeyDown Event

$
0
0

I have a generic CR Viewer Windows Forms app written in C# (VS2013) which accepts CR parameters and uses the CR Viewer to display the report. It resizes the viewer to fit the window thus covering all other controls. I've used the viewer's double click event to hide the viewer when done so the user can change the parameters and do another report. I have also set the form's CancelButton (i.e. Escape) close the form.

When the viewer is made visible and full sized, I make the Cancelbutton null so the form doesn't trap the key and placed code behind the viewer's double click and key down events to hide the viewer, but only the double click event is ever fired. The key down event is never fired, even if I click on the viewer 1st and the press Escape.

Can anyone suggest a way I can use the escape key whilst the viewer is visible to hide the viewer thus allowing the use of the original form controls?

Thanks in advance.

When I design a file made in CrystalReports and displayed it,popup out of the expiration date of the certificate is displayed

$
0
0

When I designed a file made in CrystalReports and displayed it,

popup out of the expiration date of the certificate came to be displayed.

 

Therefore, please instruct end run; thanking you in advance.

 

※For the validity of the certificate, it was 2014/10/27 - 2015/10/27.

  It is after what this matter produced became 2015/11.

 

OS:Windows7

CRVersion:SAP Crystal Reports, developer verion for Microsoft Visual Studio

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

 

A development environment : Visual Studio 2012

Problem when installed 32bit MSM and 64 Bit MSI for Cryatsl report 13

$
0
0

I am facing problem while exporting the crystal report in PDF,Excel etc.

After analyzing the issue we found that our application has SAP Crystal Reports runtime engine for .NET Framework (32-bit) version 13.0.13.1597 MSM installed. And there is one more application which had installed SAP Crystal Reports runtime engine for .NET Framework (64-bit) version 13.0.13.1597 MSI.

 

When we tried to export the report in PDF,Excel etc, its throwing and exception -

Method missing CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx() in export

Crystal reports barcode shrink when generate pdf from asp.net mvc

$
0
0

im use following code to generate pdf from crystal report in ASP.NET MVC platform


[HttpGet]   public ActionResult ClassCard()   {   ReportDocument rd = new ReportDocument();  rd.Load(Path.Combine(Server.MapPath("~/Reports"), "ClassCard.rpt"));  rd.SetParameterValue("ClassName", "Kandy");  rd.SetParameterValue("Type", "Group Theory");  rd.SetParameterValue("year", "2016");  rd.SetParameterValue("Student", "KDG0012");  rd.SetDatabaseLogon("DB_74931_rmsecon_user", "snb123");   Response.Buffer = false;   Response.ClearContent();   Response.ClearHeaders();   try   {   Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);  stream.Seek(0, SeekOrigin.Begin);   return File(stream, "application/pdf", "EverestList11.pdf");   }   catch (Exception ex)   {   throw ex;   }   }

this give me pdf as below


http://i.stack.imgur.com/hB2Qi.png

but as you see the barcode is shrinked ,how im solve this problem in ASP.NET MVC enviroment

i saw most people say add registy key ,but i cannot do this coz this is asp.net mvc web application and im going host this app on sheared server

if im Add below regiter keys the problem will solve only for if im generate crystal report in local desktop app please help

 

 


First page of Crystal Report is coming blank while viewing in browser.

$
0
0

Hi all,


     I am using Visual Studio 2010 and SAP Crystal report application for creating simple local website. I added the crystal report by Crystal Report Viewer and bind the report using its relevant code in C#. On debugging website, crystal report appears but when I set its parameters and click on button, crystal report viewer will turn blank and no data appear. While clicking on next page button data of 2nd and all upcoming pages appear in the crystal report viewer and on clicking export button whole record come there.

    This problem was noticed on Internet explorer 9 and Mozilla Firefox but when I place the address of the local website on IE and Firefox no such issue was noticed.

     How can I avoid this problem???

Viewing all 2556 articles
Browse latest View live


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