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

CrystalDecisions.ReportSource.ReportSourceFactory threw an exception

$
0
0

I am using:

Windows 10 Pro 64 bits Version 1511 (OS Build 10586.71) on an i7-4790 CPU

Visual Studio Professional 2015 Version 14.0.24720.00 Update 1

Crystal Reports for Visual Studio 13.0.16 (downloaded and installed today Feb/01/2016).

I installed the Crystal Reports runtime engine for .NET Framework 4 (64-bit)

 

I followed the instructions in the Tutorial "Connecting to ADO.NET DataSets" (I changed the data source to SQL Server 2014 Express).

 

I built the application and there was no error reported.

 

When I tried to debug I got the error message:

 

An error occurred creating the form.

See Exception.InnerException for details.

The error is: The type initializer for 'CrystalDecisions.ReportSource.ReportSourceFactory' threw an exception."

 

The application was being compiled to Any CPU I changed it to X86 (copying the settings from the Any CPU configuration). The error message appeared again.

 

The application was targeting .NET Framework 4.5.2 I changed it to 4. The error message appeared again.

 

I deleted the application and followed the tutorial set by step again.

 

The error message is still there.

 

What am I doing wrong? How can I solve this problem?


CRforVS_13_0_15.exe VS2015 Windows 10 installation ended prematurely

$
0
0

I understand that this release (15) is validated for VS2015 and Windows 10, but I can't get it to install.

2015-10-07 12 41 53.gif

 

Where would I find the log file to see if that gives any help ?

 

I have checked to see if the problem is a previous attempt at installation but I can't see anything in "Uninstall or change program"

 

Any idea about what I should try next ?

Crystal Report viewer installation

$
0
0


Hi Team,

 

I have developed a web application with  SAP Crystal Reports Version=13.0.2000.0 and it was working fine in development environment. I need to move the application to UAT and production server . But when I try to install the SAP Crystal Reports Version=13.0.2000.0 its asking me to install the VS. Actually I dont want to set up the development environment higher environments. So Could you please let me know the required dll or the minimal installation will help me to work Crystal Report fine in higher environment.

 

Thanks

Consistent crash when using Crystal Reports 2008 Runtime SP3

$
0
0

Hi,

 

We are currently using the Crystal Reports 2008 runtime SP1 with our .NET application to generate Crystal Reports. Some of our clients complained about the export to RTF and XLS bug associated with the runtime 2008 SP1. In order to provide a fix to them, we installed and tested the runtime 2008 SP3 (as well as the Fix Pack 3.1) but it is unfortunately not a working solution. It successfully generates a Crystal Reports once only and then crashes for any other attempt (same report or different report).

 

In order to isolate the problem we wrote a little program in Visual Studio that reproduces a simplified code sequence of the calls we make to the Crystal runtime. It always crashes on the second attempt to generate a report. It seems to be a buffer overrun, that occurs in a thread other than the main thread.

 

We have proceeded to testing on Windows XP and on Windows 7. Same problem all the time. We are using .NET. As for the runtime 2008 SP3, we made our own solutions from the merge modules, and also installed the full redistribuable build, always the same issue.

 

Here is the main part of the C++ code :

ReportDocument^ RD = nullptr;

