Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: passing parameters from VB to CR Post Reply Post New Topic
Author Message
cross
Newbie
Newbie


Joined: 03 Apr 2007
Online Status: Offline
Posts: 12
Quote cross Replybullet Topic: passing parameters from VB to CR
    Posted: 15 Jun 2007 at 12:39am
Hi All,

I have a crystal report with the following parameters in the select expert:

TXN_DATE >= {?date_from} and
TXN_DATE <= {?date_to}

this way, the date_from and date_to are always asked whenever the report is run and refreshed.

i have written a VB program  to be used in generating this report and in that program i need the user to type in these parameters into a text box and have VB pass these values to CR as date_from and date_to.

i tried doing it this way:

CrystalReport1.parameterfields(0) = "date_from;Text1.Text"

but it does not work

can anybody help me?

thanks.

****** UPDATE:

i used this and it worked:

CrystalReport1.parameterfields(0) = "date_from;date(2007,06,14);true"

problem is that CR still displays the "Enter Parameters Value" window.  Is there a way to make CR skip this and directly accept the parameters that were passed?


Edited by cross - 15 Jun 2007 at 2:28am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 15 Jun 2007 at 2:41pm
I don't get it. You say that it works but that CR still prompts you for the parameter. So did it take your input or not? I'm thinking that maybe you saved the data to the DefaultValues property instead of CurrentValues. You need to save it to CurrentValues to keep from getting prompted.
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
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.