-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reports with subreports generating "Operation illegal on linked parameter" #48
Comments
Try my fork of the project. It has features and bug fixes the main project does not have. Fixing sub reports in one of the areas of focus the past month. |
Thanks! Unfortunately, it's pulling up a different error: Exception: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. |
Check to make sure you are using Crystal Reports Runtime 13.0.24 If you are using a previous version of the runtimes you should uninstall the runtime and install the new version of the runtime. If you are unable to use the new version of the runtime you can try to compile for the runtime version you are using but I would not recommend that. Also be sure to check the documentation as there have been changes to the parameters. |
OK, thanks. I will take a look at and try your first scenario. |
OK, I updated the runtime version to 13.0.24. Reports without subreports run fine. But, reports with subreports fail with the following error: Exception: Error in File MyCrystalReport_ 3884_2548_{C7290FBF-98E9-4BF4-AF64-E6E23C808EF5}.rpt: It seems that the subreports want their own login parameters? |
Is the connection in the primary report and sub report the same? What type of connection are you using? ODBC, OLE, ect… What type of database are you connecting to? Can you describe the report? How may sub reports? Are you passing the log in parameters to ninja, or are you using integrated security? |
The connection is the same, both the report and sub-report use an ODBC 32-bit system DSN with Windows authentication. Crystal won't work with a 64-bit ODBC connection. The connection is to a MS SQL 2014 database. The report was using two sub-reports. Both sub-reports were linked to the main report via internal database key fields, not based on parameter fields. I chopped out one as an experiment, and just ran the report with one sub-report, but still no luck. I then changed that sub-report's links to use the main report's parameter field for "Client Code" instead of an internal database key field, but still no luck. I am not passing the login parameters to CRNinja, instead I am using an ODBC 64-bit system DSN with Windows authentication. CRNinja won't use a 32-bit ODBC connection. Here is the command-line I'm using: 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" I'm wondering if the fact that Crystal and CRNinja have to be on different bit ODBC connections has something to do with the issue? |
Ninja can use a 32bit ODBC DSN if you use the version of ninja compiled for 32bit. See the link below. As long as I didn't make a mistake when I compiled it, that should be a 32bit compile that will use a 32bit ODBC DSN. I'm assuming you are using the 32bit DSN when testing the report in the Crystal Developer. If so and if the DSN name is the same where you are running Ninja, try not passing that parameter into Ninja. https://github.com/mhertzfeld/CrystalReportsNinja/tree/master/Deployment/32-bit |
Unfortunately, it didn't do the trick. The new exe is throwing an error regardless of the bit-size (I tried both 32 and 64), and even with a report without any sub-reports: Exception: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. WRN: Assembly binding logging is turned OFF. |
However, I didn't try it yet without eliminating the DSN parameter altogether. Let me try that, first. |
Unfortunately, still no go. If I take out the -S server parameter I get the failed login error: Exception: Database logon failed. |
At the moment I do not have a testing enviroment setup to help troubleshoot this. I am planning on building a new developement and testing enviroment in azure sometime in the near future, maybe this weekend. Once I get that up and running I will try to replicate the problem you have described. |
OK, let me know if you need any other details, or if there is a specific syntax I should use for testing. |
I've almost completed my development environment in azure. If possible, can you create a new report with the same problem using the AdventureWorks sample database, then send me the crystal report? That way I can troubleshoot the exact problem you are seeing? https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks |
mhertzfeld, thanks for the help. Please give me a few days to get that together. I don't have AdventureWorks on the server, so I'll need to make a few tables with test data, along with a replicated report for those. |
Thanks for your fork @mhertzfeld it worked for me and it is been printing reports except when I have subreports , this is message about parameters and then it said it exported it Number of Parameters detected in the report = 10 |
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.
The text was updated successfully, but these errors were encountered: