Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date parameter Post Reply Post New Topic
Author Message
Hartdrooz
Newbie
Newbie
Avatar

Joined: 21 Jul 2008
Location: Canada
Online Status: Offline
Posts: 2
Quote Hartdrooz Replybullet Topic: Date parameter
     Posted: 21 Jul 2008 at 10:20am
Hi,
 
I'm using Crystal Reports version 11.
 
I created a report with a store procedure (SQL SERVER), my procedure has three parameters, two are date.
 
I want to know if is possible to enter the current date by default when the parameter window open when I run my report.
 
 
 
 
IP IP Logged
CRNewbie32
Newbie
Newbie
Avatar

Joined: 14 Oct 2008
Location: United States
Online Status: Offline
Posts: 22
Quote CRNewbie32 Replybullet Posted: 14 Oct 2008 at 8:06am
I'm not fixing your problem, but wondered if you could fix mine.
I have a question and it looks like you might know the answer. I'm having problems with a SQL Server stored proc that I'm reading in Crystal. Two of the parameters are datetime type which do not work in Crystal. I'm new to Crystal and I don't get it. I tried changing parameters to varchar but then you don't see the calendar control in Crystal. Any thoughts?
TrytoworkwithSQLServerCrystal
IP IP Logged
angel1111
Newbie
Newbie
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 2
Quote angel1111 Replybullet Posted: 16 Oct 2008 at 6:53am
why cant you just write the code for 'current date' as  getdate() in your procedure itself
angel111
IP IP Logged
Hartdrooz
Newbie
Newbie
Avatar

Joined: 21 Jul 2008
Location: Canada
Online Status: Offline
Posts: 2
Quote Hartdrooz Replybullet Posted: 16 Oct 2008 at 7:03am
Hi,
 
If you want to see the calendar you must declare your variables datetime in your store proc.
 
Look the order of you parameter versus the store proc I mean if you have this order for example in your report.
 
varchar
datetime
datetime
 
And in your store proc you have
 
datetime
datetime
varchar
 
Maybe this is the cause of the problem but write your code it will be usefull to solve your problem.
 
Hugo
IP IP Logged
CRNewbie32
Newbie
Newbie
Avatar

Joined: 14 Oct 2008
Location: United States
Online Status: Offline
Posts: 22
Quote CRNewbie32 Replybullet Posted: 16 Oct 2008 at 7:06am
The parameters are in the right order because SQL Server and Crystal work okay by themselves. It's only when it's published to Lawson's LBI that the calendar control doesn't work and only if regular user log-on is used (admin log-on seems to work). I've kicked the problem over to Lawson and our consultant because I don't have the log-on to give Lawson the info they need. Thanks anyway.
TrytoworkwithSQLServerCrystal
IP IP Logged
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