Git Product home page Git Product logo

crystalreportsninja's People

Contributors

rainforestnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crystalreportsninja's Issues

"Failed to load database information." Oracle...

I get a "Failed to load database information." when I try to run it, it is using an oracle database, and I also tried to install the old oracle client (18.3 version) but still the same error ?

Running on 64Bit Windows 10

I've installed the CR runtime, and downloaded CrystalReportsNinja.exe when I run it I get an error message:

This version of C:\CRREPORTS\CrystalReportsNinja.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

I've attached a screenshot.
crn

Missing Parameter

Hello,

I like to generate a report with 2 subreports where parameters are passed from the main report.
Unfortunatelly I 've got an error "Missing Parameter". Please see the log.

Kind regards Kurt

03-02-2020 22:37:00
03-02-2020 22:37:00 ================== LoadReport, Output File and DB logion ===========
03-02-2020 22:37:02 Report PMJahresAuswertung.rpt loaded successfully
03-02-2020 22:37:02 Output Filename : Strom_2019
03-02-2020 22:37:02 Output Format : pdf
03-02-2020 22:37:02 Number of Parameters detected in the report = 14
03-02-2020 22:37:02 Number of Parameters passed by the users script = 6
03-02-2020 22:37:02
03-02-2020 22:37:02 Applied Parameter 'p_EnergyType' as MultiValue 'False'
03-02-2020 22:37:02 Discrete Parameter : p_EnergyType = 0
03-02-2020 22:37:02 Single Value Parameter p_EnergyType = 0
03-02-2020 22:37:02
03-02-2020 22:37:02 Applied Parameter 'p_Product' as MultiValue 'False'
03-02-2020 22:37:02 Discrete Parameter : p_Product = 'Alle'
03-02-2020 22:37:02 Single Value Parameter p_Product = 'Alle'
03-02-2020 22:37:02
03-02-2020 22:37:02 Applied Parameter 'p_Year' as MultiValue 'False'
03-02-2020 22:37:02 Discrete Parameter : p_Year = '2019'
03-02-2020 22:37:02 Single Value Parameter p_Year = '2019'
03-02-2020 22:37:02
03-02-2020 22:37:02 Applied Parameter 'p_Baseload' as MultiValue 'False'
03-02-2020 22:37:02 Discrete Parameter : p_Baseload = '1'
03-02-2020 22:37:02 Single Value Parameter p_Baseload = '1'
03-02-2020 22:37:02
03-02-2020 22:37:02 Applied Parameter 'p_OutlierRemove' as MultiValue 'False'
03-02-2020 22:37:02 Discrete Parameter : p_OutlierRemove = '1'
03-02-2020 22:37:02 Single Value Parameter p_OutlierRemove = '1'
03-02-2020 22:37:02
03-02-2020 22:37:03 Applied Parameter 'p_OutlierVisible' as MultiValue 'False'
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@user' as MultiValue 'False' Parameter in SubReport = 'ValuesAB' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@f_Product' as MultiValue 'False' Parameter in SubReport = 'ValuesAB' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@f_Year' as MultiValue 'False' Parameter in SubReport = 'ValuesAB' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@f_OutlierRemove' as MultiValue 'False' Parameter in SubReport = 'ValuesAB' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@f_OutlierVisible' as MultiValue 'False' Parameter in SubReport = 'ValuesAB' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@f_EnergyType' as MultiValue 'False' Parameter in SubReport = 'ValuesAB' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@user' as MultiValue 'False' Parameter in SubReport = 'ValuesC' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03 Skipped 'Pm-@f_OutlierVisible' as MultiValue 'False' Parameter in SubReport = 'ValuesC' as its Linked to Main Report
03-02-2020 22:37:03
03-02-2020 22:37:03
03-02-2020 22:37:03 ================== STEP = PerformOutput ============================
03-02-2020 22:37:03
03-02-2020 22:37:03 ===================Logs and Errors =================================
03-02-2020 22:37:03 Message: Fehlende Parameterwerte.
03-02-2020 22:37:03 HResult: -2147215870
03-02-2020 22:37:03 Data: System.Collections.ListDictionaryInternal
03-02-2020 22:37:03 Inner Exception: System.Runtime.InteropServices.COMException (0x8004100E): Fehlende Parameterwerte.
bei CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
bei CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
03-02-2020 22:37:03 StackTrace: bei CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
bei CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
bei CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
bei CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
bei CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
bei CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
bei CrystalReportsNinja.ReportProcessor.PerformOutput()
bei CrystalReportsNinja.ReportProcessor.Run()
03-02-2020 22:37:03 ====================================================================

