For Programmers: Free Programming Magazines  


Home > Archive > Cobol > August 2005 > Crystal Reports and COBOL









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Crystal Reports and COBOL
Ken Mullins

2005-08-17, 4:59 pm

Anyone out here use Crystal Reports? I have an old 16bit native windows app
that I developed back in 1995 using MF COBOL...It uses V4 of Crystal Reports
for printing...

I'm in the process of converting this app to native 32bit Windows platforms.
I'm also adding some data elements including graphics...I've updated my V4
Crystal Reports to V9, but do not see that it has the ability to print a
photo based on a file name field...

Anyone know of a way to do that?

Each picture to be printed would be a disk file name of the photo (ex:
C:\BCWData\Photos\Sample.jpg)...

The data being passed to CR is currently a standard CSV file and I am using
their text ODBC driver...Well I was previously, but haven't started looking
to see if their is a better way in the newer CR yet...

kenmullins


Frederico Fonseca

2005-08-17, 4:59 pm

On Wed, 17 Aug 2005 10:27:52 -0400, "Ken Mullins"
<kennethxxpxxxmullins@bellsouth.net> wrote:

>Anyone out here use Crystal Reports? I have an old 16bit native windows app
>that I developed back in 1995 using MF COBOL...It uses V4 of Crystal Reports
>for printing...
>
>I'm in the process of converting this app to native 32bit Windows platforms.
>I'm also adding some data elements including graphics...I've updated my V4
>Crystal Reports to V9, but do not see that it has the ability to print a
>photo based on a file name field...
>
>Anyone know of a way to do that?
>
>Each picture to be printed would be a disk file name of the photo (ex:
>C:\BCWData\Photos\Sample.jpg)...

Look at the examples provided. One of them does exactly what you need
(or almost). more specifically "Employee Profile.rpt"



>
>The data being passed to CR is currently a standard CSV file and I am using
>their text ODBC driver...Well I was previously, but haven't started looking
>to see if their is a better way in the newer CR yet...

There are better ways... if you don't use standard COBOL files.




Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
Ken Mullins

2005-08-17, 4:59 pm

In that example, it is a database field defined as a blob...I can't do that
using CSV files? Only something like SQL server, etc can do that...Correct?

I need the ability to just use the picture disk file name and have that
print...

kenmullins


"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message
news:00r6g11ut3pav0r0hgrkk1985eajuv61f4@
4ax.com...
> On Wed, 17 Aug 2005 10:27:52 -0400, "Ken Mullins"
> <kennethxxpxxxmullins@bellsouth.net> wrote:
>
> Look at the examples provided. One of them does exactly what you need
> (or almost). more specifically "Employee Profile.rpt"
>
>
>
> There are better ways... if you don't use standard COBOL files.
>
>
>
>
> Frederico Fonseca
> ema il: frederico_fonseca at syssoft-int.com



Frederico Fonseca

2005-08-17, 9:59 pm

Top posting corrected

On Wed, 17 Aug 2005 13:54:13 -0400, "Ken Mullins"
<kennethxxpxxxmullins@bellsouth.net> wrote:

>"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message
> news:00r6g11ut3pav0r0hgrkk1985eajuv61f4@
4ax.com...
[color=darkred]
>In that example, it is a database field defined as a blob...I can't do that
>using CSV files? Only something like SQL server, etc can do that...Correct?
>
>I need the ability to just use the picture disk file name and have that
>print...

you can also do that but it is harder.

And you should really consider moving to another file format as you
will have other benefits


>
>kenmullins
>
>



Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
Ken Mullins

2005-08-17, 9:59 pm

The CSV file format is only for the report...The application's database is
MF ISAM...It can't support blobs, nor ODBC (without purchasing a separate
ODBC driver)...

Any hint on how to tell the crystal report that the database field is a
filename and then make it print the actual file image?

ken

"Frederico Fonseca" wrote
> you can also do that but it is harder.



Frederico Fonseca

2005-08-17, 9:59 pm

On Wed, 17 Aug 2005 18:24:08 -0400, "Ken Mullins"
<kennethxxpxxxmullins@bellsouth.net> wrote:

>The CSV file format is only for the report...The application's database is
>MF ISAM...It can't support blobs, nor ODBC (without purchasing a separate
>ODBC driver)...
>
>Any hint on how to tell the crystal report that the database field is a
>filename and then make it print the actual file image?
>

You can but it is a lot harder to do.

As you are using it just for a report then why not also just use a
ODBC driver (free) to write that info into a Access file or other
format that Crystal reports understands easily and that supports
BLOBS?

You can even place all your images on a MSDE database, and using a
linked table keep your .CSV file. (more work also).


Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
Ken Mullins

2005-08-17, 9:59 pm


"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message > As
you are using it just for a report then why not also just use a
> ODBC driver (free) to write that info into a Access file or other
> format that Crystal reports understands easily and that supports
> BLOBS?


If Access supports BLOBS I could just change everything over to an Access
DB...I'll have another look at access...did not see BLOB as a valid column
type though...

Thanks