try
   {                  RD = gcnew ReportDocument();   RD->FileName = gcnew System::String("C:\\AbsStat.rpt");   Database^ ReportDatabase = RD->Database;   Tables^ ReportTables = ReportDatabase->Tables;   System::String^  SourceFileName   = gcnew System::String("C:\\AbsStatb.xml");     for (int i = 0; i < ReportTables->Count; i++)        {        Table^ ReportTable = ReportTables<i>;                          // Set the source file name to the table      ReportTable->Location = SourceFileName;                          // Test the connectivity of this data source      if (!ReportTable->TestConnectivity())         return (false);      }   System::String^  FileName   = gcnew System::String("Alex.pdf");        RD->ExportToDisk(CrystalDecisions::Shared::ExportFormatType::PortableDocFormat, FileName);   }
catch (System::Exception^ e)   {   return (false);   }
finally   {     if (RD != nullptr)     {          RD->Close();

I can provide the complete Visual Studio solution to reproduce the problem if needed. Any solution ? Thanks.

Dependencies required for SP 16

$
0
0

I see that an update; SP 16 for Reports, version for Visual Studio came out on 1 Feb.

 

Did this remove the VC++ 2005 dependency, and if it did what is the new dependency for SP 16.

 

Thanks for your assistance.

 

Ray

Crystal Reports renders differently with different display DPI sizes

$
0
0

I already asked my question on stackoverflow but there was no answer. I really hope I get more help here

 

I designed my report in Visual Studio with display DPI size 100% (Windows 7). In page setup dialog I chose a printer which all of my colleagues and all of our customers have installed with the same driver.

When I change the display size to 125% and open the report in Visual Studio it renders differently. Some text is now too wide for displaying in my text fields and are cut of. Generating the report ends with the same result (export to PDF). So at design time we have no chance to design the reports and ensure that every client generates the same document with the same design as we don't know which DPI settings the customer has chosen in his environment.

I've read much about how important it is to have the same printer with the same drivers installed on all machines that run those reports and chosing that printer in the page setup dialog. But I've read nothing about how the display size is also having an influence of the report rendering.

How can I ensure that my reports render the same on all machines with all display settings possible? Please note, that I have no problem with different printers or drivers but only with different display resolutions.

We use Visual Studio 2013 Ultimate with Crystal Reports for .NET Version 11.

Error has occurred while attempting to load the Crystal Reports runtim

$
0
0

Hi all,

 

I'm using VS 2008 to create a business app that uses Crystal Reports to display and print reports. I'm distributing it mostly to Win7 Pro 64 bit machines.

 

The program is working on ALMOST every machine, but I just installed it on a new laptop, and whenever I access the Crystal part of the program, I get the classic "Either The Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly".

 

Googling this error, the UNIVERSAL answer is "Target your VB application at x86 only." The problem is, I ALREADY DID THAT. And this program works on all my OTHER Win7 64 bit machines. It's just this one.

 

Can anyone help? I'm at my wits end. I've tried installing, uninstalling, installing while right-clicking and choosing Run as Admin...

 

Thanks,

 

Andy Oliner

Crystal Reports for Visual Studio on Client PC

$
0
0

Hi Guys

 

I created an application in Visual Studio 2015 and I am using CRforVS_13_0_15. What do I need to install on clients PC's for my application to be able to run and view the reports?

 

I tried to install the CRRuntime_64bit_13_0_15 but still cannot get my reports to show on client PC.

 

Brian.


The system cannot find the path specified

$
0
0

Hi All,

 

I have a Visual Studio web application that uses Crystal Reports built using the designer of Crystal Reports 2011.  The web application brings in the report(s) depending on which one is chosen by the user, connects to the db and then exports the report to a construction directory as a pdf.  After all the processing is done the web app moves the created report to a directory for the web.

 

These have all been running fine for a while (years) and just recently we are getting the error "the system cannot find the path specified".

 

The application works fine in our development and our staging server environments.  The production server is receiving the above error.

 

The environments are Windows Server 2008 r2 64bit, using Visual Studio 2010, Crystal Reports Runtime_13_0_13 and framework 3.5.  For data we are hooking up to a SQL server 2008.  Also the reports that seem to not be working are reports that use our CRUFL library.  Once again these have been working for some time.

 

I have tried upgrading to CR Runtime 13_0_16 to which I received out of memory.  I have since uninstalled all windows updates to when the reports last worked and reinstalled to CR Runtime 13_0_13 32 & 64bit versions.  I am still receiving the system cannot find the path specified.

 

How can I find out what is causing this error.

 

Thank You in advance.

 

Jim

Select All Section Objects for visual studio CR

$
0
0

Is this feature not implemented in the VS version?

 

I have seen mentions in the forum, but only in the standalone CR Designer.

.net runtime missing parameter exception PrintToPrinter method

$
0
0

We are getting a missing parameter exception when calling the PrintToPrinter method without setting the values for each parameter that is defined in the report.  We were expect crystal to prompt for the parameters if there were not set.  It used to do that in an older version of the activeX runtime and not the .Net runtime.  We have not been able to figure out how to make crystal prompt for parameters.  We are currently using version 13.0.2000.0 in Visual Studio 2015.

 

Please help?

 

Thanks,

 

Eric

Visual Studio 2013 crashes when attempting to save an .rpt file modified in CR '13

$
0
0

Hello,

 

We are experiencing an issue that occurs intermittently. I open, modify, and save existing .rpt files in Crystal Reports 2013.  Visual Studio 2013 crashes after opening the same file, making changes, and attempting to save:

 

vs2013_crash.png

 

It issue occurs on these machines:

 

1) Windows 7 Pro with SP1, Visual Studio 2013 Ultimate, SAP Crystal Reports for Visual Studio version 13.10.1385.

2) Windows 8.1 Pro, Visual Studio 2013 Pro, SAP Crystal Reports for Visual Studio version 13.0.15.1840, Crystal Reports 2013.

 

Did some research and tried the solution to remove XML files from c:\temp, but it did not fix the problem.  Anyone else experience the same problem and can shed light on how to fix?  Your help is greatly appreciated.

 

Thank you,

 

Demond

32-bit .NET app, 32/64 bit runtime coexistence?

$
0
0

I have seen posts earlier that indicates that bith 32 and 64 bit runtimes could coexist. My question is simply:

 

Assuming a 32-bit .Net app, will it work with just the 64-bit runtime installed? (I tried, it did not)

 

If the app indeed needs a 32 bit runtime and another app requires a 64-bit runtime, should i then install both runtimes?

Sub Report can't resolve relitave path

$
0
0

I've been having an issue where a sub report has a TTX file as a database with a relative path (".\\Cert_WorksetSpecialText.ttx""). Unfortunately when I open it in the Viewer I receive the Database connection Dialog for that file. If I use hard coded paths for the file it works fine. Also the Main reports TTX has a relative path, and it does not cause any issues.

 

simplified code is as follows:

 

 

 

     ReportDocument MainReport = new ReportDocument();

     MainReport .Load(ReportFile);

     MainReport.SetDataSource(DataTable);

     MainReport.VerifyDatabase();

     [...]

     ReportDocument SubReportDocument= MainReport.OpenSubreport(SubReportName);

     SubReportDocument.SetDataSource(SubDataTable);

     SubReportDocument.VerifyDatabase();

 

 

When displaying in the viewer I receive:

 

 

CR_DB_Dialog.png

 

 

as a work around I trued changing the Database.ConnectionInfo to a static Path by doing the following prior to setting the DataSource:

 

 

TableLogOnInfo T = SubReportDocument.Database.Tables[0].LogOnInfo;

T.ConnectionInfo.LogonProperties[0] = new NameValuePair2("Field Definition File", x);

T.ConnectionInfo.ServerName = x;

T.ConnectionInfo.IntegratedSecurity = true;

SubReportDocument.Database.Tables[0].LogOnInfo.ConnectionInfo.Attributes.Collection[4] = new NameValuePair2("QE_ServerDescription", x);

        SubReportDocument.Database.Tables[0].ApplyLogOnInfo(T);

 

 

Though on ApplyLogOnInfo it reset the path back to ".\\Cert_WorksetSpecialText.ttx". Not using the ApplyLogOnInfo did not have any noticeable effect either. I had read somewhere that setting the location after ApplyLogOnInfo would do the trick, so I tried:


 

     SubReportDocument.Database.Tables[0].Location = T.TableName;


This only created an "Connection not possible" error in VS.


I cannot change the RPT files, since our current system required the dynamic pathing in the existing files, and I am only replacing one part of the system which was based on VB 6.0 and a much older version of CR (which stopped working after a server update).


I am currently using the latest update (13.0.16.1954) and tried an earlier v13 as well.


And suggestions or help would be much appreciated.


Thanks in advance.




Invalid Table Number

$
0
0

I have a bunch of reports that were being created in CR 2008 - Well, most of them came from really old CR versions - I'm validating these reports with the CR .Net, but I have one report that I do not really know what it is happening there. If I open the report in designer everything is ok. But if I just open the report using the next code, I receive an exception. I've open the report in designer and I've removed all the components there and the behavior is the same. We have a dll which is the bridge between CR and the application, this is the interface that handles the calls to the report and as we have a lot of reports, we used to convert this component from C++ to C++/CLI and we kept the .rpt files without conversion. If I open the .rpt file in the last CR designer version and save the file, the behavior is the same.  I've done some research regarding this and I've not found anything that could help, because I'm receving the error when I'm trying to load the report. Once again, this is not regarding permissions because I'm able to load a lot of .rpt files.

 

I've just done a quick C# code in a simple windows form project and the behavior is the same, I've tried all these options without success. Am I missing something?

 

                CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

                report.Load(@"C:\arinvedtWtAmt.rpt", CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);

                report.Load(@"C:\arinvedtWtAmt.rpt", CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault);

                report.Load(@"C:\arinvedtWtAmt.rpt");

                report.ReportClientDocument.Open(@"C:\arinvedtWtAmt.rpt", 0);

 

Exception thrown in Load:

 

CrystalDecisions.Shared.CrystalReportsException was caught

  HResult=-2146232832

  Message=Load report failed.

  Source=CrystalDecisions.CrystalReports.Engine

  StackTrace:

       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod)

       at WindowsFormsApplication17.Form1.Form1_Load(Object sender, EventArgs e) in c:\Users\rmujica\Documents\Visual Studio 2012\Projects\WindowsFormsApplication17\WindowsFormsApplication17\Form1.cs:line 29

  InnerException: System.Runtime.InteropServices.COMException

       HResult=-2147483142

       Message=

Invalid table number.

arinvedtWtAmt 40276_44480_{0B6283D9-4446-4EE7-A5F0-E14EAE5AD4D7}.rpt

       Source=Analysis Server

       ErrorCode=-2147483142

       StackTrace:

            at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

            at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)

            at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

       InnerException:

 

 

