Printing an Access Database 
Author Message
 Printing an Access Database

Hello all...

I'm writing a small inventory program front end which accesses an Access
Database. My problem is, I have NO idea how to just do a simple database
dump to printer. I don't need anything fancier then.

FieldName1         FieldName2      FieldName3
xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx
xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx

Can someone point me in the right direction? I'm lost.

Using VB 6.0.

Thanks
-Spo-



Mon, 28 Jun 2004 04:11:18 GMT
 Printing an Access Database



Quote:
> Hello all...

> I'm writing a small inventory program front end which accesses an Access
> Database. My problem is, I have NO idea how to just do a simple database
> dump to printer. I don't need anything fancier then.

> FieldName1         FieldName2      FieldName3
> xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx
> xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx

> Can someone point me in the right direction? I'm lost.

> Using VB 6.0.

> Thanks
> -Spo-

The code below is a bit rough but should give you some help. I am using a
fixed length string to vertically align your fields.

Dim fld as Field
Dim txtFld as string * 30
dim temp as string

for each fld in rs.fields 'get the field names
    txtFld = fld.name
    temp = temp & txtFld
next
temp = temp & vbCrlf   'end with a carriage return and line feed

while not eof(rs)
    for each fld in rs.fields 'get field values
        txtFld = fld.Value
        temp = temp & txtFld
    next
    temp = temp & vbCrlf 'end with a carriage return and line feed
    rs.movenext
wend

Printer.Print temp
Printer.EndDoc



Mon, 28 Jun 2004 05:25:40 GMT
 Printing an Access Database
Can you use the DataReport o the Crystal Report??

I'm actually using the DataReport and it's so quick to develop that kind of
reports.


Quote:


> > Hello all...

> > I'm writing a small inventory program front end which accesses an Access
> > Database. My problem is, I have NO idea how to just do a simple database
> > dump to printer. I don't need anything fancier then.

> > FieldName1         FieldName2      FieldName3
> > xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx
> > xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx

> > Can someone point me in the right direction? I'm lost.

> > Using VB 6.0.

> > Thanks
> > -Spo-

> The code below is a bit rough but should give you some help. I am using a
> fixed length string to vertically align your fields.

> Dim fld as Field
> Dim txtFld as string * 30
> dim temp as string

> for each fld in rs.fields 'get the field names
>     txtFld = fld.name
>     temp = temp & txtFld
> next
> temp = temp & vbCrlf   'end with a carriage return and line feed

> while not eof(rs)
>     for each fld in rs.fields 'get field values
>         txtFld = fld.Value
>         temp = temp & txtFld
>     next
>     temp = temp & vbCrlf 'end with a carriage return and line feed
>     rs.movenext
> wend

> Printer.Print temp
> Printer.EndDoc



Mon, 05 Jul 2004 07:55:01 GMT
 Printing an Access Database
Here is my problem:

I have the crystal report 4.6 set up. And I can print the report through my
VB application; however, it will only print the report.rpt file with data in
it. I need to be able to update my data through my application, click on
print and then have Crystal reports update the report file and print it.

Any suggestions? I am sure it can be done, but I just don't know how. :(

In other words, I can run the report through the main Crystal Reports design
program, have that data saved with the report and then print it through my
VB app. What I need is to have my VB application (which is a DB front end)
be able to have Crystal Reports generate a report on the fly using the
report layout I designed through the "Crystal Report add-in".

Does this make sense? Any help would be most appreciated, I've been banging
my head against my desk for two days now.

-Spomo-


Quote:
> Can you use the DataReport o the Crystal Report??

> I'm actually using the DataReport and it's so quick to develop that kind
of
> reports.





> > > Hello all...

> > > I'm writing a small inventory program front end which accesses an
Access
> > > Database. My problem is, I have NO idea how to just do a simple
database
> > > dump to printer. I don't need anything fancier then.

> > > FieldName1         FieldName2      FieldName3
> > > xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx
> > > xxxxxxxxx            xxxxxxxxxx        xxxxxxxxxx

> > > Can someone point me in the right direction? I'm lost.

> > > Using VB 6.0.

> > > Thanks
> > > -Spo-

> > The code below is a bit rough but should give you some help. I am using
a
> > fixed length string to vertically align your fields.

> > Dim fld as Field
> > Dim txtFld as string * 30
> > dim temp as string

> > for each fld in rs.fields 'get the field names
> >     txtFld = fld.name
> >     temp = temp & txtFld
> > next
> > temp = temp & vbCrlf   'end with a carriage return and line feed

> > while not eof(rs)
> >     for each fld in rs.fields 'get field values
> >         txtFld = fld.Value
> >         temp = temp & txtFld
> >     next
> >     temp = temp & vbCrlf 'end with a carriage return and line feed
> >     rs.movenext
> > wend

> > Printer.Print temp
> > Printer.EndDoc



Tue, 06 Jul 2004 06:17:13 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Print an Access database schema

2. Printing Access reports or using Access to print/preview reports

3. Printing of MS Access database schema

4. Printing Access Database with VB

5. Printing OLE picture from a ACCESS 7 database

6. Print Access database report from C++ app?

7. Access 1.1 database structure printing utility

8. Print Access database report from C++ app?

9. Printing report with Access as OLE server from VB in password-protected database

10. Printing MS Access Report from password protected database

11. Access database (print reports)


 
Powered by phpBB® Forum Software