exception: "Operation illegal on linked parameter" when running a report with sub-reports

Trying to run a report with linked sub-reports. I get this:
Exception: Error in File foo.rpt:
Operation illegal on linked parameter.
Inner Exception: System.Runtime.InteropServices.COMException (0x80000290): Error in File foo.rpt:
Operation illegal on linked parameter.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

My working theory is that it's trying to pass parameters to the subreports, whereas those subreports should be getting those from the parent report.

Refresh before export

Hi. Is it possible to refresh the data before exporting? RPTs which parameters are programmatically set (needs refresh in crystal report viewers) are yielding outdated data when ran with CrystalReportNinja. Any thoughts about this highly appreciated.

-E print "Invalid Export type."

When using -E print I get this output:

Report loaded successfully
Database Login done
Exception: Invalid export type.
Inner Exception:

Using anything else it prints fine, because well, those formats are accounted for.

Looks like it's currently not possible to print full stop. (I could be way off, I don't know C#.)

Observations:
In ArgumentContainer.cs, PrintOutput is set to false by default with no code anywhere else to flip it on:
PrintOutput = false;

In ReportProcessor.cs, Line 82, the _printToPrinter variable is assigned PrintOutput:
_printToPrinter = ReportArguments.PrintOutput;

In ReportProcessor.cs, Line 259, The _printToPrinter variable is tested here to see if it's being printed to paper and not exporting. But it is not possible to set to true. Specifying -E print is just setting an _outputFormat of "PRINT" which is of course invalid.

There really needs to be a condition the checks the input of that argument in the case of print being passed. Something like:
else if (_outputFormat.ToUpper() == "PRINT") _printToPrinter = true;

Reports with subreports generating "Operation illegal on linked parameter"

Hello, I'm getting an error when generating a report which has subreports.

The report in question has two subreports. The subreports were setup on links internal to the database, so the report's parameter fields were not passed to the subreports. I received the following error:

C:\CRNinja\CrystalReportsNinja.exe -S DB_DSN_64 -F C:\MyReports\MyCrystalRep.rpt -O C:\OutReport\MyCrystalRep_AUG19 -E PDF -a "Client Code:5055" -a "Beginning Date:2019-08-30 00:00:00" -a "Ending Date:2019-08-30 00:00:00"
Report loaded successfully
Database Login done
Error in File MyCrystalRep_ 4148_5204_{7C937E7A-96D0-4676-B3C2-B68DD64B9DE2}.rpt:
Operation illegal on linked parameter.
Error in File MyCrystalRep_ 4148_5204_{7C937E7A-96D0-4676-B3C2-B68DD64B9DE2}.rpt:
Operation illegal on linked parameter.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

So, I took out one subreport and changed the other to work with a pass-through parameter (the Client Code from the command line).

However, the same error was generated. I'm using CR 2016, and the CRNinja file version as of 8/20/2018

Is CRNinja not working with subreports at this time?

Thanks in advance.

Parameters in selection formula

Premise: I'm a CR newbie, I have inherited a project using it and I'm trying to automate generating pdf reports.

I have a report that has this selection formula: {RPT_lavoro.session}={@Sessione} with RPT_lavoro being a database table, session being a field, and @Sessione from what I understand is a parameter. The software using CR passes that value and uses this formula to filter the tables. I'm trying something like this:

CrystalReportsNinja.exe -E pdf -F report.rpt -O test.pdf -a "Sessione:18"

With these results:

Report loaded successfully
Database Login done
Completed

And the pdf is generated, but it's empty. I tried removing or editing by hand the formula, and it works. I just cannot understand how to make it work. Any tips?

Date parameters give exception

Launching the executable with the arguments as follows:

CrystalReportsNinja.exe -F "TestRep.rpt" -O "report-1101.pdf" -E "pdf" -l -a "StartDate:(2018-09-01)" -a "EndDate:(2018-09-02)"

Gives me the exception error:

