Link to home
Start Free TrialLog in
Avatar of jellis613
jellis613

asked on

"Invalid group condition" Error opening Report in ASP.net

I am trying to open a report in ASP.net. This report opens and runs fine using the Crystal Reports Program (Professional). It has two subreports that it uses. Main datasource for the report is a stored procedure (SQL Server). When I try to run it in my aspx page, I get the following error:

CrystalDecisions.CrystalReports.Engine.InvalidArgumentException: Error in File (filepath): Invalid group condition.

Here is the code I am using to load the report:

protected CrystalDecisions.Web.CrystalReportViewer crViewer;

// CODE

ReportDocument rd = new ReportDocument();
rd.Load(Server.MapPath(Global.REPORTS_DIRECTORY + fileName));
rd.SetDatabaseLogon(username,password,server,initialDB);      
// SET REPORT PARAMETERS
crViewer.ReportSource = rd;
crViewer.DataBind();

Any ideas what could be wrong (since it does run fine in the CR Program)?
Avatar of jellis613
jellis613

ASKER

I found this KB article on the CR website that seems to apply to my case:
http://support.businessobjects.com/library/kbase/articles/c2014164.asp

I gather from this article that the only things for me to do are:
1) Get CR Advanced or Developer Editions
2) Develop the report completely within VS.net

Has anyone else had a similar problem? Any other solutions other than the ones above?
Avatar of Mike McCracken
I would tend to agree.

You also need to set the login information for the subreports.

This may help
http://support.businessobjects.com/library/kbase/articles/c2010371.asp

mlmcc
I didnt see anything on that page about setting login information for subreports. In any event, I dont think that this is the problem here (I previously was experiencing an error with the login, and after I got my ServerName in the proper syntax, that error went away and was replaced by the Invalid Group error. If there was an error with the login for a subreport, I assume that it would have been thrown).

In the page you referenced, it says "If you are using a web application make sure that you do not specify or call the DataBind in your code as this will nullify the code above." I took the DataBind method out of my code - still doesnt work (same error as before).
The Crystal Reports KB article I cited above was correct - Installing CR Professional did the trick. I did not need to provide any login information for the subreports.
ASKER CERTIFIED SOLUTION
Avatar of ee_ai_construct
ee_ai_construct
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial