Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a date from .net to crystal subreport

Status
Not open for further replies.

turnde

Programmer
Jul 8, 2003
5
US
Helloooo,
I am trying to pass a date to a Crystal 8.5 subreport from asp.net. When I run the page it asks for the date to be entered then runs fine. I cannot figure out how to pass the date so that the report runs without asking for input.
Can anyone help me!:-}
Here's some of the code.

I also tried to (hardcode) assigned
hdnDate.text to "Date(2002,11,11)"
and it didn't work


Dim MyDate As Date
Dim MyMonth As Integer
Dim cMyDay As Integer
Dim cMyYear As Integer
Code:
    MyDate = server.Tables(0).Rows(0).Item("THE_DATE")  ' Assign a date.          

    MyMonth = Month(MyDate)   ' MyMonth contains 2.
 
    cMyYear = Right(Year(MyDate), 4)

    hdnDate.Text = "DATE(" & cMyYear & "," & MyMonth & "," & cMyDay & ")"


hlCrystal.NavigateUrl = "date.rpt?User0=" & user & " &Password0=" & PW & "
&User0@Allow=" & user & "  
&Password0@Allow=" & PW & "
&User0@Allow - 01=" & user & "
&Password0@Allow - 01=" & PW & "
&User0@Board=" & user & "
&Password0@Board=" & PW & "

&Prompt0=" & Value1 & "
&Prompt1=" & value2 & "
&Prompt2=" & hdnSel.Text & "
&Prompt3=" & randNum & "
&Prompt4=" & hdnDate.Text & "
&PromptOnRefresh=0
&connect=1
&cmd=EXPORT&EXPORT_FMT=U2FPDF:0"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top