Blank report displayed in viewer when called from asp page

Posted on 2005-05-05
Last Modified: 2008-02-01
I am new to crystal, have the eval version of CR11 Developer Edition.

I created a report and use asp code to display the report from a web page in the activeX viewer.  I did all this using sample code from business objects.

I am trying to do the same now with a report with dynamic parameters.  
So I have a html form that passes a start and end date to an asp page that calls the report but when the report is run it just opens the viewer with no report inside.  The date range i choose definetly contains data.  I think the dates are being passed properly because first i had a type mismatch error from passing my parameters but now it is gone after i converted the text values my dates are stored as to dates.

Can anyone point me in the right direction?
I don't really know asp but have some programming experience - i am just reusing the sample code.

Question by:saunaG
    LVL 42

    Expert Comment

    Have you tried running the report in Crystal and supplying the same parameters to make sure you get results?

    Also, if you don't have it already, you should make sure your report has some static text in the Report Header section - that way even if there's a data-related problem you should at least see the static text in the viewer.  This will at least narrow down if the report is actually displaying or not.
    LVL 42

    Expert Comment

    You may also want to check out this information:  Particularly the part about an older version of the Active-X viewer already installed on the machine.
    LVL 100

    Expert Comment


    Author Comment

    my report works in crystal and there is  a report header which is basically a title page with some text - no data

    my activex viewer is working too -  i can view other reports without problems.  i can view the exact same report i am having the problem with when i remove the parameters from it.
    LVL 42

    Accepted Solution

    It sounds then like there may be an issue with your parameters.  Can you show the fragment of code where your parameter values are set?  Also give an example of the data value that would be passed?

    Author Comment

    Is this the part you want:


    i think this part is ok because when i first created my html form that passes these values, i did not use the CDate function here to convert the input type text string and got a type mismatch error.  After i added the CDate function above the error disappeared and i get the blank report viewer.

    Author Comment

    After that code there are 2 include files:

    ' Retrieve the Records and Create the "Page on Demand" Engine Object

    'On Error Resume Next


    If Err.Number <> 0 Then                                              
      Response.Write "Error Occurred Reading Records: " & Err.Description
      Set Session("oRpt") = nothing
      Set Session("oApp") = nothing
      If IsObject(session("oPageEngine")) Then                              
            set session("oPageEngine") = nothing
      End If
      set session("oPageEngine") = session("oRpt").PageEngine
    End If

    'This file contains the HTML code to instantiate the Smart Viewer ActiveX.      
    'You will notice that the Report Name parameter references the RDCrptserver10.asp file.
    'This is because the report pages are actually created by RDCrptserver10.asp.
    'RDCrptserver10.asp accesses session("oApp"), session("oRpt") and session("oPageEngine")
    'to create the report pages that will be rendered by the ActiveX Smart Viewer.
    <TITLE>Crystal Reports ActiveX Viewer</TITLE>
    <BODY BGCOLOR=C6C6C6 ONUNLOAD="CallDestroy();" leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>
    <OBJECT ID="CRViewer"
          WIDTH=100% HEIGHT=99%
          CODEBASE="/crystalreportviewers11/ActiveXControls/,0,0,893" 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>

    Sub Window_Onload
          On Error Resume Next
          Dim webBroker
          Set webBroker = CreateObject("CrystalReports11.WebReportBroker.1")
          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."
                Dim webSource
                Set webSource = CreateObject("CrystalReports11.WebReportSource.1")
                webSource.ReportSource = webBroker
                webSource.URL = "RDCrptserver11.asp"
                webSource.PromptOnRefresh = True
                CRViewer.ReportSource = webSource
          end if
    End Sub

    <script language="javascript">
    function CallDestroy()


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    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…
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now