crystal report initialize on x64 - crystal-reports

I have a program that works properly on x86. also it works on systems with visual studio without error even on x64. but on x64 systems without visual studio, occur error when call reports. message exception is :
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
Source:
CrystalDecisions.CrystalReports.Engine
Stack Trace:
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
and message that contain this decription :
An error has occurred while attempting to load the Crystal Reports runtime.
Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.
Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information.
my program is based on:
.net framework 4
visual studio 2012
crystal report 13.0.2
and install CRRuntime_64bit_13_0_2 sometimes.
Can anyone help me?

One possible solution
Go to your application project, right click, and select "Properties"
On the Build tab, find the Platform Target combo box. It probably says, "Any CPU".
Change this to x86 and your project will compile for 32 bit only, thus eliminating the issue.

Related

Compilation of Postgresql using pycparser- header files not found

I have installed pycparser that parses C code.
Using pycparser I want to parse an open source project, namely PostgreSQL(version-11.0). I have build it using Visual Studio Express 2017 compiler suite. However, during compilation it cannot find some header files, namely windows.h and winsock2.h.
While looking at the directory structure of the build PostgreSQL, I find that it does not have these header files. How to fix this issue?
Also a strange error occurred as:
postgresql/src/include/c.h:363:2: error: #error must have a working
64-bit integer datatype
Note: I am using Windows 10 64-bit platform and postgresql-11.0
The steps are as follows:
I downloaded visual studio 2017, Windows-10 SDK, Active Perl as described in the steps to build from source in PostgreSQL.
After this I open the developer command prompt of Visual Studio and navigate to the folder postgresql-11.0/src/tools/msvc
Use command "build" to build postgresql. The build process was successful, but still windows.h and winsock2.h was not found in directory structure of PostgreSQL.
I don't know pycparser, but your problem probably has two aspects to it:
You didn't give pycparser the correct list of include directories. The header files you mention are not part of PostgreSQL.
Maybe you can get the list from the environment of the Visual Studio prompt. I don't have a Windows here to verify that.
The error message means that neither HAVE_LONG_INT_64 nor HAVE_LONG_LONG_INT_64 are defined.
Now pg_config.h.win32, which is copied to pg_config.h during the MSVC install process, has the following:
#if (_MSC_VER > 1200)
#define HAVE_LONG_LONG_INT_64 1
#endif
Since you are not using MSVC, you probable don't have _MSC_VER set, which causes the error.
You could define _MSC_VER and see if you get to build then.
Essentially you are in a tight spot here, because pycparser is not a supported build procedure, so you'll have to dig into the source and fix things as you go. Without an understanding of the PostgreSQL source and the build process, you probably won't get far.

Connecting DevExpress XtraReports with PostgreSQL in Visual Studio

