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

Using prompt# in Crystal reports 8 not showing data for Crystal 10

Status
Not open for further replies.

ckwizard77

Programmer
Jan 8, 2003
29
US
I am using the prompt# command to send multiple parameters and value through a URL to be viewed in crystal 8. When I do this in Crystal 10 I get nothing?
Here is the url: str1="/Reports10/genReport.asp?reportname=SummaryTest.rpt" & _
"&prompt0=" & s_Boro & "&prompt1=" & s_Category & "&prompt2=" & _
s_Year & "&prompt3=" & i_Boro & "&prompt4=" & i_Category & "&promptOnRefresh=0"
NOTE: the parameters and values are pipe delimited

What needs to be changed to view this in Crystal Reports 10?

Here is the receiving page:
<%@ Language=VBScript %>
<!-- #INCLUDE FILE="../common/session_check.asp"-->
<!-- #INCLUDE FILE="../common/ClsCrystalLogon.asp"-->
<%dim crReport
dim s_reportname
dim s_param
dim i_counter
dim s_paramname
s_paramname="param"
if request(s_paramname & "0")="" then
s_paramname="prompt"
end if
i_counter=0
s_reportname=request("reportname")
if s_reportname>"" then
set crReport=new ClsCrystalLogon
with crReport
.ReportName=s_reportname
.ServerKey="Etrac_Servername"
.DBKey="Etrac_InitialCatalog"
.UserKey="Etrac_Userid"
.PwdKey="Etrac_Pwd"
s_param=request(s_paramname & "0")
while s_param>""
.addParam replace(s_param, "*","%")
i_counter=i_counter+1
s_param=request(s_paramname & i_counter)
wend
end with
'Generate report
crReport.genReport
end if
%>
I am also using the ActiveXViewer.

Any assitance would be greatly appreciated.
If you need to see more code, I will be happy to furnish this. So far I have posted to numerous websites and no one has been able to assist.

Thank you.
 
I have used the promptex# command successfuly in a Crystal Reports 10 report to hyperlink to other Crystal Reports 10 reports published in CE 10.

eg this is code to append the prompts to the end of the URL string that points to a report published in CE10

&promptex0="&{@Region}&"&promptex1="&{?PeriodYear}

for more information search support.businessobjects.com for a document called ce8_urlcommands and read the chapter on promptex#
 
Groggle,
Thank you for responding. I think my problem is that I am really not using a url, but passing the parameters to another page which parses out the parameters and sends them to the report. The above code in my first listing shows how I parse the prompt# (prompt0, prompt1) and values and add them to the collection using addParam below

public Sub addParam(byval v_Param)
ReDim Preserve a_ParamColl(i_ParamCount)
a_ParamColl(i_ParamCount) = v_Param
i_ParamCount = i_ParamCount+1
end Sub

**** I then set the current values here and call the active x viewer.


for each prm in session("oRpt").ParameterFields
select case prm.ValueType
case 12
call prm.SetCurrentValue(cstr(a_ParamColl(i_counter)),prm.ValueType)
case 7,8
call prm.SetCurrentValue(cdbl(a_ParamColl(i_counter)),prm.ValueType)
case else
call prm.SetCurrentValue(a_ParamColl(i_counter),prm.ValueType)
end select
i_counter=i_counter+1
next

I am getting the values to here but can not create the report.
Sorry I wasn't more clear and thank you again for responding so quickly.
 
You shouldn't have any problems using prompt0, etc. in version 10.
You should try to type up a regular url to run the report and see what errors you get, to see if the issue is a change there or in your processing.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top