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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manipulating Exportfilename to Include a value based on the Parm

Status
Not open for further replies.

AndersonCJA

Programmer
Jul 30, 2003
57
US
Hi, I have spent way too much time searching dead end links and could really use some help.

I am using a Microsoft report server and Asp code.
The asp page is a second part in a third piece process.

The first page is a parameter page, the second page uses the paramters, calls the crystal report and opens the report using Excel.

The Asp page uses the report name as the.xls file.

I have successfully modified the variable to include the value of the paramters. I want to add one more piece of information to the name based on the value of the parameter ParamValue1. this is where I am stuck.
this is the line of code that names the file successfully.
ExportFileName = ParamValue1 & ParamValue2 & ParamValue5 & ParamValue6 & ParamValue7 & "report Name" & fileextension

How can I successfully compare ParamValue1 to 1, 2, or 3 and provide a text value based on the value? The ParamValue1 is initially used like this:
Set session("ParamCollection") = Session("oRpt").Parameterfields
set Param1 = session("ParamCollection").Item(1)
ParamValue1 = Request("P1")
Call Param1.SetCurrentValue (CDbl(ParamValue1), 7)

I have tried the code below, But I get a server error, this page can not be displayed
<%
myvariable ="init"
if
ParamValue= 1
then
myvariable = "ABC"
%>
and used myvaariable here:
ExportFileName = myvaariable & ParamValue1 & ParamValue2 & ParamValue5 & ParamValue6 & ParamValue7 & "Report reportName" & fileextension
I have not been able to compare ParamValue1 successfully.
(this is only a piece of the code.
Thank you!!!
 
This is resolved.
The fourth line was corrected by changing it to:
ParamValue= (1) from, ParamValue= 1

<%
myvariable ="init"
if
ParamValue= 1
then
myvariable = "ABC"
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top