I have DevExpress XtraReports v18.1.6 version and PostgreSQL 4 v3.3. Visual studio 2017 v15.3.3 and Windows 7.
Here is scenario: In my project, I have some reports writen in devexpress v17.2. I could not run those reports, because I could not download exactly that version 17.2, I install new 18.1.6. Then in Visual studio main menu "DevExpress" I click on "Project converter to 18.1.." and that action replace my old dlls v17.2 with new 18.1. After that I could run reports (see it in designer).
But problem is with databse connection. I created connection string with "XpoProvider=Postgres".
Every time when I want to get data in report, or rebuild result shema, or manage queries I get error:
Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0,...
I have that reference, exactly that version. Also I tried with new versions of threading.tasks but unsuccessfully.
My version of Npgsql.dll was 2.2.7, I tried with 3.2.5 (read from some devexpres documentations). Also tried with new 4.0.3.
Did anyone have a similar problem?
we had the same issue when using the DevExpress (18.1) Report Designer with Visual Studio 2017.
I know this might not be an ideal or the best solution but at least it worked for us:
I used ProcMon to determine where it was looking for that specific File, for me it turned out to be C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\hhfnlhs1.kna
I downloaded the NuGet Package for System.Threading.Tasks.Extensions from NuGet (https://www.nuget.org/packages/System.Threading.Tasks.Extensions/)
I unzipped the Package and stored the DLL at that path from step 1
I had to active "loadFromRemoteSources" in my machine-config (see https://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/dd409252(v=vs.100))
I had to put another DLL from NuGet (https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/4.5.2) into that folder from step 1
That's it - now I can access the DB again.

Why does running a .NET Core application from VS Code cause an error to occur?

I am trying to run a .NET Core version 1.1 application from inside VS Code version 1.8.1. When I push the F5 button, the console appears at the bottom of the screen. After enabling tracing, I get this output:
Reading fx resolver directory=[C:\Program Files\dotnet\host\fxr]
Considering fxr version=[.]... Considering fxr version=[..]...
Considering fxr version=[1.1.0]... Detected latest fxr
version=[C:\Program Files\dotnet\host\fxr\1.1.0]... Resolved fxr
[C:\Program Files\dotnet\host\fxr\1.1.0\hostfxr.dll]... Loaded library
from C:\Program Files\dotnet\host\fxr\1.1.0\hostfxr.dll Tracing
enabled
--- Invoked hostfxr [commit hash: 928f77c4bc3f49d892459992fb6e1d5542cb5e86] main Own DLL
path=[C:\Program Files\dotnet\dotnet.dll] Checking if CoreCLR path
exists=[C:\Program Files\dotnet\coreclr.dll] Detecting mode... CoreCLR
present in own dir [C:\Program Files\dotnet] and checking if
[dotnet.deps.json] file present=[0]
--- Executing in split/FX mode... Detected a non-standalone application, expecting app.dll to execute. Application 'build' is not
a managed executable.
Also, a bar appears at the top of the screen that says:
The preLaunchTask 'build' terminated with exit code 2147516564.
When I click the "show problems" option, a blank problems tab appears that contains the message:
No problems have been detected in the workspace so far.
Why is VS Code refusing the build the project, and why are there no problem messages? I am only posting this on SO, because Google was not helpful, and because the VS Code GitHub page recommends asking questions here first.
UPDATE
This problem was caused by me having put coreclr.dll in C:\Program Files\dotnet. I did this, because of a different problem related to building the app. I thought that, since the output mentions it is looking in this directory, it might be helpful to put this file here. It turns out that this was a very bad idea, as it just complicated the problem! LOL!
You can get this error if you have problems in:
packages - please check if all packages are ok and restored successfully
core version - check that core installed with correct version
.net tools - please check if version of .net tools correct.
Can you try visual studio?

I get error message "Crystal Report has stopped working " just for 1 report only, all the rest of my reports work fine

I use Crystal Reports XI (11.5.12.1838) and windows 7 ;
I can open all the crystal report files except 1 report,I get error message
Crystal Report has stopped working
A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available"
I tried to
Reboot my PC .
Checked the Datasource and ODBC connection, all work fine.
3.in Crystal Report properties set the compatiblity mode to XP.
Unchecked the save the report with data in crystal report properties
but it still didn't help.
My other colleague can open the report on which I get error and they are using XP
If he is on XP and it works for him while it crashes for you on Windows 7, I would suspect that you need to update your CR XI to the latest service pack from SAP. But since it's only a single report that is giving you grief it may not have anything to do with that. If it is not a very complex report, try recreating it or create a test report that is using the same data connection.
If it works for him and not for you, check to make sure you have the drivers for the right version.
Someone might have put the 32 bit drivers on a 64 bit version on windows 7.

Sandcastle and Crystal Reports Visual Studio 2008 to 2010

We use Crystal Reports with Visual Studio. We are using Sandcastle to build documentation. Seems like everything worked fine when we were on Visual Studio 2008. Now that we're using Visual Studio 2010, I get a Crystal Reports related error when trying to build the documentation.
MREFBUILDER : error : Unresolved assembly reference: BusinessObjects.Licensing.KeycodeDecoder (BusinessObjects.Licensing.KeycodeDecoder, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304) required by CrystalDecisions.CrystalReports.Engine
Last step completed in 00:00:03.3283
Browsing the web shows that there were some people with a similar problem, but none of them seem to have gotten it fixed. Does anyone know what could be causing this error?
Thanks ahead of time for the help!
There is now a permanent fix in the latest Sandcastle to process Dot Net projects that include Crystal Reports - please see the post http://geekswithblogs.net/TATWORTH/archive/2012/10/12/sandcastle-help-file-builder---october-2010-release.aspx
The latest Sandcastle download is at http://shfb.codeplex.com/releases/view/92191