Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Passing Parameter value to ActiveXViewer

Posted on 2003-03-17
4
Medium Priority
?
303 Views
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?

0
Comment
Question by:VijayK
  • 3
4 Comments
 
LVL 101

Accepted Solution

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

mlmcc
0
 

Author Comment

by:VijayK
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>
</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 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
    CRViewer.ViewReport

End Sub
-->
</SCRIPT>


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

Can you please help me...

0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8156881
Is AppId a string or numeric field?

If it is numeric try

 webSource.AddParameterEx "AppId",1222,crPrompt  

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8237967
Glad I could help

mlmcc
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

564 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