Passing Parameter value to ActiveXViewer

Posted on 2003-03-17
Medium Priority
Last Modified: 2012-06-27
I am Using ActiveXViwer to display Crystal Reports in ASP Page.
I have one Parameter field in my Report called "ID".
How i will pass value for that parameter? Please help me.

I have to export and Print the report once it displayed. So i am using ActiveXViewer. Am i right?

Question by:VijayK
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
  • 3
LVL 101

Accepted Solution

mlmcc earned 250 total points
ID: 8152232
What code are you using?


Author Comment

ID: 8156711
Here is the code which i am using...

<OBJECT ID="CRViewer" CLASSID="CLSID:2DEF4530-8CE6-41C9-84B6-A54536C90213"
    WIDTH=80% HEIGHT=100%   codebase="/viewer9/activeXViewer/activexviewer.cab#Version=9,2,0,442">
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnableGroupTree" VALUE=0>
<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=1>

Sub window_onLoad()


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_."
        Dim webSource
        Set webSource = CreateObject("WebReportSource9.WebReportSource")
        webSource.ReportSource = webBroker
        webSource.URL = "rptserver.asp?ApplicationId=1222"
        webSource.PromptOnRefresh = True
        webSource.AddParameterEx "AppId","1222",crPrompt  
        CRViewer.ReportSource = webSource
    end if

End Sub

Opening the report takes place in "rptserver.asp" page using "ReportClientDocument" object.

Can you please help me...

LVL 101

Expert Comment

ID: 8156881
Is AppId a string or numeric field?

If it is numeric try

 webSource.AddParameterEx "AppId",1222,crPrompt  

LVL 101

Expert Comment

ID: 8237967
Glad I could help


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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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