Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO 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 November 2nd, 2004, 12:54 PM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ronbora
Default ASP Crystal Report Problem

Dear friends,
         Can you please help me making a report in Crystal Report from ASP. I'm using ASP(developed in Visual Interdev), SQL Server 2000(RDBMS) and Crystal Report 7.0. I created the report using the following code.


<html>
<head>
<title>Login Page</title>
</head>
<BODY bgColor=#c6c6c6 language=VBScript>
<OBJECT classid=CLSID:C4847596-972C-11D0-9567-00A0C9273C2A
codeBase=/viewer/activeXViewer/activexviewer.cab#Version=7,0,0,371 height="95%"
id=CRViewer width="100%"><PARAM NAME="EnableDrillDown" VALUE="1"><PARAM NAME="EnableExportButton" VALUE="1"><PARAM NAME="DisplayGroupTree" VALUE="1"><PARAM NAME="EnableGroupTree" VALUE="1"><PARAM NAME="EnableAnimationControl" VALUE="1"><PARAM NAME="EnablePrintButton" VALUE="1"><PARAM NAME="EnableRefreshButton" VALUE="1"><PARAM NAME="EnableSearchControl" VALUE="1"><PARAM NAME="EnableZoomControl" VALUE="1"><PARAM NAME="EnableSearchExpertButton" VALUE="0"><PARAM NAME="EnableSelectExpertButton" VALUE="0"></OBJECT>


<SCRIPT LANGUAGE="VBScript">
<!--

Sub window_onLoad()
Page_Initialize()
End Sub

Sub window_onLoad()
Page_Initialize()
End Sub

Sub Page_Initialize
On Error Resume Next
dim var_ilp_id
Dim webBroker
Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
Dim webSource0
Set webSource0 = CreateObject("WebReportSource.WebReportSource")
webSource0.ReportSource = webBroker
webSource0.URL ="http://localhost/rptAll.rpt?dsn0=student&user0=sa&password0=&dsq0=S tudent"
webSource0.PromptOnRefresh =false
CRViewer.DisplayGroupTree=false
CRViewer.ReportSource = webSource0
CRViewer.ViewReport
End Sub

-->
</SCRIPT>
</BODY>
</html>



It's working fine.It shows all the records.

        But if I want to see the record for a particular StudentId, then what to do. Usually in VB I added the part below-

        RPT1.SelectionFormula="{Table.Field}"=& cDbl(StudentId)

        But in CRviewer I tried with the part

     dim x
     x=InputBox("Enter the Student No")
     CRViewer.SearchByFormula("{Table.Field}")=& cDbl(StudentId)

     Even if it didn't work.Can you please give me a hint. I'll be ever grateful to you.





RONb
 
Old January 26th, 2005, 01:27 PM
Registered User
 
Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

At least you get your report to show up. My report does not show up at all. Just a blank report.

 
Old February 3rd, 2005, 11:48 PM
Authorized User
 
Join Date: Feb 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't think there is the way to let you put seeach parameter after the report has been generated from web page. you can change the way to run the report.

There are two ways for you:
1, passing a parameter to the report. if you have only one parameter, then please use prompt0=studenID. When you receive the value of parameter, use select fomular to only show the record you specified.
2, passing a parameter to the stored procedure and only return the record you want.

If you need the sample code, please let me know.

James
Top-ink.com
www.top-ink.com
 
Old February 22nd, 2005, 07:05 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sdroy
Default

I am facing the same problem using Crystal Report 8.5 where the Report Viewer is appaering in the Browser but data are not coming in the viewer.
Please Help...............Thanks everybody

Roy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report problem in ASP.Net aliirfan84 ASP.NET 2.0 Professional 0 July 11th, 2007 02:11 AM
Crystal Report Problem with ASP.Net 2.0 aliirfan84 ASP.NET 2.0 Professional 1 June 17th, 2007 01:39 AM
Logon Problem using Crystal Report and Asp.net ??? charles Crystal Reports 13 March 1st, 2007 02:49 PM
problem with crystal report in asp.net 1.1 robyjoseph ASP.NET 1.0 and 1.1 Professional 0 February 20th, 2007 01:27 AM
Problem in using Crystal report with asp.net sKavita ASP.NET 1.0 and 1.1 Professional 0 November 7th, 2006 02:48 AM





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