Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2008, 04:51 AM
Registered User
 
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing input Dates in a Crystal Report from ASP P

Hi all,

I am using Crystal reports 8.5 to develop my report. I use the the Crystal report Enterprise Version 8.0 to view my reports in the IE 6.0 Web browser.
I communicate to the Crystal Enterprise through my Active Server Pages.(ASP 3.0)

From my asp page redirect to the url
I use response.redirect

Here is an example URL:

http://Domain/Directory/Report.rpt?&prompt0=Value
my url request is

Response.Redirect("report.rpt?&prompt0=" & some random value & "&prompt1=" & DateField & "&prompt2 =" & DateField & )

and I use "sf " query string parameter for passing new selection criteria

Problem:
 Even after passing the input date parameters as the parameter values for the parameter "Prompt1" and "Prompt2" in my Active Server Page, on launch of the Crystal report in the Crystal enterprise Viewer, the Crystal reports' Dialog still prompts the user to give input dates.

Need Solution for:
 I should be able to pass the date parameter values from the ASP page and susequently, the crystal dialog should not be prompted to get the input dates.
Kindly suggest a solution.

Thanks in advance!!
Preethi



 
Old March 3rd, 2008, 05:11 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Not any help to you in relation to Crystal - Just hate the SQL output, always have...

Anyhow this is weird looking syntax:
Response.Redirect("report.rpt?&prompt0...

Shouldnt it be:
Response.Redirect("report.rpt?prompt0...

Or is that a Crystal thing? Also you end your line the folowing way:

& DateField & )

Wouldnt the '&' after the DateField cause an error?

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old March 4th, 2008, 12:54 AM
Registered User
 
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default


Thank You for finding the error.
There in no & at the end, just missed out on typos.

The url request is
Response.Redirect("report.rpt?&prompt0=" & some random value & "&prompt1=" & DateField & "&prompt2 =" & DateField )

There are three parameters defined in the crystal report
Prompt0 is a parameter to accept number
Prompt1 is a parameter to accept Date
Prompt2 is a parameter to accept Date

I am not sure whether it is a problem of passing dates in ASP, the crystal syntax in URL request or we need to configure any thing else explicitly in the crystal report.

Thanks,
Preethi
 
Old March 4th, 2008, 06:33 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You still have the '&' after the '?' in your query string. When somone asks you questions here they are trying to help, you should answer qustions asked. I asked:

;;;Or is that a Crystal thing?

Is it? Shouldnt it be:

Response.Redirect("report.rpt?prompt0...

;;;I am not sure whether it is a problem of passing dates in ASP
No there isnt, you can pass dates in query strings with no trouble.

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old March 5th, 2008, 08:50 AM
Registered User
 
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the tip.

I have changed my query as
Response.Redirect("report.rpt?prompt0=" & some random value & "&prompt1=" & DateField & "&prompt2 =" & DateField )
it is a crystal Syntax.

Still, the Crystal report viewer is asking the input dates for the second time.

Thanks,
Preethi





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing values to Crystal Report ctranjith Crystal Reports 9 November 9th, 2012 02:06 AM
Passing value from winform to crystal report shai Crystal Reports 0 January 20th, 2007 05:19 AM
passing parameter from asp.net to crystal report diyagp Crystal Reports 0 October 26th, 2004 05:29 AM
Crystal report, passing parameter suni_kutty Crystal Reports 2 October 7th, 2004 03:13 AM
passing parameters at runtime using crystal report anilkumar Crystal Reports 2 January 3rd, 2004 01:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.