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

Programmatically change OLE DB properties fails

$
0
0

Hello,

 

I have a crystal report (written in CR 2013 Pro), and a Visual Studio Pro 2013 console application using the CR for VS dlls to simply export the CR as a PDF.  When I hardcode the console application to provide the report the necessary login credentials, the PDF is successfully produced.  When I attempt to pass a variable credential to the same server that the crystal was originally written to connect to, it works.  It's when I try to change the server name and database that it fails.

 

 

 

Below is based off of adding snippets from other questions.  I remarked them out - again - works fine with using same Servername as what I used in CR designer, but it fails on the .VerifyDatabase() when I edit variable ServerName.

 

 

 

 

With crConnectionInfo

 

.ServerName = ServerName

.Password = PWord

.UserID = UserID

.DatabaseName = DbName

 

End With

 

With customerReport

 

If (DebugStatementsOnOutput = 1) Then

     returnValue = 3

End If

 

 

.Load(reportPath)

 

If (DebugStatementsOnOutput = 1) Then

     returnValue = 4

End If

 

.SetDatabaseLogon(UserID, PWord, ServerName, DbName)

 

'For Each crTable As Table In .Database.Tables

'    .SetDatabaseLogon(UserID, PWord, ServerName, DbName)

'Next

 

'For Each subReport As ReportDocument In .Subreports

'    For Each crTable As Table In subReport.Database.Tables

'        .SetDatabaseLogon(UserID, PWord, ServerName, DbName)

'    Next

'Next

 

If (DebugStatementsOnOutput = 1) Then

     returnValue = 41

End If

 

.VerifyDatabase()

 

If (DebugStatementsOnOutput = 1) Then

     returnValue = 5

End If


SAP Crystal Reports 2013 printing problem in landscape orientation

$
0
0

I have developed two reports one in portrait and other one in landscape mode using SAP Crystal Reports 2013; reports are displayed in an asp.net web form application in IIS version 8.5.9600.16384 on Windows Server 2012R2. When a client access the website using IE 11 reports render correctly; unlikely when he\she try to prints the document they get inconsistence behavior for different dimensions. For Portrait orientation report: End user is prompted to setup print page, with option to select available printer which is expected behavior. Landscape orientation report: End user is prompter to print to pdf option; why an end user is force to export to pdf first then print it; unlikely if I install acrobat reader plugin it prompts me to print it (with Acrobat pdf print dialog) but in my organization that plugin is disabled and I can’t recommend it. Why there is such dependency incase of landscape reports? How can I force my application to use the same print dialog for landscape as its using for portraits. ** I have verified client machines they do have crystal reports ActiveX viewer and printer plugin installed and enabled

How to download runtimes and Crystal report for CRforVS_13_0_15

$
0
0

Please I'm using Vb.Net 2015 with CRforVS_13_0_15 and the report works fine on my machine. Now, I thought the clients will use the same CRforVS_13_0_15 so I tried to install it but I realized it is for the integration of the Visual Studio only as it did not detect any Visual Studio on the machine. Could someone please link me to the site where I can download the crystal report  for Vb.Net 2015 and the runtimes  that will be deployed on clients' machines? Thank you all.

Deployed Crystal Reports dor VS2010 crashes

$
0
0

I have setup the development environment with VS2010 and CR for 2010 ( I used the 64-bit CRforVS_redist_install_64bit_13_0_5.msi for that).

 

There the reports work just fine.

 

Then I tried to deploy them to another workstation. Fresh install Win7 64bit, With .NET 4.0 (the full version, not client) and the same redistributable file as above.

 

When I open up a report, it loads the reportviewer window but then it crashes without a meaningfull error message (Just the white windows box that this software has crashed and Windows is looking for a solution, then asks permission to send a problem report).

 

Did I miss something in the way the systems are setup ? Why would it work in one environment (albeit that one has VS2010 also) and not the other ?.

 

Kind regards,

 

Petri

Application pool not freeing when using crystal reports13 for Visual studio

$
0
0

Hi,

 

We use crystal report 13 for print from our application,but what is being observed is that connections opened by crystal reports are not closed  and the application pool makes the application to crash when the number of active users to application increases..

 

When the application pool is recycled the application starts functioning normally.

 

Is there anything that needs to be done to close the active connections or free up the application pool...

 

Thanks in advance

Crystal Reports fix to work on Windows 10

$
0
0