The types of the parameter field and parameter field current values are not compatible.

I've tried several formats for the dates; "YYYYMMDD", "DDMMYYYY", "DD/MM/YY" to no avail.
Changing the parameter types from Date to String removes the error.

Does this mean that CRN supports only string parameters?

Converting reports using internal data - no DB connect attempt

For some reason, the reports we are using cannot be converted with CrystalReportsNinja. My guess is that it's because the Database used in our reports is an ODBC connection. That said all the data needed to convert the rpt to a pdf is already in the report - I just need CRN to convert it to a PDF for me. For some reason 100% of my reports return the following error log:

03-08-2018	15:28:35	Report loaded successfully
03-08-2018	15:28:35	Output Filename : C:\Users\me\Downloads\report.pdf
03-08-2018	15:28:35	Output format : pdf
03-08-2018	15:28:35	Exception: Database logon failed.
03-08-2018	15:28:35	Inner Exception: System.Runtime.InteropServices.COMException (0x8004100F): Database logon failed.
   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

Any advice would be appreciated!

Database doesn't change using the -D option

I have a report where the initial catalog is pointed to a database and the various tables are as well. I'd like to be able to dynamically change this using the -D option, but it always reports on the one set in the report. Is there a way to make this setup work? Thanks for your help!

.net4.5 VS .net4.6 or 4.7

I'm able to run on old production machine where .net4.5 is latest rev. However, I can't run on test machines running 4.6 or 4.7. I get the same error as the Running on 64bit Windows 10 thread below.

Error on CRforVS 13_0_21 - should allow newer versions of CRforVS

Get an error on the latest version of CRforVS 13_0_21 (both 32bit and 64bit)

Exception: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral , PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. Inner Exception: oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo]

cannot use output path -O

Hi, first , let me say I am so happy to see this project alive again! I use the old version for scheduled reports, and it works great.
I'm testing this version, and it seems I can't specify an output path and filename. The output file is always placed next to the report file, and if I do specify an output location with -O, the output files has no extension and isplaced next to the report file. It is the correct format, as i can open it, but the extension is missing and is always named as the default name, not what i specify on the command line.

Kudos for updating this project, I hope you can make an easy fix for this issue.

thanks!

Localisation options?

More of a enhancement than issue, I'd like to be able to change the language settings as currently some of my reports export dollars as British pounds. I need to be able to switch between then different language settings depending on the report.

Failed to load database information

The report is using database type of File System Data with a starting directory that I can read access.
C:\CrystalReports>crystalreportsninja.exe -F c:\CrystalReports\CountCMS-DbutilFiles.rpt
Report loaded successfully
Database Login done
Error in File CountCMS-DbutilFiles 7652_7088_{4E8BCBC7-C766-44FD-AB1C-9467871663CC}.rpt:
Failed to load database information.
Error in File CountCMS-DbutilFiles 7652_7088_{4E8BCBC7-C766-44FD-AB1C-9467871663CC}.rpt:d database information.
Failed to load database information.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

Any help would be appreciated.

Running CrystalReportsNinja in Php

Hi,

Thanks for sharing the tool. I have tried it and encountered the error below.

When I run in windows CMD, the crystal report is generated. But when I execute via Php exec(), I am getting the error below. Anything I missed out?

Exception: Unknown Database Connector Error Error in File OPRJ 9496_9704_{1CA7AD4F-AFE6-4FA9-8840-B945674BF453}.rpt: Unknown Database Connector Error Inner Exception: System.Runtime.InteropServices.COMException (0x800002C2): Unknown Database Connector Error Error in File OPRJ 9496_9704_{1CA7AD4F-AFE6-4FA9-8840-B945674BF453}.rpt: Unknown Database Connector Error at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

Thanks.

Abner

Bug: CSV export of GROUP section repeats for each detail line

Question:
How do you do "check" the ISOLATE GROUP SECTION for a CrystalReportsNinja CSV export?
or Bug:
CSV export of GROUP section repeats for each detail line when DETAIL section is suppressed.
The Group section is a summary and should only out once per group, as shown and as behaves in CrystalReports.

Possible to not export report if it is blank?

Using CrystalReportsNinja and it is working well for reports that contain data. However, I'd like the option to not have an email go out with a blank report. Can CRN determine if a report is blank and cancel the export of said report?

