Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Empty report (no data) how to detect in CR 9, VB6 and Oracle

Re: Empty report (no data) how to detect in CR 9, VB6 and Oracle

From: Wim de Lange <w.delange_at_alcontrol.nl_nospam>
Date: Tue, 8 Apr 2003 13:24:52 +0200
Message-ID: <MPG.18fccfb2a0abde629896fb@news.euronet.nl>


In article <3E8DB31D.A116B5B3_at_exxesolutions.com>, damorgan_at_exxesolutions.com says...
> Wim de Lange wrote:
>
> > At this moment I'm trying to create a Crystal Report 9.0 on a Oracle
> > 8.1.7 stored procedure. It works good, no problem there.
> >
> > There is this main program (not the crviewer) in Visual Basic 6 that
> > fills in the parameters in the report and then runs the report (using
> > the viewer and sending it to a pdf file).
> >
> > This program must run without user intervention. It is for generating
> > reports to several destinations.
> >
> > What I found impossible to do is to detect if there is no data in the
> > report. Is there a way to do this?
> >
> > A solution I was considering is using another connection to the oracle
> > database and run the query again (twice) by using some information from
> > the report.
> > crReport.SQLQuerySting has the following value:
> > BEGIN "LIMS"."CR_SAMCOLPAGE"(:P_CURSOR, 41, 'NL'); END ;
> > Can someone design a pl/sql and vb program so that I can rerun this
> > query and that it gives back the number of records?

> Go to http://www.crystaldecisions.com ... click on support and search the
> knowledge base.

Tried that, but there is no information about this subject. But I found it myself (with a little help) in the ADO documentation and now part of my code looks like this:

Dim adoCommand As ADODB.Command
Dim adoReturn As ADODB.Recordset
Set adoCommand = New ADODB.Command
With adoCommand
Set .ActiveConnection = adoConnection
.CommandText = "{call LIMS.CR_SAMCOLPAGE( {resultset 0, p_cursor}), 41,'NL')}"
.CommandText = strCommand
.CommandType = adCmdText
'.Parameters.Append .CreateParameter(, adVariant, adParamInputOutput) Set adoReturn = .Execute
End With

-- 

Groetjes,
   Wim de Lange
Received on Tue Apr 08 2003 - 06:24:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US