Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 May 23rd, 2005, 03:36 PM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing a virtual variable from ASP to Crystal

Greetings Programs!

I have an ASP page where I input values that will be used as criteria for a Crystal version 9 report. The SQL statement is generated dynamically based on a load of conditional statements. It works Great! The report responds within the Viewer and displays the correct data set based on the users selected criteria. I can display the SQL statement that I store in a variable called selectstring on the asp page that has the viewer.

Example: session("oRpt").SQLQueryString = selectstring

My Issue is that I want to be able to Display the selectstring value "On The Report Header" of the Crystal report.

How do I do this? I tried several way of doing it, but I can't seem to get it to display on the Crystal report. I know the report sees the SQL statement, otherwise it would not return the correct record set, in fact it probably wouldn't return anything.

How can I pass the value of my asp selectstring variable into a variable that I can use within crystal

Help Please :)

 
Old July 14th, 2005, 10:50 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default

This should probably go under a Crystal forum, but I'll give it a try. I am assuming that you are either using Crystal Enterprise or Crystal Report Designer Component (RDC). If the latter you could try creating a parameter in the report and passing the argument as such...

Session("oRpt").ParameterFields.GetItemByName("MyP arameter").AddCurrentValue(cStr(sqlSelectString))

MyParameter being your Crystal parameter and sqlSelectString being the value of your select string. Then you should be able to call it from anywhere in the report.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing input Dates in a Crystal Report from ASP P preethig Classic ASP Basics 4 March 5th, 2008 08:50 AM
passing variable tbekarov ASP.NET 2.0 Professional 7 February 1st, 2006 04:16 PM
Passing variable to a public variable Hudson40 Access VBA 2 February 25th, 2005 06:23 AM
passing parameter from asp.net to crystal report diyagp Crystal Reports 0 October 26th, 2004 05:29 AM
strange behaviour: session variable/virtual host ahfaich Pro PHP 8 May 12th, 2004 11:53 AM





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