Link to home
Start Free TrialLog in
Avatar of gmjames13
gmjames13Flag for United States of America

asked on

Classic ASP calling Crystal Reports

I have a simple form with 3 selections that user must complete (Start Date (textbox), End Date (textbox), Report Name (dropdownlist))  When the user clicks the submit button I want the form to post back to itself and call a stored procudure (usp_report).  The stored procedure needs all 3 parameters to run.  I then need to open crystal reports 10 with the results. How do I accomplish this?  My crystal reports are on the same developement server and the data is on sql server 2000.  I have spent hours looking at articles relating to the subject, but I still have not been able to grasp the concept.  I need the answer in plain simple english.  Thanks in advance for any help you can provide.
<html>
<head>
 <title>Reporting</title>
</head>
 
<body>
<center>
 
<form name="Form_Main" ID="Form_Main" action="default.asp" method="POST">
 
<table border="0" align="center" cellpadding="0" cellspacing="0" ID="Table1">
	<tr>
		<td align="center"><img src=""></td>
	</tr>
	<tr>
		<td align="center" class="header">REPORTING</td>
	</tr>
	<tr>
	<td>
 
	   <table border="1" cellpadding="0" cellspacing="0" ID="Table2">
	      <tr bgcolor="red">
	         <td align="center" class="td">Begin Date</td>	
		 <td align="center" class="td">End Date</td>	
		 <td align="center" class="td">Report</td>
	      </tr>
	      <tr bgcolor="silver">
		 <td>
			<input type="text" name="tbLdStart" ID="tbLdStart" size="10" value="<%=trim(ldStart)%>">
		</td>
	   	 <td>
	   		<input type="text" name="tbLdEnd" ID="tbLdEnd" size="10" value="<%=trim(ldEnd)%>">
	   	</td>
		 <td>	
			<select name="ddLdReport" ID="Select1" class="tdSelections" onchange="Selections();" <%=lsDisabled%>>
		           <option value="0" <%IF trim(ldReport) = "0" then response.write "Selected" %>>Select Report</option>
		           <option value="1" <%IF trim(ldReport) = "1" then response.write "Selected" %> >Employee Summary</option>
		           <option value="2" <%IF trim(ldReport) = "2" then response.write "Selected" %> >Employee Summary - Dept</option>
		           <option value="3" <%IF trim(ldReport) = "3" then response.write "Selected" %> >Employee Summary - Dept Charges</option>
			</select>
		 </td>
	     </tr>
	   </table>
	</td>
    </tr>
</table>
 
<br><input type="Reset" value="Clear" id="button2" name="button2">
 &nbsp;&nbsp;&nbsp;
<input type="Submit" value="Open Report" id="btnSubmit" name="btnSubmit">
&nbsp;&nbsp;&nbsp;
<input type="button" value="Close Window" onclick="javascript:window.close();" id="btnClose" name="btnClose">
 
</form>
 
</body>
</html>

Open in new window

Avatar of Mike McCracken
Mike McCracken

Are you wanting to push the data to the report?

If you pass the parameters to Crystal, Crystal will pass them to the stored procedure, run it, then display the report.

Here is a link to several example ASP programs that call CR10
http://support.businessobjects.com/communityCS/FilesAndUpdates/aspxmps10.exe.asp

mlmcc
Avatar of gmjames13

ASKER

How do I know which one of the ASP examples to use with what I am trying to accomplish.  I do not know the first thing about crystal reports.  How do I pass the variables to crystal so that crystal can pass the variables to the stored procedure.
THere should be one that has PARAMETER in the file name.

mlmcc
How do I pass the parameters to crystal reports?   I have finally got crystal reports to open, I can see my stored procedure, but I do not understand how to pass my start and end dates from crystal to my stored procedure.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for yor help