Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Passing Parameters from UI Post Reply Post New Topic
Author Message
mexicangreen
Newbie
Newbie


Joined: 07 Jul 2008
Location: United States
Online Status: Offline
Posts: 3
Quote mexicangreen Replybullet Topic: Passing Parameters from UI
    Posted: 07 Jul 2008 at 10:51am
1. I'm using the IF ELSE statement in Crystal Report formula section, but its showing error with the tag (i.e. the word "End" of END IF is not appearing in BLUE color.
 
2. I have an access database in which the dates are splitted in different columns (such as DD in 1st column, MM in 2nd column, YY in 3rd Column, YY in 4th Column).
 
Now I have to generate a report based on the date range selected using DatePicker.......I have concatenated the dates in my crystal report using '&'
 
Now my part of the confusion is, that how can I validate the date range so that the report gets generated?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 07 Jul 2008 at 1:30pm
1.  You don't need "End If".
 
2.  Instead of using '&', create a real date out of the fields.  The syntax is:  Date(yyyy,mm,dd). 
  - Pass the values from your DatePicker into the report as parameters. 
  - Use the formula and the parameter values in your selection criteria.
 
-Dell
IP IP Logged
mexicangreen
Newbie
Newbie


Joined: 07 Jul 2008
Location: United States
Online Status: Offline
Posts: 3
Quote mexicangreen Replybullet Posted: 08 Jul 2008 at 9:21am

First of all, thanks for your reply.

1. But could you please tell me then as how can I use the IF statement,
am I using it right ?
---------------------------------
IF (Condition1) then
      To_Do_1
ELSE
      To_Do_2
End IF
---------------------------------
 
 
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 08 Jul 2008 at 11:23am
If (condition1) then
  To_Do_1
else
  To_Do_2
 
-Dell
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.017 seconds.