Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Crystal Report OLE

2 posts in Appeon (partner product) Last posting was on 2008-06-18 09:01:18.0Z
Gippa Posted on 2008-06-12 12:55:45.0Z
From: Gippa <giuseppe.moglia@gmail.com>
Newsgroups: sybase.public.appeon
Subject: Crystal Report OLE
Date: Thu, 12 Jun 2008 05:55:45 -0700 (PDT)
Organization: http://groups.google.com
Lines: 171
Message-ID: <8598c747-1ed6-4a44-a450-1c2eff312ef6@m36g2000hse.googlegroups.com>
NNTP-Posting-Host: 88.37.33.130
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1213275345 24759 127.0.0.1 (12 Jun 2008 12:55:45 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 12 Jun 2008 12:55:45 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m36g2000hse.googlegroups.com; posting-host=88.37.33.130; posting-account=BQmLiwoAAADCbMIdMDUMvtsd3omFnfG7
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!m36g2000hse.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2155
Article PK: 13307

Hi
here we are trying to put our PB application on web. In client server
mode we have this example:

// Variable Declare
integer li_iTable // Report Index Table in use
integer li_iSection // Section Index
integer li_iReportObject // ReportObject Index
OLEObject loo_Subreport // OLE Subreport
OLEObject loo_Section // Ole Section
OLEObject loo_ReportObject // Ole Report

// Crystal Reports Runtime
string CRRUNTIME = 'CrystalRuntime.Application'
oleobject ioo_CRXRuntime
oleobject ioo_CRXReport

// Runtime Crystal Reports Creates
ioo_CRXRuntime = create OLEObject
ioo_CRXReport = create OLEObject
if ioo_CRXRuntime.ConnectToNewObject(CRRUNTIME) < 0 then
MessageBox('OLE CRW', 'Error Runtime Crystal Reports Creates')
Return
end if

// File's report Definition
// Important !!! : we need to deploy this report on EAS
// In this example all users have a copy on their machines and they
see the db
// We need to embed this report only on AppeonServer so only app see
the db
ioo_CRXReport = ioo_CRXRuntime.OpenReport('C:/example.rpt',1) // here
you have to insert the your rpt name file

//-- Create of Temporary Object
loo_Subreport = create OLEObject
loo_Section = create OLEObject
loo_ReportObject = create OLEObject

//-- Logon of Table's Report
for li_iTable = 1 to ioo_CRXReport.database.tables.count Step 1

// Here you have to insert your DB connection parameter
// 1) ServerDBName
// 2) DatabaseName
// 3) ServerDBUserId
// 4) ServerDBPassword
//
ioo_CRXReport.database.tables[li_iTable].SetLogOnInfo( 'ServerDBName'
&
// , 'DatabaseName' &
// , 'ServerDBUserId' &
// , 'ServerDBPassword' )

// This is Our Configuration !!!
ioo_CRXReport.database.tables[li_iTable].SetLogOnInfo( 'satant9'
&
, '' &
, 'username' &
, 'password' )

// Test Connection
if not(ioo_CRXReport.database.tables[li_iTable].TestConnectivity())
then
MessageBox('NO TEST CONNECT', 'ERROR !!!!')
end if

next

//-- Logon of Table's SubReport

// Important !!! In the our rpt example there'is not SubReport, but in
general
// we have always subreport.

// For each section i must do the Connection to DB
for li_iSection = 1 to ioo_CRXReport.sections.count Step 1

// Extract the Section
loo_Section = ioo_CRXReport.sections[li_iSection]

// I scan all object of section for search the subreport object
for li_iReportObject = 1 to loo_Section.ReportObjects.count

loo_ReportObject = loo_Section.ReportObjects[li_iReportObject]

if loo_ReportObject.kind = 5 then

// I have find a SubReport
loo_SubReport =
ioo_CRXReport.OpenSubreport(loo_ReportObject.subreportname)

// Logon of Table's SubReport
for li_iTable = 1 to loo_SubReport.database.tables.count

// Here you have to insert your DB connection parameter
// 1) ServerDBName
// 2) DatabaseName
// 3) ServerDBUserId
// 4) ServerDBPassword
//
ioo_CRXReport.database.tables[li_iTable].SetLogOnInfo( 'ServerDBName'
&
// , 'DatabaseName' &
// , 'ServerDBUserId' &
// , 'ServerDBPassword' )

// This is Our Configuration !!!

loo_SubReport.database.tables[li_iTable].SetLogOnInfo( 'satant9' &
, '' &
, 'username' &
, 'password' )
if
not(loo_SubReport.database.tables[li_iTable].TestConnectivity()) then
MessageBox('NO TEST CONNECT SUBREPORT', 'ERRROR !!!')
end if
next

end if
next

next

destroy loo_Subreport
destroy loo_Section
destroy loo_ReportObject

// If i have select the Print, i asked for printing
if cbx_print.Checked = True then
ioo_CRXReport.PrinterSetup(0)
ioo_CRXReport.PrintOut(False)
end if

// Define the Viewer Object
ole_crw.object.DisplayBorder = FALSE
ole_crw.object.DisplayGroupTree = FALSE
ole_crw.object.DisplayTabs = FALSE
ole_crw.object.DisplayToolbar = FALSE
ole_crw.object.EnableAnimationCtrl = FALSE
ole_crw.object.EnableCloseButton = FALSE
ole_crw.object.EnableDrillDown = FALSE
ole_crw.object.EnableExportButton = FALSE
ole_crw.object.EnableGroupTree = FALSE
ole_crw.object.EnableNavigationControls = FALSE
ole_crw.object.EnablePrintButton = FALSE
ole_crw.object.EnableProgressControl = FALSE
ole_crw.object.EnableRefreshButton = FALSE
ole_crw.object.EnableSearchControl = FALSE
ole_crw.object.EnableSearchExpertButton = FALSE
ole_crw.object.EnableSelectExpertButton = FALSE
ole_crw.object.EnableStopButton = FALSE
ole_crw.object.EnableToolbar = FALSE
ole_crw.object.EnableZoomControl = FALSE

// I see the Report
ole_crw.object.ReportSource(ioo_CRXReport)
ole_crw.object.ViewReport()



I need:
• to put myreport on web embedded on our applicaton
• no user have to see the db directly to visualize the Crystal Report
• the connection to the DB is handled only by the application.

Someone of you have any idea to realize this targets?????
Please help me!


Thank's


Sally Li Posted on 2008-06-18 09:01:18.0Z
Sender: 3a0f.4858cd22.1804289383@sybase.com
From: Sally Li
Newsgroups: sybase.public.appeon
Subject: Re: Crystal Report OLE
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4858cede.3a48.1681692777@sybase.com>
References: <8598c747-1ed6-4a44-a450-1c2eff312ef6@m36g2000hse.googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 18 Jun 2008 02:01:18 -0700
X-Trace: forums-1-dub 1213779678 10.22.241.41 (18 Jun 2008 02:01:18 -0700)
X-Original-Trace: 18 Jun 2008 02:01:18 -0700, 10.22.241.41
Lines: 213
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2161
Article PK: 21548

Hi,

I think some engineer in Appeon send a solution to you via
Email. Did you try that solution? If you still have some
questions on the solution I suggest you keep in touch with
Nancy.

Regards
Sally

> Hi
> here we are trying to put our PB application on web. In
> client server mode we have this example:
>
> // Variable Declare
> integer li_iTable // Report Index Table
> in use integer li_iSection // Section
> Index integer li_iReportObject // ReportObject
> Index OLEObject loo_Subreport // OLE
> Subreport OLEObject loo_Section // Ole
> Section OLEObject loo_ReportObject // Ole Report
>
> // Crystal Reports Runtime
> string CRRUNTIME =
'CrystalRuntime.Application'
> oleobject ioo_CRXRuntime
> oleobject ioo_CRXReport
>
> // Runtime Crystal Reports Creates
> ioo_CRXRuntime = create OLEObject
> ioo_CRXReport = create OLEObject
> if ioo_CRXRuntime.ConnectToNewObject(CRRUNTIME) < 0 then
> MessageBox('OLE CRW', 'Error Runtime Crystal Reports
> Creates')
> Return
> end if
>
> // File's report Definition
> // Important !!! : we need to deploy this report on EAS
> // In this example all users have a copy on their machines
> and they see the db
> // We need to embed this report only on AppeonServer so
> only app see the db
> ioo_CRXReport =
> ioo_CRXRuntime.OpenReport('C:/example.rpt',1) // here you
> have to insert the your rpt name file
>
> //-- Create of Temporary Object
> loo_Subreport = create OLEObject
> loo_Section = create OLEObject
> loo_ReportObject = create OLEObject
>
> //-- Logon of Table's Report
> for li_iTable = 1 to ioo_CRXReport.database.tables.count
> Step 1
>
> // Here you have to insert your DB connection
> parameter
> // 1) ServerDBName
> // 2) DatabaseName
> // 3) ServerDBUserId
> // 4) ServerDBPassword
> //
> ioo_CRXReport.database.tables[li_iTable].SetLogOnInfo(
> 'ServerDBName' &
> //
> , 'DatabaseName' &
> //
> , 'ServerDBUserId' &
> //
> , 'ServerDBPassword' )
>
> // This is Our Configuration !!!
> ioo_CRXReport.database.tables[li_iTable].SetLogOnInfo(
> 'satant9' &
>
> , '' &
>
> , 'username' &
>
> , 'password' )
>
> // Test Connection
> if
> not(ioo_CRXReport.database.tables[li_iTable].TestConnectiv
> ity()) then
> MessageBox('NO TEST CONNECT', 'ERROR !!!!')
> end if
>
> next
>
> //-- Logon of Table's SubReport
>
> // Important !!! In the our rpt example there'is not
> SubReport, but in general
> // we have always subreport.
>
> // For each section i must do the Connection to DB
> for li_iSection = 1 to ioo_CRXReport.sections.count Step
1
>
> // Extract the Section
> loo_Section = ioo_CRXReport.sections[li_iSection]
>
> // I scan all object of section for search the
> subreport object
> for li_iReportObject = 1 to
> loo_Section.ReportObjects.count
>
> loo_ReportObject =
> loo_Section.ReportObjects[li_iReportObject]
>
> if loo_ReportObject.kind = 5 then
>
> // I have find a SubReport
> loo_SubReport
> ioo_CRXReport.OpenSubreport(loo_ReportObject.subreportname
> )
>
> // Logon of Table's SubReport
> for li_iTable = 1 to
> loo_SubReport.database.tables.count
>
> // Here you have to insert your DB
> connection parameter
> // 1) ServerDBName
> // 2) DatabaseName
> // 3) ServerDBUserId
> // 4) ServerDBPassword
> //
> ioo_CRXReport.database.tables[li_iTable].SetLogOnInfo(
> 'ServerDBName' &
> //
> , 'DatabaseName' &
> //
> , 'ServerDBUserId' &
> //
> , 'ServerDBPassword'
> )
>
> // This is Our Configuration !!!
>
> loo_SubReport.database.tables[li_iTable].SetLogOnInfo(
> 'satant9' &
>
> , '' &
>
> , 'username' &
>
> , 'password' )
> if
> not(loo_SubReport.database.tables[li_iTable].TestConnectiv
> ity()) then
> MessageBox('NO TEST CONNECT SUBREPORT'
> , 'ERRROR !!!')
> end if
> next
>
> end if
> next
>
> next
>
> destroy loo_Subreport
> destroy loo_Section
> destroy loo_ReportObject
>
> // If i have select the Print, i asked for printing
> if cbx_print.Checked = True then
> ioo_CRXReport.PrinterSetup(0)
> ioo_CRXReport.PrintOut(False)
> end if
>
> // Define the Viewer Object
> ole_crw.object.DisplayBorder = FALSE
> ole_crw.object.DisplayGroupTree = FALSE
> ole_crw.object.DisplayTabs = FALSE
> ole_crw.object.DisplayToolbar = FALSE
> ole_crw.object.EnableAnimationCtrl = FALSE
> ole_crw.object.EnableCloseButton = FALSE
> ole_crw.object.EnableDrillDown = FALSE
> ole_crw.object.EnableExportButton = FALSE
> ole_crw.object.EnableGroupTree = FALSE
> ole_crw.object.EnableNavigationControls = FALSE
> ole_crw.object.EnablePrintButton = FALSE
> ole_crw.object.EnableProgressControl = FALSE
> ole_crw.object.EnableRefreshButton = FALSE
> ole_crw.object.EnableSearchControl = FALSE
> ole_crw.object.EnableSearchExpertButton = FALSE
> ole_crw.object.EnableSelectExpertButton = FALSE
> ole_crw.object.EnableStopButton = FALSE
> ole_crw.object.EnableToolbar = FALSE
> ole_crw.object.EnableZoomControl = FALSE
>
> // I see the Report
> ole_crw.object.ReportSource(ioo_CRXReport)
> ole_crw.object.ViewReport()
>
>
>
> I need:
> • to put myreport on web embedded on our applicaton
> • no user have to see the db directly to visualize
the
> Crystal Report • the connection to the DB is handled
> only by the application.
>
> Someone of you have any idea to realize this targets?????
> Please help me!
>
>
> Thank's