Thanks in advance!

missing parameters error

Hi,
Is there anyway we can get a log for debugging to see which params are missing when trying to execute these reports????

Windows 2012r2 Server : "Exception: Could not load file or assembly"

Hi,

Have been running Ninja on Win 2003 for the past few years.

  • Attempting to convert over from Win 2003 to Windows Server 2012R2.
  • Have attempted both your 32 and 64 bit versions on Win 2012 R2.
  • Win Server 2012R2 is completley up to date with patches.
  • Dot net 4.5 does not install since it is already part of the operating system.
  • CRRuntime_64bit_13_0_20.msi is installed.

Have tried everything , including a few dumb 'out-there' things to attempt to get ti running.
Unfortunately everything I try simply throws the error message :

Exception: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or on
e of its dependencies. The system cannot find the file specified.
Inner Exception:

Any pointers?

Invalid Printer Specified

Im having issues running crexport on a windows 2012 R2 server with .NET 4.8 installed along with Crystal Report runtime x64 bit.

I am receiving an error saying "Invalid Printer Specified"

Printer is installed and prints other documents from the server just fine.

This is working on another server that I have (Same Parameters being sent)... which utilizes .net 4.5.

Is there a way to get this working with .NET 4.8?

Exception on report load

Hello,

I cannot run my command:

CrystalReportsNinja.exe -F LeaveNotification_FromSV.rpt -O result.pdf -E pdf

It always returns this exception.

Exception: Load report failed.
Inner Exception: System.Runtime.InteropServices.COMException (0x80041811): Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
   at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

I am sure that there is no process open the report. I also checked the permissions (read&write), run as administrator.

I have checked with other reports. The problem is the same.

Try passing a "hardcode" parameter in the source code but it still not work.

Could you please help me with this problem?

Thanks in advance

Unable to load report.

Hello friends. Could you please help me? as I already bang my head on the wall :)

I am using win10, 64bit with the newest "3500" assemlbies installed.
Regardless of the report I try to open (and I checked their validity), I always get:

Exception: Load report failed.
Inner Exception: System.Runtime.InteropServices.COMException (0x8000020D): Unable to load report.
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

I have read in other forums that this might be a permission issue, but I run as administrator and even so add "Everyone/Full Control" to the folder and its contents.

What can be the issue???

Thanks in advance!

CrystalReportsNinja is not a valid Win32 Application

Hi,

I try to run exe file and it show "Is not a Valid Win32 Application" on windows server 2003. How can I resolve this issue? Is it because Old Server (Server 2003)? Will it be possible to get a version for server 2003?

Thanks

Unable to specify log file

Very useful that you can specify to write a log file but it would be great to be able to specify the log file location and filename:

CrystalReportsNinja.exe -F "Report.rpt" -O "Report.pdf" -E "pdf" -L "Report-log.txt"

This would make it much easier to match a log file to a report file.

I can't make untrusted ODBC System DSN work

When I use a trusted DSN, no problem - it works beautifully. But when I use the -U & -P parameters to pass login credentials I get errors. Here's my command line:

C:\Users\Administrator\Desktop\CrystalReportsNinja -F C:\WebProjects\MIF45_AR\Reports\RptFiles\SetupReports\PlantSurchargeListing.rpt -O C:\ItWorks.pdf -E pdf -S NASPlant2 -U sa -P access -D LL_PLANT

Here's the output:
Report loaded successfully
Database Login done
Exception: Logon failed.
Details: [Database Vendor Code: 18456 ] Database Connector Error: ' [Database Vendor Code: 18456 ]' Logon failed. Failed to export the report.
Error in File PlantSurchargeListing 4916_4664_{240EE7F6-10AC-416D-B5FB-0ECFF5BD651D}.rpt:
Unable to connect: incorrect log on parameters.
Details: [Database Vendor Code: 18456 ]
Inner Exception: System.Runtime.InteropServices.COMException (0x8004100F): Logon failed.
Details: [Database Vendor Code: 18456 ] Database Connector Error: ' [Database Vendor Code: 18456 ]' Logon failed. Failed to export the report.
Error in File PlantSurchargeListing 4916_4664_{240EE7F6-10AC-416D-B5FB-0ECFF5BD651D}.rpt:
Unable to connect: incorrect log on parameters.
Details: [Database Vendor Code: 18456 ]
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
NULL

