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 -> Problems using Oracle Reports call interface from C

Problems using Oracle Reports call interface from C

From: Jeff Somers <jeffs_at_fundtech.com>
Date: Tue, 08 Dec 1998 14:21:46 GMT
Message-ID: <_Bab2.1$056.215645@IConNet>


I'm running Oracle Reports 3.0 on Solaris, and I've written a small test program in C which calls Oracle's rwcrrb() function to execute a report at run time. I'm having a lot of trouble creating the executable. Here's what page 6-7 of the Installation Guide for Developer/2000 2.1 says to use:

make -f ins_reports30d.mk r30runmo RXOCIQA="test.o"

where test.o is my object.

First of all, r30runmo is an invalid target so Oracle's makefile cannot make it.
Second, if I change "r30runmo" to "r30runm", the makefile will create the Oracle Reports runtime executable (r30runm), but my code is ignored and running the program merely runs the usual Oracle Reports runtime program for Motif.

Has anyone created a program like this on Unix? On NT this is straightforward (no Oracle makefile involved, just a header, library and DLL), but my code needs to work on Solaris as well.

Thanks for any help you can give me. Oracle Tech Support has been unable to help so far.

jeff somers
jeffs_at_fundtech.com

Here's my test program:

#include <stdio.h>
#include <string.h>

#include "rwoci.h" /* Oracle's header */

long ret;

int main()
{
#ifdef WIN32

char pszMyPdfFile[] = "D:\\JEFFS\\MT100.PDF"; char pszMyTraceFile[] = "D:\\JEFFS\\MT100TRC.TXT"; char pszMyReportFile[] = "C:\\ORANT\\BIN\\MT100.rdf";
#else

char pszMyPdfFile[] = "/usr/jeffs/messages.pdf"; char pszMyTraceFile[] = "/usr/jeffs/MT100TRC.TXT"; char pszMyReportFile[] = "/usr/jeffs/MT100.rdf";
#endif

char pszCmdLine[500];

/* Create command line for Oracle Reports runtime program. */

strcpy(pszCmdLine, "report=");        /* Report def'n to run */
strcat(pszCmdLine, pszMyReportFile);
strcat(pszCmdLine, " ");
strcat(pszCmdLine, "userid=tmsdevsvc/tmsdevsvc_at_funddev "); /*
userid/pwd_at_service */
strcat(pszCmdLine, "desname=");
strcat(pszCmdLine, pszMyPdfFile);       /* file name to be generated */
strcat(pszCmdLine, " ");
strcat(pszCmdLine, "desformat=PDF destype=FILE ");   /* Generating file of
type PDF */
strcat(pszCmdLine, "batch=yes mode=BITMAP "); /* Don't pop up any windows */
strcat(pszCmdLine, "tracefile=");       /* Trace file */
strcat(pszCmdLine, pszMyTraceFile);
strcat(pszCmdLine, " ");
strcat(pszCmdLine, "traceopts=TRACE_ALL ");     /* Trace options */
strcat(pszCmdLine, "tracemode=TRACE_REPLACE ");    /* Replace Trace File */
strcat(pszCmdLine, "MSGID='JY19981112134021' ");   /* User-defined
parameters for report */

printf("\nOptions are: %s", pszCmdLine); ret=rwcrrb(pszCmdLine); /* Call Oracle Reports runtime API */ printf ("\nValue of return code is %d", ret); return 0;
} Received on Tue Dec 08 1998 - 08:21:46 CST

Original text of this message

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