Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 26th, 2006, 03:48 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can I pass parameters when creating files via CR

before the this program, I got a html setting selected file type
then This ASP creates files in my server, but can I pass parameters while creaing files??

thanks in advance.



  dim exOpts
reportname = "Reqslate.rpt"

If Not IsObject (session("oApp")) Then
    Set session("oApp") = Server.CreateObject("CrystalRuntime.Application")
End If

If IsObject(session("oRpt")) then
    Set session("oRpt") = nothing
End if

Path = Request.ServerVariables("PATH_TRANSLATED")
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path,iLen)
Wend

Set session("oRpt") = session("oApp").OpenReport(path & reportname,1)
set exOpts = Session("oRpt").ExportOptions
exOpts.DestinationType = 1

dim expType
expType = CInt(Request("exportType"))
exOpts.FormatType = expType

dim expFilename
Select case expType
    case 14 'word
    expFilename = "Reqslate.doc"
    exOpts.DiskFileName = server.MapPath(expFilename)


    case 36 'Excel
    expFilename = "Reqslate.xls"

    exOpts.DiskFileName = server.MapPath(expFilename)

    case 31 'PDF
    expFilename = "Reqslate.pdf"
    exOpts.DiskFileName = server.MapPath(expFilename)
    exOpts.PDFExportAllPages = true

end select

Session("oRpt").Export False
Response.Redirect(expFilename)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VS not creating Class files for CR reports zothen123 Crystal Reports 6 July 14th, 2009 02:25 PM
How to pass parameter value to CR SQL Command vijaykumartaduri BOOK: Professional Crystal Reports for VS.NET 3 July 31st, 2007 12:13 AM
How I can pass parameters to 2 ASP files at ones? zukit Classic ASP Databases 4 December 15th, 2004 05:20 AM
how to pass the data from dataset to CR? zouky Crystal Reports 0 November 8th, 2004 02:49 AM
How to pass multiple parameters to CR 9 syedjavid Crystal Reports 1 September 17th, 2003 05:50 AM



All times are GMT -4. The time now is 02:46 AM.


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