I really appreciate any advice here. Thanks!

Roberto M.


Is this an issue with Crystal Reports?

$
0
0

Hi,

 

I am having an issue with reports that are created in Crystal Reports in an application that was built in Visual Studio.

 

My operating system is Windows 10 Professional, with all of the updates applied.

My copy of Visual Studio is Community Edition 2015 version 14.0.247520.0 Update 1.

The version of Crystal Reports is 13.0.2000.0.

 

This issue only started in mid January, 2016. Prior to that everything was fine.

 

The reports contain a jpeg of the company logo in the header. The application calls up a Crystal Report and fills in the invoicing information. I see all of the details, then save that report in PDF format. I am able to open that PDF file on my computer and see all of the details. However, most of the clients that are emailed the PDF files are unable to see any details in the PDF file.

 

I have asked people to try to open the files in other operating systems and have learned that they can see the details on their Ipads and on Android tablets, but not on Windows computers.

 

Reports that I create from the same application that do not have any header are readable by everyone.

 

Has anyone ever heard of a such a thing?

 

Thanks

Impersonation, with web services and load report

$
0
0

Hello all,

I have this problem, I have a work around but I don’t like it. I’m a crystal reports user a long time ago.

I use web services to print reports from “same services in the web”. I have my report file in the database, if I don’t have the rpt file in the report folder under iis dir I extract the file from de database then open the report, change the database connection in runtime and print the reports. This works fine, but I have an issue that I can’t solve.

Sometimes I need to impersonate (in code) the user to the admin (normally in windows server 2008 or 2012, for example to get the installed printers in the system) and when I open the reports with the impersonate option have the “failed open the report”, “don’t have permission”… don’t have permission? Why ? What I do so solve the problem: undo impersonation then use load then impersonation again. Can anyone explain why ?


 

Dim oRpt1 AsNewReportDocument


oRpt1.Load(Nome_Mapa, OpenReportMethod.OpenReportByDefault)

 

This behavior is since crystal report for visual studio 2003 to now ….

Thanks in advance.

 

Jorge Rocha

Crystal Reports Developer XI and Visual Studio Express

$
0
0

Hi, I am developing a program using Visual Studio Express 2013. Within one of the modules of my program the user needs to be able to do one of two things:

-Either print to pdf a report that we have previously created using Crystal Reports Developer XI

-View the report in some sort of viewer with the ability to print

 

I know that there are other posts regarding the use of CR in VS Express but I just wanted to comfirm that this applied even for just viewing or running external reports. I don't need to have developing tools (within VS) for crystal since the report has already been created, I just need a viewer that can be printed.

 

Any alternatives would also be welcome.

 

 

Thank you for your help

Speed up Crystal Reports generation on CRS2013

$
0
0

Hi all,

 

