?
Solved

RAS 9 Web Reports ASP Help

Posted on 2003-02-24
10
Medium Priority
?
1,390 Views
Last Modified: 2007-12-19
I am evaluating RAS 9 and want to know what is the bare minimium code/files required to view a crystal report using ASP? I'm not a programmer. I have downloaded all the samples and read through the SDK and RAS documentation. It seems to be geared to the report develepers. I have the reports, I just need users to view them via our intranet. I prefer the ActiveX viewer. Do you have to use RequiredSteps.asp, MoreRequiredSteps.asp, rtpServer.asp, etc? In the documentaion they have example code that I cant get to work:

<OBJECT ID="CRViewer"
    CLASSID="CLSID:2DEF4530-8CE6-41C9-84B6-A54536C90213"
    WIDTH=100% HEIGHT=99
CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=9,2,0,442">
<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="EnableSelectExpertButton" VALUE=0>
</OBJECT>

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

Sub window_onLoad()
        Page_Initialize()
End Sub

Sub Page_Initialize
    On Error Resume Next
    Dim webBroker
    Set webBroker = CreateObject("WebReportBroker9.WebReportBroker")
    if err.number <> 0 then
        window.alert "_LOC_The Crystal ActiveX Viewer is unable to create its resource objects_ENDLOC_."
    else
        Dim webSource0
        Set webSource0 = CreateObject("WebReportSource9.WebReportSource")
        webSource0.ReportSource = webBroker
        webSource0.URL = "my.rpt"
        webSource0.PromptOnRefresh = True
        CRViewer.ReportSource = webSource0
    end if
    CRViewer.ViewReport
End Sub

-->
</SCRIPT>

I have modified the samples and the closest I've gotten with the 4-5 file method is seeing it time-out after 20 minutes of some type of network activity.  I like 8.5 where you could just open http://server/my.rpt and see your report. What happened to that? Our developers are using CR9 to make the reports now. I might be missing something simple but I have yet to see an eazy guide to web view a CReport for RAS9.


0
Comment
Question by:daJman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 600 total points
ID: 8012884
Look at

http://groups.msn.com/McCrackenUNO/files.msnw?fc_a=0&fc_p=%2FExperts%20Exchange%20Files

There is a file called ras9_asp_samples.zip

It should help you.

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8012897
You may have to join but there are no restrictions on the web site.

mlmcc
0
 
LVL 5

Author Comment

by:daJman
ID: 8013216
Ok, great start but can I change the html viewer to the activex viewer? Do I add a line like "include ActiveXViewer.asp" or something? I only get errors with the html viewer:

Failed to open a rowset. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]SELECT permission denied on object 'hiddentable' database 'DB', owner 'dbo'. Query Engine Error: '42000:[Microsoft][ODBC SQL Server Driver][SQL Server]SELECT permission denied on object 'hiddentable', database 'DB', owner 'dbo'.' Failed to open a rowset. Failed to open a rowset. Error in File C:\WINNT\TEMP\{632447FB-D822-4196-A221-E342674CED91}.rpt: Failed to open a rowset.

webReporting.dll error '800002d3'

The report works fine in CR and the .asp does ask me for login info. It's the same problems I was having with ePortfolio.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 5

Author Comment

by:daJman
ID: 8017909
Ok, I got rid of the "Failed to Open Rowset" error. I switched the ODBC driver to NT authentication. It's working good now. All I need is to do is switch to the ActiveX plugin and I'm set.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8023009
In the future provide a link to your question also.  That way the other people can learn from both commentaries.

mlmcc
0
 
LVL 5

Author Comment

by:daJman
ID: 8027026
Not knowing how to change reportviewer.asp from ras9_asp_samples.zip to use ActiveX, would the following work from aspxmps9.exe?

****** SimpleSetLogonInfo.asp: (I removed all the includes except for the viewer)

<%@ LANGUAGE="VBSCRIPT" %>


reportname = "my.rpt"
Set mainReportTableCollection = Session("oRpt").Database.Tables


For Each mnTable in mainReportTableCollection
  With mnTable.ConnectionProperties
   .Item("user ID") = "username"
   .Item("Password") = "password"
   .Item("DSN") = "DSN"
   .Item("Database") ="DSNDB"
  End With
Next

%><!-- #include file="SmartViewerActiveX.asp" -->

****** SmartViewerActiveX.asp: (notice I changed the websource.URL from rptserver.asp to SimpleSetLogonInfo.asp)

<%
%>
<HTML>
<HEAD>
<TITLE>Crystal Reports ActiveX Viewer</TITLE>
</HEAD>
<BODY BGCOLOR=C6C6C6 ONUNLOAD="CallDestroy();" leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>

<OBJECT ID="CRViewer"
     CLASSID="CLSID:2DEF4530-8CE6-41c9-84B6-A54536C90213"
     WIDTH=100% HEIGHT=100%
     CODEBASE="/viewer9/activeXViewer/activexviewer.cab#Version=9,2,0,442" VIEWASTEXT>
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=1>
<PARAM NAME="DisplayGroupTree" VALUE=1>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="EnableDrillDown" VALUE=1>
<PARAM NAME="EnableSearchControl" VALUE=1>
<PARAM NAME="EnableAnimationControl" VALUE=1>
<PARAM NAME="EnableZoomControl" VALUE=1>
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_Onload
     On Error Resume Next
     Dim webBroker
     Set webBroker = CreateObject("WebReportBroker9.WebReportBroker")
     if ScriptEngineMajorVersion < 2 then
          window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."
     else
          Dim webSource
          Set webSource = CreateObject("WebReportSource9.WebReportSource")
          webSource.ReportSource = webBroker
          webSource.URL = "SimpleSetLogonInfo.asp"
          webSource.PromptOnRefresh = True
          CRViewer.ReportSource = webSource
     end if
     CRViewer.ViewReport
End Sub
-->
</SCRIPT>

<script language="javascript">
function CallDestroy()
{
     window.open("Cleanup.asp");
}
</script>

</BODY>
</HTML>

It appears not to work. The script times out. Any idea why? I just want to view my reports with the ActiveX viewer and I cant seem to figure out how...
0
 
LVL 5

Author Comment

by:daJman
ID: 8030775
Can you not use ActiveX without the RDC?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8031154
0
 
LVL 5

Author Comment

by:daJman
ID: 11214263
I forget what became of this, I think I moved on to another proect but thanks for the help mlmcc.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 11229368
Glad I could help

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question