Invalid crystal reports file

I have used Crystal Reports Ninja to print a few reports to PDF. I have a Crystal Report that is an invoice, the original template came with our ERP software and it is fairly complex so recreating it from scratch would be a lot of work. When I try to use Crystal Reports Ninja to save to PDF it gives this error:
Exception: Invalid Crystal Reports file
Inner Exception:

I have compared a similar invoice report that does work and I do not see any major differences in how things are setup. Are there some settings that might cause this issue that I should check or is there a way to get more detail about why this report is not working?

CrystalReportsNinja.exe removed

Hi,
Where can I download the CrystalReportsNinja.exe if it's removed in the deployment directory?
The "Directory Structure" and "Installation" section in README.md stated that there should be a CrystalReportsNinja.exe binary file included however I see that it's removed in the project comment.

Crystal Reports Exporter has stopped working APPCRASH

Hello,

I have a scheduled task that is set to run at 5:00am every morning, that triggers a batch file to run Crystal Reports Exporter. This morning I checked the server where CREXPORT is running and noticed an APPCRASH Error. This has happened twice now.

Running the batch file manually seems to work just fine. No issues with the way it is configured. Task Manager displayed a last run result of 0xc0000374 indicating a heap corruption.

Below is the error that was captured in the servers Event Log:

Error on 25/03/2020 - 5:00:26 AM Application Error Event ID 1000 Task Category (100)

Faulting application name: crexport.exe, version: 2.1.11.1103, time stamp: 0x4eb20a56
Faulting module name: ntdll.dll, version: 6.3.9600.19464, time stamp: 0x5d6727f2
Exception code: 0xc0000374
Fault offset: 0x00000000000f1cd0
Faulting process id: 0xfc4
Faulting application start time: 0x01d60283d1a3535d
Faulting application path: C:\CRExport\crexport.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 114bb8e5-6e77-11ea-80cf-005056b78877
Faulting package full name:
Faulting package-relative application ID:

Dynamic Parameter Passing to the one crystal report rpt file

I want to pass dynamic parameter to one crystal report rpt file . For example I have 250 branches and i want to pass parameter with looping from command line. The crystal report file is used with the dynamic parameter field .When i export the rpt file from crystal Ninja with parameter which is map with rpt's file parameter file parameter .If parameter is same , the report of pdf format is successfully generated .When I passed the second parameter with looping ,the follwing error is occured.
image

DAtabase/odbc connection change issue