Frederico Fonseca

2005-08-18, 3:59 am

On Wed, 17 Aug 2005 20:58:27 -0400, "Ken Mullins"
<kennethxxpxxxmullins@bellsouth.net> wrote:

>
>"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message > As
>you are using it just for a report then why not also just use a
>
>If Access supports BLOBS I could just change everything over to an Access
>DB...I'll have another look at access...did not see BLOB as a valid column
>type though...


At least with 2k/2003 it is supported through the OLE object type
field.

But this was just an idea. I personally would go to the MSDE engine or
to Btrieve files


Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
Michael Mattias

2005-08-18, 8:59 am

"Ken Mullins" <kennethxxpxxxmullins@bellsouth.net> wrote in message
news:P0RMe.26579$rp.12567@bignews1.bellsouth.net...
>
> If Access supports BLOBS I could just change everything over to an Access
> DB...I'll have another look at access...did not see BLOB as a valid column
> type though...


Since at least Jet (Access) 4.0 the data types supported are as per this
report I created..

LONGBINARY appears to fit the bill..

(This is via ODBC interface. I do not know the COM interface at all, but I'd
assume it supports the same)

MCM




06-04-2001 ODBC DRIVER/DBMS REPORT
15:19:18

Connection String Attributes:
DSN=RA206
DBQ=C:\Software_Development\Testdata\rem
itaid\ra206.mdb
DriverId=25
FIL=MS Access
MaxBufferSize=2048
PageTimeout=5
UID=admin


Data Source Name:RA206
Database Name :C:\Software_Development\Testdata\remita
id\ra206
DBMS Name :ACCESS
DBMS Version :04.00.0000
Driver Name :ODBCJT32.DLL
Driver ODBC Ver :03.51

Supported Capabilities
Transactions (DML) : Y
CREATE TABLE : Y
DROP TABLE : Y
ALTER TABLE : N
CREATE INDEX : Y
DROP INDEX : Y
Nullable Columns : N
Max Concurrent Stmt: 0 (Unable to determine)

Datatypes Supported
SQL Type DBMS Literal Column Size
-------- ------------ -----------
-11 GUID 36
-7 BIT 1
-6 BYTE 3
-4 LONGBINARY 1073741823
-3 VARBINARY 510
-2 BINARY 510
-1 LONGCHAR 1073741823
1 CHAR 255
2 CURRENCY 19
4 INTEGER 10
4 COUNTER 10
5 SMALLINT 5
7 REAL 7
8 DOUBLE 15
9 DATETIME 19
12 VARCHAR 255

*** END OF REPORT ***



Ken Mullins

2005-08-18, 5:55 pm

Thanks Michael and Frederico...Much appreciated...

The product I'm converting is a shareware type thing, so I'm trying to keep
it as simple as possible...

You guys have given me good pointers and I will look into your
suggestions...

thanks

ken



"Michael Mattias" <michael.mattias@gte.net> wrote in message
news:Gn%Me.4284$Hn3.3053@newssvr23.news.prodigy.net...
> "Ken Mullins" <kennethxxpxxxmullins@bellsouth.net> wrote in message
> news:P0RMe.26579$rp.12567@bignews1.bellsouth.net...
>
> Since at least Jet (Access) 4.0 the data types supported are as per this
> report I created..
>
> LONGBINARY appears to fit the bill..
>
> (This is via ODBC interface. I do not know the COM interface at all, but
> I'd
> assume it supports the same)
>
> MCM
>
>
>
>
> 06-04-2001 ODBC DRIVER/DBMS REPORT
> 15:19:18
>
> Connection String Attributes:
> DSN=RA206
> DBQ=C:\Software_Development\Testdata\rem
itaid\ra206.mdb
> DriverId=25
> FIL=MS Access
> MaxBufferSize=2048
> PageTimeout=5
> UID=admin
>
>
> Data Source Name:RA206
> Database Name :C:\Software_Development\Testdata\remita
id\ra206
> DBMS Name :ACCESS
> DBMS Version :04.00.0000
> Driver Name :ODBCJT32.DLL
> Driver ODBC Ver :03.51
>
> Supported Capabilities
> Transactions (DML) : Y
> CREATE TABLE : Y
> DROP TABLE : Y
> ALTER TABLE : N
> CREATE INDEX : Y
> DROP INDEX : Y
> Nullable Columns : N
> Max Concurrent Stmt: 0 (Unable to determine)
>
> Datatypes Supported
> SQL Type DBMS Literal Column Size
> -------- ------------ -----------
> -11 GUID 36
> -7 BIT 1
> -6 BYTE 3
> -4 LONGBINARY 1073741823
> -3 VARBINARY 510
> -2 BINARY 510
> -1 LONGCHAR 1073741823
> 1 CHAR 255
> 2 CURRENCY 19
> 4 INTEGER 10
> 4 COUNTER 10
> 5 SMALLINT 5
> 7 REAL 7
> 8 DOUBLE 15
> 9 DATETIME 19
> 12 VARCHAR 255
>
> *** END OF REPORT ***
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com