Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Field Name is Not known/Invalid Group Condition Post Reply Post New Topic
Author Message
usmdm82
Newbie
Newbie
Avatar

Joined: 26 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
Quote usmdm82 Replybullet Topic: Field Name is Not known/Invalid Group Condition
    Posted: 01 Oct 2007 at 12:29pm
I have 2 rpts with the same problem.
 
First some background -- I am using Crystal X but launching the report through C#/Asp.net.  I have an engine that loads all the parameters, etc dynamically.  This part I know works because there are about 10 reports working just fine (that's always the way).
 
Both of the reports in question cause the same error "Error in formula" "Field Name is Not Known".  When I remove my formula fields from the reports, I then get an error "Invalid Group Condition."
 
Both reports work fine if I run them from within Crystal.  The problem occurs when launching them from .net.
 
Thanks in advance!
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 01 Oct 2007 at 1:24pm
It sounds like you are assigning a value to a formula and the format string is incorrect. If you are assigning a string to a formula, make sure that you include a set of single quotes within the formula as well.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
usmdm82
Newbie
Newbie
Avatar

Joined: 26 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
Quote usmdm82 Replybullet Posted: 01 Oct 2007 at 2:02pm

Hi Brian,

I'm not sure I understand...this is one of my formulas, it is using Basic Syntax:

Dim Parameter

Parameter = "Start Date: " + ToText({?@StartDate},"M/d/yyyy") + "  " + "End Date: " + ToText({?@EndDate},"M/d/yyyy") + "  " + "Case Type: " + {spRpt_WeeklyInventoryDetail;1.CaseType} + "  "

 

if ISNULL({?@InsCarrierID}) = False Then

    Parameter = Parameter + "LOB: " + {spRpt_WeeklyInventoryDetail;1.InsCarrier} + "  "

End IF

 

if ISNULL({?@CaseStatusID}) = False Then

    Parameter = Parameter + "CaseStatus: " + {spRpt_WeeklyInventoryDetail;1.CaseStatus} + "  "

End IF

 

Formula = Parameter

The same basic formula works in other reports, so I'm not sure where I should put single quotes?

Also, I was trying to suppress Group Header fields using this (Crystal)syntax:
 
{spRpt_WeeklyInventoryDetail;1.CaseStatus} = "Closed"
 
Again, I've used both of these types of formulas in other reports.  And, if I remove all of these formulas, I still get invalid group condition.
 
Thanks again for the help
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 01 Oct 2007 at 2:15pm
this is too much code for me to sit down and parse together. What i would do is go into debug mode and after assigning the string to Formula, the print it to the Command window in the IDE so you can see the full string. Then copy and paste this into the report that doesn't work for the formula. When you click the Save & Close button in CR, it should tell you which part of the string is triggering the error. Then work from there. That's how I debug errors and it's pretty quick for tracking down the problem. Trying to figure out a CR error while in .NET is much too convoluted.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
usmdm82
Newbie
Newbie
Avatar

Joined: 26 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
Quote usmdm82 Replybullet Posted: 02 Oct 2007 at 6:40am
It is unfortunate at best, but I am unable to debug at my company.  I survive only on Traces.  The formulas are written inside of the rpt and the rpt runs fine within the Crystal app.
 
Thanks anyway.  I will try rewriting.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.