Trying to use this with sql server connection. If I use an ODBC connection can I change this at runtime by -s option? It did not override connection. (Used what was defined inCrystal Report. ALso tried specifying -d for database. That did not work either. So is there a way to change the database at runtime? Need to use the same Crystal report against multiple database ( they have same structure)

Calling CrystalReportsNinja.exe from TSQL

Thanks for your help last time.

I don't have problems running the CrystalReportsNinja from command prompt (cmd) .

However my intention is to schedule the run via sql jobs using the following commands

EXEC master..xp_cmdshell "net use t: \\Deployment /persistent:yes"
EXEC master..xp_cmdshell 't:\CrystalReportsNinja.exe -F SM_AO_Invoice.rpt -O SM_AO_Invoice -E pdf'
EXEC master..xp_cmdshell "net use t: /delete"

The output for line 2 is the following Exception;

Exception: Load report failed.
Inner Exception: System.Runtime.InteropServices.COMException (0x80041811): Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
NULL

I read somewhere that this only happens when the report file (.rpt) is opened by another process. But i am sure I do not have it opened anywhere else.

Has anyone encounter this kind of problem. What are the possible workaround to achieve the same goal which is scheduling the run.

Problem with the option -N print

If we used this option we've got the following message "export does not exist". I fix the problem by changing the ReadArguments function and change "-E" statement.
else if (parameters[i].ToUpper() == "-E") { OutputFormat = parameters[i + 1]; if (OutputFormat.ToUpper() == "PRINT") { PrintOutput = true; } }

Invalid Crystal Reports file

I am getting this error when attempting to run CrystalReportsNinja to produce a report. I am running Crystal Reports 2008 Version 12..36.0.601 and I've installed Crystal Reports runtime vs 13.0 . We are running against Oracle 11g database. Do you know what I need to do to fix this error? Do I need a version of CrystalReportsNinja that works with Crystal Reports 2008?

Exact Text: C:<path>>CrystalReportsNinja -f M:\Work Documents\TestReport1.rpt
Exception: Invalid Crystal Reports file
Inner Exception:

Thanks in Advance for all your help.

I got errors wheh I export report which connect 2 database by using CrytalReportsNinja

Could you please suggest me , I got errors when I export report which connect 2 database :
C:\DOL>CrystalReportsNinja -U atmreport -P P@ssw0rd
-F C:\DOL\test_00_06.rpt -O C:\DOL\test814.xls -E XLSDATA -I
Report loaded successfully
Database Login done
Error in File test_00_06 {39D04842-8E51-4A55-BF68-DFC9F00F8E1A}.rpt:
The table could not be found.
Inner Exception: System.Runtime.InteropServices.COMException (0x800002C5): The t
Error in File test_00_06 {39D04842-8E51-4A55-BF68-DFC9F00F8E1A}.rpt:
The table could not be found.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(Expo
rtOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRe
questContext reqContext)

BR
Dolly

MailTo

So it looks like the MailTo does not actually work at this point? Is this something that is being developed? Let me know as I could probably contribute.

Im getting this error

Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{31E7715A-8AD0-4D1C-958E-C1BE0A6F2D0C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

What version of crystal report are you using to run this?? ive tried 64 bit latest CRforVS
32 bit CRforVS
and sp20 32 bit CRforVS

when i try 64 bit
i get a different error saying could not load file or assembly crystaldecsion.reportappserver.comlayer version 13.0 whatever.

any help or fix would be very much appreciated!!!

Error with OLEDB for Oracle

I receive the following error.
The connection to the DB and the export of the report from CR is done correctly.

Report loaded successfully
Database Login done
Exception: Database Access Failed.
Inner Exception: System.Runtime.InteropServices.COMException (0x8004100F): Database Access Failed.
in CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
in CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

ODBC DSN must be 64-bit

This is a solved issue, but I wanted to share with the community.

We're using CR 2016 on a Windows 10 server. CR 2016 still requires ODBC 32-bit to run. However, CrystalReportsNinja requires a 64-bit ODBC DSN in order to connect via ODBC.

We were trying to connect to CR with CrystalReportsNinja via the 32-bit DSN setup for CR 2016, but it wasn't working. We setup a 64-bit DSN just for CrystalReportsNinja.

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

Just installed the pre-reqs and crystal ninja - here's the command i tried - followed by the error..
c:\CrystalReportsNinja -U portalreadonly -P xxxxxxxx -F c:\Completions_by_WorkCenter.rpt -E pdf

What is the "type initalizer"?

Exception: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
Inner Exception: System.TypeInitializationException: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
at CrystalDecisions.Shared.SharedUtils..cctor()
--- End of inner exception stack trace ---
at CrystalDecisions.Shared.SharedUtils.get_CurrentControl()
at CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture()
at CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(String name)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()
at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()

White-Space on Parameter Values

We have hit an issue in the report runner where we have parameter values that require a leading space and an optional trailing space.

The current implementation does not support this functionality since it is calling trim on the ParameterValue in the ParameterCore.cs file.

We can easily remove the .trim() function for our purposes but a parameter flag of -T On|Off would be beneficial in this case.

Problem connection with database connection

Hi, let me say that your project works great and your source are very clear.
However, I've got an error with all the reports with a connection to a database. I've got the following message:
Failed to load database information.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
I've search within the documentation of SAP and changed the version of Crystal but the problem remains the same.

Thanks in advance

Exception raised

Hi All,

Can anyone come to my rescue please?

I ran the following commands;

CrystalReportsNinja.exe -F SM_AO_Invoice.rpt -O AOInvoice -E pdf

and the following messages and exception was raised;

Report loaded successfully
Database Login done
Exception: Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.C
ontrollers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServe
r.Controllers.ISCRReportSource'. This operation failed because the QueryInterfac
e call on the COM component for the interface with IID '{98CDE168-C1BF-4179-BE4C
-F2CFA7CB8398}' failed due to the following error: No such interface supported (
Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Inner Exception:

Please what am I doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.