Hi,

I would like to know when Crystal Reports can work on Windows 10.

I saw that fix 15 holds a fix if I understand correctly but only for Visual Studio.

 

Any roadmap to support Windows 10?

 

Regards,

Roei

DataSet does not support System.Nullable.

$
0
0

Good day sir. i am design my project with asp.net with mvc technology. i use crystal report for visual studio (CRforVS_13_0_15) to design my report. When i try to preview my report i have a message "DataSet does not support System.Nullable<>." when i add the datasource to my crystal report document (

Line 488: rptH.SetDataSource(model);

). i declare model as a list of object like this : "List<object> model = new List<object>();"

i am using C# language.

Please somebody can help me to understand what happend and help me to have a solution.

Thank

Report using wrong database name in fully qualified table names

$
0
0

Background

Consider three SQL databases: Test, Production, and ProductionCopy. All three databases have identical schemas. All are running on the same server.

 

I have a report with several subreports. This report makes use of both Crystal Reports database commands and directly reading the database tables.

 

When developing the report inside the Crystal Reports IDE, I have set all datasource locations to point to Test. At runtime in my .NET application, all report datasources in the CrystalDecisions.CrystalReports.Engine.ReportDocument object are recursively set to Production.

 

Problem

When I run this report against Production, all data from tables is being read from Test. All data from Crystal Reports database commands is being read correctly from Production.

 

When I run the report against ProductionCopy, the problem goes away.

 

The only change being made to switch between the two is to the connection string in the application's Web.Config file.

 

When I run the application from Visual Studio, the problem goes away. To recreate, I have published the application to run locally on IIS.

 

Running traces in SQL Server Profiler, all report queries are being executed against the proper database. However, when running against Production, the queries reading directly from tables are using Test in the fully qualified table name.

i.e. SELECT "SomeTable"."Foo", "SomeTable"."Bar", "SomeTable"."Baz" FROM "Test"."SomeSchema"."SomeTable"

 

However, when running the report against ProductionCopy, the fully qualified table names are correct.

i.e. SELECT "SomeTable"."Foo", "SomeTable"."Bar", "SomeTable"."Baz" FROM "ProductionCopy"."SomeSchema"."SomeTable"

 

What I Have Tried

Restoring ProductionCopy directly from the live version of Production, to ensure that both contain identical data.

 

Attaching a debugger to the IIS process to check the values of the data connections in the ReportDocument object at runtime. At the point ExportToStream is called on the report, all database and datasource connections for the report and all subreports point to Production.

 

Attempting to serialize the ReportDocument object so that it can be searched for all instances of the string "test", though I was unsuccessful in my attempts.

 

Updating to the latest versions of Crystal Reports 2013 (14.1.6.1702) and Crystal Reports for Visual Studio (13.0.15.1840).

 

Running another report with a similar structure, but the problem does not occur.

 

Next Steps

It turns out I can't attach a .rpt file to this post, and I definitely can't attach a MCVE.


Connect to SAP ECC 6.0 database with Crystal Report Viewer for .NET

$
0
0

Hi all,

 

I want to load a report in the Crystal report viewer which has a datasource connection to a SAP instance.

 

I can open the report and show my report  in the Crystal Reports 11 application

I can load reports and show results with the reportViewer for .Net for eg.: Oracle databases

Loading my report with an SAP ECC 6.0 database destination also works but after providing parameters and logonInfo I get the error message:

 

"Error loading the database information" while connection to the SAP ECC 6.0 database

 

Does Crystal reports viewer works together with SAP ECC? Do I need any additional libraries? Is there somewhere an example code for the connection to ECC databases?

 

Thanks in advance for your help,

Andreas

 

German original text: Fehler beim Laden der Datenbankinformationen.

 

Used components: Crystal reports 2011, Visual studio 2013, SAP ECC 6.0

Exception while exporting the CrystalReport to PDF/Excel/Word

$
0
0

My .NET application works fine when I use the CrystalReportViewer to view the generated reports and later export to pdf/excel/word.
However it throws me this runtime exception when I try to export the report programmatically to one of the formats as mentioned above.

 

The code basically tries to export the crystal report to a certain format

 

For ex:

rptLayout.SetDataSource(dataset);

rptLayout.ExportToDisk(ExportFormatType.PortableDocFormat, "C:\\TEST.pdf");

 

 

 

Method not found: 'CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx()'.

 

A little bit of search on the web yielded me no proper response except to install latest CR Runtime.

 

My dev pc configuration

 

  • IDE is Visual Studio 2010
  • Programming language as C# .NET 4.0
  • Version of SAP Crystal Reports for Visual Studio : 13.0.14.1720

 

Can anyone at SAP let me know what could be the possible reason for this issue

 

This issue needs to be fixed on priority in our application

 

Thanks

Srivatsa

Problem with printing multiple reports in loop

$
0
0

I have a WinForms Application (.net 4.0, x86) with Crystal Reports (13.0.15).

I want to print multiple documents using Crystal Reports (without seeing them on Report Viewer - directly on printer).

foreach(var document in documents )

{

  ReportDocument report=GenerateReport(document.id);

report.PrintToPrinter(printerSettings, pageSettings,false);

}

Everytime it prints 48 reports and on 49th print I've got exception

System.ComponentModel.Win32Exception The handle is invalid Void OnStartPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs)

I tried another set of documents but I still have exception on 49 print.

I tried to change PrintJobLimit to over 9000 but it doesn't help.

Next I tried to dispose report after print:

foreach(var document in documents )

{

using (ReportDocument report=GenerateReport(document.id))

  {

report.PrintToPrinter(printerSettings, pageSettings,false);

  }

}

But now program crashes before print 28th report and I cannot catch exception (program stop working). Only in Event Viewer is information about Application Error (Faulting module name: ntdll.dll). I tried different things (and combination of them):

  report.Close(); 


report.Dispose(); 


report=null;

even GC.Collect() after print but it still doesn't work.

Anybody has a solution (an idea)?

Crystal Reports Upgrade for visual studio 2010

$
0
0


I am using Visual Studio 2010,

Development  system is windows 7 64 bit.

Application is installed on windows 7 32 bit and windows 7 64 bit.

 

Currently I am using crystal reports 11 rel2 with Visual studio 2010. Since Crystal Reports 11 rel2 is not supported with Visual studio 2010, I nned to know what version of crystal Reports is supported for visual studio 2010.

 

My client some are using windows 7 32 bit and some are using windows 7 64 bit. Please advise supported version of crystal report.

Error While loading Crystal reports deployed on IIS 7.5

$
0
0

Hi ,

 

We are encountering below error while loading Crystal reports deployed on IIS 7.5 for an asp.net mvc project 

 

Here is what we have done so far

 

1.       Downloaded Support Pack 14 (v.13.0.14.1720)  Install executable from http://scn.sap.com/docs/DOC-7824

2.       Installed it  on the development machine where Visual studio 2012 is available

3.       We have used web pages (.aspx) to load the crystal reports

4.       From VS 2012 it works fine; In localhost.

5.       Downloaded crystal report runtime 64 bit (64bit.msi)  from http://scn.sap.com/docs/DOC-7824    and deployed in web server

6.       Access the report page.  Getting below error

7.      Note : Both our application and IIS is configured for 64 bit

 

System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.CRPE' threw an exception. ---> CrystalDecisions.Shared.CrystalReportsException: Could not load C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\crpe32.dll. at CrystalDecisions.CrystalReports.Engine.CRPE..cctor() --- End of inner exception stack trace --- at CrystalDecisions.CrystalReports.Engine.CRPE.CloseCrpe() at CrystalDecisions.CrystalReports.Engine.ReportDocument.InternalClose(Boolean bSetupForNextReport) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Close() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at Avery.Magma.Web.WebForms.CrystalReport.Page_Init(Object sender, EventArgs e)

 

Thank you


Report Document Preview Error

$
0
0

Hi All,

 

Please how do i resolve this following  error:

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

 

This comes up when i run my application online but doesn't occur when i run it during design.

The application was developed with VS2010 with Crystal Report 2010, and hosted on a 64bit Window server 2008 Server.

I have installed the both VS2010 and Crystal Report on the server with no result.

 

Anyone, Everyone, please help.

 

KayMan

Does Crystal Reports for Visual Studio Supports VS 2015 Community Edition.

$
0
0

Hello,

 

This is probably a frequently asked question but I was not able to find a concrete answer after searching the forums so forgive me if I am asking something that has already been asked before.

 

 

Questions:

 

1) Does Crystal Reports for Visual Studio (CRforVS_13_0_15.exe) supports the Visual Studio 2015 Community edition version (the free Visual Studio edition)?

 

