?
Solved

Crystal Reports syntax

Posted on 2012-08-22
7
Medium Priority
?
547 Views
Last Modified: 2012-08-24
Hello,

I have a ; or ( in the wrong place.  Can you please help me straiighten this code out?  
Thanks, Joel

if {tblRevisions.DrawingStage} = "Ready For Fab Docs" or {tblRevisions.DrawingStage} = "Released For Fab" then
 if {tblTaskLock.PaymentTerms} = "Net30" then
	Start := RealDueDate2+1;
	End := CDate({tblRevisions.CurrentRevisionOut});
	StartWeekend := RealDueDate2;
 else
	Start := RealDueDate3+1;
	End := CDate({tblRevisions.CurrentRevisionOut});
	StartWeekend := RealDueDate3;
else
	Start := RealDueDate+1;
	End := CDate({tblRevisions.CurrentRevisionOut});
	StartWeekend := RealDueDate ;

Open in new window

0
Comment
Question by:Genius123
  • 2
  • 2
5 Comments
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 396 total points
ID: 38323705
Try...

if {tblRevisions.DrawingStage} = "Ready For Fab Docs" or {tblRevisions.DrawingStage} = "Released For Fab" then
( if {tblTaskLock.PaymentTerms} = "Net30" then
      (Start := RealDueDate2+1;
      End := CDate({tblRevisions.CurrentRevisionOut});
      StartWeekend := RealDueDate2)
 else
      (Start := RealDueDate3+1;
      End := CDate({tblRevisions.CurrentRevisionOut});
      StartWeekend := RealDueDate3))
else
      (Start := RealDueDate+1;
      End := CDate({tblRevisions.CurrentRevisionOut});
      StartWeekend := RealDueDate) ;
0
 
LVL 35

Accepted Solution

by:
James0628 earned 404 total points
ID: 38323944
Peter's version should work, but I don't think you really need the () around the inner if-else.

if {tblRevisions.DrawingStage} = "Ready For Fab Docs" or {tblRevisions.DrawingStage} = "Released For Fab" then
 if {tblTaskLock.PaymentTerms} = "Net30" then
 (
      Start := RealDueDate2+1;
      End := CDate({tblRevisions.CurrentRevisionOut});
      StartWeekend := RealDueDate2;
 )
 else
 (
      Start := RealDueDate3+1;
      End := CDate({tblRevisions.CurrentRevisionOut});
      StartWeekend := RealDueDate3;
 )
else
(
      Start := RealDueDate+1;
      End := CDate({tblRevisions.CurrentRevisionOut});
      StartWeekend := RealDueDate ;
);


 James
0
 

Author Comment

by:Genius123
ID: 38325213
Thanks, worked great.
0
 
LVL 35

Expert Comment

by:James0628
ID: 38328217
I agree with mlmcc.  At most, my post was just a very slight variation/simplification.  I don't need any points for it.

 You can ask to have the question re-opened and then award most/all of the points to Peter.

 James
0
 

Author Comment

by:Genius123
ID: 38329664
mlmcc, can you please reopen this so I can split the points accordingly?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question