Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: migrate crystal reports from asp to asp.net Post Reply Post New Topic
Author Message
yasinirshad
Newbie
Newbie
Avatar

Joined: 24 Sep 2007
Location: Saudi Arabia
Online Status: Offline
Posts: 39
Quote yasinirshad Replybullet Topic: migrate crystal reports from asp to asp.net
    Posted: 21 Sep 2008 at 1:31am

Hi,
I want to migrate crystal reports from asp to asp.net 2003...Below is the sample asp code...how to do this in asp.net

'*** ASP **************************************

<%

If IsObject(session("oApp")) then

    set session("oApp") = nothing

end if

Set session ("oApp") = Server.CreateObject("Crystal.CRPE.Application")

 

If isObject(session("oRpt")) then

 set session("oRpt") = nothing

End If

Blah....blah...blah......        

'=======================================================================
' WORKING WITH THE REPORT DESIGNER COMPONENT AND ASP TO PREVIEW A REPORT
'=======================================================================

reportname = "ABC.rpt"

'==================================================================
' ALWAYS REQUIRED STEPS
%>
                           
<!-- #include file="AlwaysRequiredSteps.asp" -->                      

<%
'==================================================================
' WORKING WITH THE REPORT PARAMETER COLLECTION

'The following section shows setting single valued parameters of various data types.
Session("oRpt").ParameterFields.GetItemByName("MONTH").AddCurrentValue(CDbl(strMonth))
Session("oRpt").ParameterFields.GetItemByName("RATE").AddCurrentValue(CStr(strRate))

'==================================================================
'  MORE ALWAYS REQUIRED STEPS

%>

<!-- #include file="MoreRequiredSteps.asp" -->


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

 

Thanks,
Yasin.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 22 Sep 2008 at 1:54pm
Take a look at the CrystalReportViewer object.  That's what you'll use to view the report.  You can then go to the Developer Library site (http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/devsuite.htm) and click on the Crystal Reports .NET SDK link to get sample code for how to use it.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.