CR error the group section cannot be printed because its condition field is nonexistent or invalid
I have inherited a CR report and when running i get error: "the group section cannot be pri开发者_C百科nted because its condition field is nonexistent or invalid. Format the section to choose another condition field."
Is there a way for me to know what field is it refering to? Any pointers on when should i start to look for the problem?
I have verified the DB and it is pointing correctly and the Sp returns data.
Thanks
Annoying, isn't it? Without knowing how fluent you are in Crystal Report design, here's some places I would look to get started:
- Check the formula fields in the Field Explorer. You can right click on them and "Browse Data" to see if an error is produced.
- Can we assume this report has groupings? Check the field(s) the report is grouped on. Are any of them null?
- Check the group selection formulas.
- Check the record selection formulas.
- Have any of the uses of the report's datasource changed since it last ran correctly? Perhaps the format of a string field is different now. Ask around.
- Just because you can verify the DB doesn't mean the problem isn't in the datasource. Maybe one of your report's formulae 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.
remove the Group Name Fields for the error "CR error the group section cannot be printed because its condition field is nonexistent or invalid." i have tried and it worked for my problem
Make sure your field type in CR, is the same as your field type in query.
for example both of them should be STRING.
sorry for resurrecting the question but I've experienced this problem this week and came across this when diagnosing for myself. In the end my problem was due to me attempting to dynamically swap the datasource of the viewer at runtime. Hopefully this will simply provide another possible solution for others.
I had the following...
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="true" Height="500" Visible="false" Width="940"
BestFitPage="False" EnableDatabaseLogonPrompt="false" EnableDrillDown="false"
EnableTheming="false" HasToggleGroupTreeButton="true"
EnableParameterPrompt="false"
HasCrystalLogo="False" HasDrilldownTabs="False" HasRefreshButton="False"
HasToggleParameterPanelButton="false" ReportSourceID="rs1"
OnReportRefresh="MngRpt_Refresh" OnError="MngRpt_Refresh"
ReuseParameterValuesOnRefresh="true" />
The error was caused due to the OnReportRefresh="MngRpt_Refresh" OnError="MngRpt_Refresh" events firing when I'd changed the viewer's data source to another report. In the end I simply added a 2nd viewer that pointed to the correct events. I still think the error was misleading though....
In my case the DataSource(DataTable) of Report has empty result.
精彩评论