I used Crystal Reports Server 9 to generate report, the datasource is a dataset object which then set to the report in run time. The report contains 10 subreports and it takes around 20 seconds to generate and export to PDF.

 

However, after I switch the Crystal Reports Server to 2013 version, and all reports are now managed by the server. Generating the same report takes around 1 minutes which is much slower then the older version.

 

Could everyone tell me why it takes more time to generate the report? It shouldn't be problem of database or SQL since the report is not connecting to DB.

 

Also, is there any way to speed up the generation process?

 

Thank you.

ApplyLogOnInfo and performance

$
0
0

Hi

 

We have upgraded to CR2013 for Visual Studio 2012 and have a question regarding ApplyLogOnInfo.

 

Earlier in our code we did this to change logon settings:

            Dim crDatabase As Database

            Dim crTables As Tables

            Dim crTable As Table

            Dim crLogOnInfo As TableLogOnInfo

            Dim crConnInfo As New ConnectionInfo()

            Dim subRepDoc As New ReportDocument()

            Dim crSections As Sections

            Dim crSection As Section

            Dim crReportObjects As ReportObjects

            Dim crReportObject As ReportObject

            Dim crSubreportObject As SubreportObject

 

            'Set the database and the tables objects to the main report

            crDatabase = crReport.Database

            crTables = crDatabase.Tables

            'Loop through each table and set the connection info

            'Pass the connection info to the logoninfo object then apply the

            'logoninfo to the main report

            For Each crTable In crTables

                With crConnInfo

                    .ServerName = SQLServer

                    .DatabaseName = Databas

                    .UserID = "xxxxx"

                    .Password = "xxxxx"

                End With

                crLogOnInfo = crTable.LogOnInfo

                crLogOnInfo.ConnectionInfo = crConnInfo

                crTable.ApplyLogOnInfo(crLogOnInfo)

                crTable.Location = crTable.Name

            Next

 

 

            crSections = crReport.ReportDefinition.Sections

            ''Loop through each section and find all the report objects

            ''Loop through all the report objects to find all subreport objects, then set the

            ''logoninfo to the subreport

 

 

            For Each crSection In crSections

                crReportObjects = crSection.ReportObjects

                For Each crReportObject In crReportObjects

                    If crReportObject.Kind = ReportObjectKind.SubreportObject Then

 

 

                        'If you find a subreport, typecast the reportobject to a subreport object

 

 

                        crSubreportObject = CType(crReportObject, SubreportObject)

                        subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)

 

 

                        crDatabase = subRepDoc.Database

                        crTables = crDatabase.Tables

 

 

                        For Each crTable In crTables

                            With crConnInfo

                                .ServerName = SQLServer

                                .DatabaseName = Databas

                                .DatabaseName = Databas

                                .UserID = "xxxxx"

                                .Password = "xxxx"

                            End With

                            crLogOnInfo = crTable.LogOnInfo

                            crLogOnInfo.ConnectionInfo = crConnInfo

                            crTable.ApplyLogOnInfo(crLogOnInfo)

                            crTable.Location = crTable.Name

                        Next

 

 

                    End If

                Next

            Next

 

 

Now we have found out that this code also works, we only set ApplyLogOnInfo on the first table:

            Dim crDatabase As Database

            Dim crTables As Tables

            Dim crTable As Table

            Dim crLogOnInfo As TableLogOnInfo

            Dim crConnInfo As New ConnectionInfo()

            Dim subRepDoc As New ReportDocument()

 

            'Set the database and the tables objects to the main report

            crDatabase = crReport.Database

            crTables = crDatabase.Tables

 

            crTable = crTables(0)

            With crConnInfo

                .ServerName = SQLServer

                .DatabaseName = Databas

                .UserID = "xxxx"

                .Password = "xxx"

            End With

            crLogOnInfo = crTable.LogOnInfo

            crLogOnInfo.ConnectionInfo = crConnInfo

            crTable.ApplyLogOnInfo(crLogOnInfo)

            crTable.Location = crTable.Name

 

This code makes the reports display and print faster but we are not sure if this is the right way to do it.

Plz comment on this so we dont deliver something that will stop working for our customers.

 

Best regards

Kenneth

Viewing all 3636 articles
Browse latest View live


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