printing crystal report in asp

ravibabu28 used Ask the Experts™
I want to display a Crystal Report created in version 7 or 8 in a ASP Page. What i want is a ASP page to which if just have to send the report file name and it displays the Crystal Report in Browser. I also want to all configuration information which i have to do to configure a Crystal Report on the web server. I never used crystal reports in the web browser before so that is why i need full information of how to configure crystal reports on the server. Can some body help because a project is coming and i need this information as soon as possible. I am offering marks
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hope this code helps.

<TITLE>Crystal Reports OCX Test</Title>
<body language="vbscript" onload="RunReport">

<OBJECT  classid = "clsid:CA281D3B-CA98-11CF-9570-00AA0018EA26"
         CODEBASE = ",5,0,1"
         id      = "CR1"                              
         align      = TEXTTOP
      width      = 100%
      height  = 98%
      hspace  = 0
      vspace  = 0 >

<script language="vbscript">

sub RunReport
     'This sub routine has some simple commands that can be used to view
     'Crystal Reports within Internet Explorer 3.0.  

     ' CR1.ShowErrors 1

     'With Show Errors set to 1, any error messages will presented to you.
     'The ReportFileName attribute should be the URL of the virtual directory on you server
     'where the report file is.  So if your site is and you have a virtual
     'directory for reports called reportsdir and the report is called report1.rpt the
     'attribute would be:
     CR1.ReportFileName = <REPORTFILENAME>

     'When using the activeX viewer control, with the Web reporting engine (CRWeb.dll) you
     'must include the fmt=rpt in the query string portion of the URL, if you do not have the
     'Web Engine the report must have "saved data" and you do not need the fmt=rpt.
     'CR1.GroupSelectionFormula = "{table.fieldname} ='StringValue' "
     'If you report has a group in it, you can provide a group selection formula here.


     'The action must be set to 1, no other options are available.  This tells the viewer
     'control to print the report to the screen.
end sub

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for rnippani

Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial