cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Method not found System.Runtime.InteropServices.Marshal.StructureToPtr

Former Member
0 Likes
4,291

I installed Crystal reports 13.0.26 in windows 7 64 bits.But when i try to print a report using c# desktop application and dotnet framework 4.5, an error message occur:

Method not found Void System.Runtime.InteropServices.Marshal.StructureToPtr(!!0, IntPtr, Boolean).

Howerver, i can print reports using the same application in other desktops.

Can you help me please?

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Use ProcessMonitor and check runtime versions and/or missing dependencies.

May even be an issue with the Printer driver used. Always use Dissociate in Page Setup in the report designer.

See the printer test app for printing on the downlaod WIKI page:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

https://blogs.sap.com/2015/08/19/printing-crystal-reports-in-net/

Don

Answers (2)

Answers (2)

Former Member
0 Likes

the problem is, as someone from SAP should answer, in versions of VS and CR. for example, if you use VS2019 and SR SP29, and if you target framework 4.0 in VS, your app will not work OK at the clients. No matter what framework you chose in Visual Studio, CR will use framework for which that CR version is intended for, in this case .NET 4.8. If you try to install some earlier CR SP(<v26), it will not work with VS2019 🙂

so if your clients does not have framework 4.8, you are in problem. versions and comparassion is here https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

For this, I can not migrate to VS2019, because my clients are on XP(max 4.03 if I can remember), and win7 moustlly(updates are off, they work 24/7, gas stations, so updates will only make a mess). Maybe CR can do the same for us, to choose version while developing.so that I can, for example, use SP23 for framework 4.0 in VS2019.

I hope that my answer is not correct and that there is workaround.

0 Likes