2) If the previous answer is yes, what would happen if a Visual Studio 2010 development environment has CRforVS_13_0_4.exe installed and then I install CRforVS_13_0_15.exe on that same machine? Will the Visual Studio 2010 environment break?

 

Thanks.


have a problem to print my receipt with the printer epson lx-350 esc/p

$
0
0

Good day sir. I develop my projet with asp.net mvc and i use Crystal report v13 embedded in VS2013 to generate my report.

When i preview my report it was ok but when i try to print the report with printer epson lx-350 esc/p the quality of document print was too bad.or sometime the format of paper was change to landscape to portrait.

I really not understand beacause when i try to print the same document with another printer the result was excelent.

Please if somebody can have and idear and explaind me what i can do.

Thank

Connectivity Issue

$
0
0

This is a post on behalf of Mr. Zdenek Vykipal:

 

 

 

" Problems porting 32-bit Crystal reports from ODBC to 32-bit ADO provider for Oracle - getting "Log on failed" exception.

 

I used code examples from the web to load a report from file, create ConnectionInfo and assign the new connection information to the tables and sub-reports.

 

Upon return from the failed login attempt ("Log on failed" message), the new log on dialog displays the original ODBC values in the Server Name and Database fields. It is worth noting that I am able to create working x86 applications using the Oracle.DataAccess.dll.

 

Thanks for your help.

 

Best,

Den "

Bobj is undefined with latest Microsoft Fixes.

$
0
0

Hello,

   We are using Visual Studio 2015 with Crystal Reports for VS SP15.

   The reports were working correctly yesterday but today after a series of Microsoft fixes the reports stop working.

    What happened after some investigations is that previously when calling a reports the Crystal files URL location was:              /aspnet_client/system_web/4_6_81/crystalreportviewers13

 

   But after the installation the Crystal files URL location is: /aspnet_client/system_web/4_6_118/crystalreportviewers13

 

     We have fix the issues by creating the missing folder but I think a fix will be required with the next service pack. I don't know if the .Net version/file location is change often and if a better solution could be found

 

Here is the list of fixes that were installed regarding Framework 4.6:

  • KB3098786
  • KB3098001

 

Thank you.

Charles

CR asking for logon creds when they are set programmatically

$
0
0

Ok.  So I know this question has been asked alot, but I am having this issue now and have had it in the past.  I would like to try and understand what is going on and come up with a permanent solution so this does not keep happening. 

 

I have a .Net web application with CR embedded into the solution.  When I run the report in production it is asking me for the database information.  I am supplying the db, password, etc using code like the one seen below;

 

reportDatabase = "xxxx"

        reportServer = "xxxx"

        reportUsername = "xxx"

        reportUserpwd = "xxx"

 

 

reportPath = Server.MapPath("Reports/Traceability/TraceForward/TraceForwardGiveUBIGetCustomer.rpt")

                    newTraceabilitycr.ReportDocument.Load(reportPath)

                    newTraceabilitycr.ReportDocument.SetDatabaseLogon(reportUsername, reportUserpwd, reportServer, reportDatabase)

                    newTraceabilitycr.ReportDocument.SetParameterValue("@UBI", parmUbi)

 

 

Again it is working fine in my dev environment.  Also not all reports have this issue in production, only some of them.  Any ideas?  Please help.

Passing DataView as Parameter. Missing File ??

$
0
0

Using Visual Studio CE C# with CR 13.0.15

 

using CrystalDecisions.Shared;

using CrystalDecisions.ReportSource;

using CrystalDecisions.CrystalReports.Engine;

 

I thought I could get round the problem by making use of the rep.RecordSelectionFormula method but it did not meet my users needs as the syntax required it too complex. they prefer an SQL approach when setting a filter.

 

So anyway..

 

On my form, I have a grid showing a list customers. I have a filter function that filters down the data on the grid. This works fine,

 

I filter the data by passing a string (filterText) to the dataset. Something like countryID = "DE":

 

ds.Tables[0].DefaultView.RowFilter = filterText;

 

This returns a DataView Object.

 

Is there anyway I can pass this dataView object to my report and use it as a datasource for my report ?

 

I have tried it but I am getting error message:

 

crystal2.jpg

 

It appears I am missing the 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'"

 

Where / How can I get this file ?

 

J

Viewing all 3636 articles
Browse latest View live


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