I have a web application which I developed which uses crystal reports for VS 2010. The reports work fine on my machine, but when I publish the web application, I get the following error when loading the report:
Error
This group section cannot be printed because its condition field is nonexistent or invalid. Format the section to choose another condition field. Error in File temp_9b46c401-8cdb-45a6-bade-4d3e37dda1fb {572D2B99-425A-4EC5-A758-6497001368A3}.rpt: Invalid group condition.
I've searched for this and from what I can understand it's a connection issue. But I've checked and the database connection string is fine. Other parts of web application work fine with it. Is there anything else I should be checking for?
I've resolved the issue. It was very frustrating and so I thought I should put this here in case anyone runs into this:
Make sure you have the same version of Crystal Reports Runtime installed on your server as on your development machine. I had 13.0.3 on my development machine and 13.0.1. on my server. Of course crystal reports gave an obscure error which makes it very difficult to know where to look.
After I did this, I kept getting a blank page. This linked help me resolve this issue: http://www.codeproject.com/Questions/287543/Crystal-Reports-not-rendering-when-webpage-is-serv. Apparently visual studio doesn't copy all the necessary files for it to render the reports.
Thanks.
I'm not so sure that the error is because of a database connection issue. If I were you I would look into a few things first:
Make sure that the database fields haven't changed. Is the application accessing the same database when deployed as it does in the development environment?
What about Null values? Have you checked the "Convert Database Null Values" in the Report Options?
What about the groups? Are there any formulas in them or are any of them based on groups? Browse the data to see if you get any errors.
Just because it runs on your development machine doesn't mean the problem isn't in the datasource. Maybe one of your report's formulas is expecting a field to be non-null, and there is a single null entry. Or a date somehow got entered as #01/01/9999# and a formula in the report is expecting a realistic date.
That should get you started and maybe even solve your issue. Give us some more info about the report and the datasource if you can.
Related
First let me say sorry if this has been answered before, but I can't find anything that talks about the problem I am having.
Here is the situation:
I have an ASP web app that uses a SQL DB for data storage and another server for SSRS. I have everything working EXCEPT for pulling the report.
I created the report using BI in visual studio 2015 pro and deployed it to the SSRS server. I am able to connect to the SSRS server and see and execute the report ok.
My problem comes when I try to feed a parameter to the report. I receive the following error:
'System.ArgumentException: Parameter '#par_param' does not exist on this report'
I have traced this to the code behind my VB page for the report viewer load. Here is the code:
Dim param As Microsoft.Reporting.WebForms.ReportParameter
param = New Microsoft.Reporting.WebForms.ReportParameter("#par_param", par_number)
Me.ParReportViewer1.ServerReport.SetParameters(param)
I have Imported Microsot.Reporting.WebForms and the variable par_number has been declared as a global variable.
I have searched and searched for an answer to solve this problem but i can not find one. Can anyone tell me how in the world to get this parameter to work??
If I need to post any other code please just ask.
Use "par_param" instead of "#par_param". I don't think you need the '#'.
I have a program to churn through some data that uses 3 reports.. recently our network admin upgrade a server to Win 2012 R2. That server is a slightly newer version of crystal reports. My program uses Version=13.0.2000.0.
Since the upgrade to the new server, my 3rd report, which relies on user entered parameter values no longer prompts the user for the values and shows a blank crystal report viewer. The report works fine locally on my machine.
Curious if anyone has run into this problem? Hopefully. Any ideas / Solutions?
Thanks.
Well after 2 days of searching a co-worker pointed me to this blog post -->
https://adilmca.wordpress.com/2013/04/08/visual-studio-2012-crystal-report-not-working-on-windows-server-2012-0x800a1391-javascript-runtime-error-bobj-is-undefined/
Add the report viewer folder to the project and copy in that bit to the webconfig to point to the new folder. I would like to know why this occured, and I will continue digging to figure it out - but for now the problem is solved. Hope this helps someone else.
Thanks.
I am building a substantial ASP.Net MVC app using the latest EF and MVC. Suddenly nothing works, every one of my index views now produces the following error when its generates the data to send to the index view:
System.InvalidOperationException {"Sequence contains no matching element"}
This is happening in code that was generated when I added a controller with views. It now effects ALL my index views and there are about 40 of them which all worked previously and now none of them work. The only thing I can think of is that I hit some limit as I am just adding very similar controllers.
I have found the cause of my problem. None of my previous work on this machine will work anymore. They haven't been changed and they were all working. The problem is that anything I run in Visual Studio (VWD 2013 and VS Community 2015) will NOT talk to SQL Express.
I became suspicious and removed the connection string from the problem App and got exactly the same message. I then thought I would try it with Apps that I know worked, but I ran them first before I made any changes and they (five different apps) all produced the same error.
Yet If I look at Server Explorer it still works and it is using the same Web.Config connection string, because when I remark it Server Explorer will not access the database.
As I said from the start this is some internal problem as all the code was generated by Visual Studio and then it all failed, and all my other working Apps fail as well.
I will now test it on a different machine.
I manually rebuilt it all and the problem appeared again when I added the last few Models. So that was not the solution. I got assisatnce on the ASP.Net forum from Krunal who provided a solution that worked and fixed both versions which had the problem.
I was working with Code First from the database. Krunal thought I was using Database first with Designer and suggested I use the Model Browser to refresh my model. You don't get a Model Browser if you used Code First so I added a Database First Design Model which created a EDMX file, I then right clicked on that and opened the Model Browser.
I then rebuilt it and it all worked. I then went back to the original version added an EDMX opened the Model Browser and it all worked fine. As I said from the start it was not a code issue it was an Internal problem with Visual Studio and SQL Express. No code was changed.
I have a line of code that I can run locally as part of a service that works perfectly fine.
sReportPath = objCrystalUtils.ExportReportToPDF("Report Name", iReportInfoID)
This code is run as a part of a service, and when I unit test it by feeding it data, it ultimately builds the report and prints it.
When I run the exact same piece of code inside an .ashx from an ajax call. The reports are generated (I can see the pdf files being created on disk) but the printing is not happening.
oRpt.PrintToPrinter(objReport.DefaultAutoPrint, True, 0, 0)
In both scenarios the same code is used to print the report. (objReport.DefaultAutoPrint = 0 in both cases)
My only thought is that the location of the code that is calling this method is in a different spot relative to the location of the bills themselves.
The printer that I'm trying to print to is a network printer intalled on my machine, and I'm running Windows 7 IIS 6.1
Any thoughts?
Edit:
Here is a thought... if I'm running one as a unit test locally and im running the other through a web app that is running via IIS, is there a difference in user id and user access to the default printer?
Edit:
So I added my local ASP, IUSR and SYSTEM users to the printer security and allowed them to print... no dice. So I checked the EVERYONE user and it is set to access and NO users are denied... so I think that kinda kills that line of reasoning.
Edit:
I changed the name of this post since I no longer think that the issue is ajax related since If I try to do the same process in code bebehind from a post back instead of running it from an ajax call i still get the same problem.
Patrick, for me it is a known issue of crystal reports, printing a certain report from a running application via IIS.
I got the same issue before, and upon our search for that issue, we got the following;
Report to be generated, exported, and then to be downloaded to client machine,
so user can print it locally (say, report will be exported as PDf file,
user can use print option of PDF reader).
It's not Crystal Reports or other third party app's problem. It's usually the IIS_IUSER's permission problem because it has no access to any network printers. A possible solution is in Process.Start doesn't work in IIS
I have been given an ad hoc reporting tool from another individual that has successfully deployed it to the field. He uses Web Logic servers and an Oracle database.
I tried to deploy the same application in my local environment (WAS 7 and Oracle). The first report runs flawlessly. However, when I run the second (or third or fourth) report, I get a very strange error: the second report is appended to the first report.
There is nothing in the code to account for this. This problem can be temporarily solved by stopping and starting the servers every time a report is run (obviously not a real solution). I think this has something to do with data sources and cached information. I then took a step back and tried to deploy it to a Tomcat server. It works perfectly, just like it does in the field. So my question is: are there any known issues between WAS 7 and Oracle 11g that could be causing this kind of problem? Any information would be very helpful.
Please ask about any specifics you may want to know and I will do my best to provide that information.
Thank you for your time.
EDIT: For anyone else looking into this, the problem was due to an incompatibility with the proprietary Oracle calls and Websphere. Once the application was edited to use only JDBC calls, everything works perfectly. Thanks.
This ended up being a incompatibility with using proprietary Oracle calls and Websphere. It was fixed by changing all of proprietary call to normal JDBC calls.