loo_AdoRecordset = Create OleObject
ll_rc= lrs_adoresultset.getrecordset(loo_adorecordset)
object type_object
type_object=typeof(loo_adorecordset)
long p,a
a=dw_1.rowcount()
p=loo_adorecordset.recordcount
gi_return=g_ole_crx_application.ConnectToNewObject
('CrystalRuntime.Application.8.5')
long llng_result
if gi_return < 0 then
MessageBox("Error","Could Not Connect To The Crystal Application
Object")
return
end if
llng_result= CreateFieldDefFile(loo_adorecordset,"D:\Sameer
\sss.ttx",true)
llng_result= CreateReportOnRunTimeDs(loo_adorecordset,"D:\Sameer
\ee.rpt","D:\Sameer\ee.ttx",true,true)
gs_rpt_file_name="D:\Sameer\ddd.rpt"
ole_1.object.ReportName(gs_rpt_file_name)
g_ole_crx_report = g_ole_crx_application.OpenReport(gs_rpt_file_name,
1)
g_ole_crx_report.DiscardSavedData
g_ole_crx_report.Database.SetDataSource( loo_adorecordset,3,1)
ole_1.object.ReportSource(g_ole_crx_report)
ole_1.object.ViewReport()
createfielddeffile and createreportonruntime functions are not
running. Bad runtime fuction refence error message is displayed... plz
help me its urgent
Are the two functions you refer to on the Crystal Reports OLE object?
If so you probably need to reference the object
llng_result=
g_ole_crx_application.CreateFieldDefFile(loo_adorecordset,"D:\Sameer\sss.ttx",true)
"sam" <priyanka...@gmail.com> wrote in message
news:a46693f7-4a05-4911...@t13g2000yqt.googlegroups.com...
How are you declaring them?
VB would be:
Declare Function CreateFieldDefFile Lib "p2smon.dll"(lpUnk
As Object, ByVal fileName As String, ByVal
bOverWriteExistingFile As Long) As Long
Parameter Description
- LpUnk The active data source used to create the field
definition file. In C or C++, this is a pointer to an
IUnknown derived COM interface relating to a DAO or ADO
Recordset. In Visual Basic, this is a Recordset or Rowset
object.
- Filename The path and file name of the field definition
file to be created.
- bOverWriteExistingFile If a field definition file already
exists with the specified path and file name, this flag
indicates whether or not to overwrite that file.
Declare Function CreateReportOnRuntimeDS Lib "p2smon.dll" (
lpUnk As Object, ByVal reportFile As String, ByVal
fieldDefFile As String, ByVal bOverWriteFile As Long, ByVal
bLaunchDesigner As Long) As Long
Parameter Description
- LpUnk The active data source used to create the field
definition file. In C or C++, this is a pointer to an
Iunknown derived COM interface relating to a DAO or ADO
Recordset. In Visual Basic, this is a Recordset or Rowset
object.
- ReportFile The path and file name of the report file to be
created.
- FieldDefFile The path and file name of the field
definition file to be created.
- BoverWriteFile If a field definition file already exists
with the specified path and file name, this flag indicates
whether or not to overwrite that file.
- BlaunchDesigner If True (1), Crystal Reports is launched
with the newly created report file opened. Crystal Reports
must be installed on the system.
HTH KL
Good point, however I believe people tend to go with Crystal for its
custom reporting abilities but I always try to counter that argument
with the use of Infomaker as an alternative tool.
KL wrote:
> Don't do crystal reports, but:
> 'These functions are purely for development purposes (they
> are not required at runtime).
> '
>
> How are you declaring them?
> VB would be:
>
> Declare Function CreateFieldDefFile Lib "p2smon.dll"(lpUnk
> As Object, ByVal fileName As String, ByVal
> bOverWriteExistingFile As Long) As Long
>
I am declaring these functions in powerbuilder 9
Function long CreateFieldDefFile ( ref oleobject lpunk, String
FileName, long bOverWriteExistingFile) Library "p2smon.dll"
Function long CreateReportOnRunTimeDs(ref oleobject lpunk,String
reportFile,String fieldDefFile, long bOverWriteFile,long
bLaunchDesigner) Library "p2smon.dll"
JAWAG KL
> KL wrote:
> > Don't do crystal reports, but:
> > 'These functions are purely for development purposes
> > (they are not required at runtime).
> > '
> >
> > How are you declaring them?
> > VB would be:
> >
> > Declare Function CreateFieldDefFile Lib
> > "p2smon.dll"(lpUnk As Object, ByVal fileName As String,
> > ByVal bOverWriteExistingFile As Long) As Long
> >
>
> I am declaring these functions in powerbuilder 9
>
> Function long CreateFieldDefFile ( ref oleobject lpunk,
> String FileName, long bOverWriteExistingFile) Library
> "p2smon.dll"
>
> Function long CreateReportOnRunTimeDs(ref oleobject lpunk
> ,String reportFile,String fieldDefFile, long
> bOverWriteFile,long bLaunchDesigner) Library "p2smon.dll"