Board index » delphi » MS Access Reports

MS Access Reports

I would like to use MS Access as a report writer. Has anyone had any sucess
in doing this? I have some program that automate MS Word and do mail merges
and most of the time they work OK. I am using Delphi5, ADOExpress and MS
Access 2000.

I tried using the Access component in but I can't get it to work. When I
drop in the server component and call

   AccessApplication1.Connect;

the program locks up. I can go to the task manager and see that Access has
started (or is trying to start) but the program is hung.

If I try it without using the components I can get part of it to work.
Access opens OK and loads the db but the report never runs.

   try
      Access := GetActiveOleObject('Access.Application');
   except
      Access := CreateOleObject('Access.Application');
   end;
   Access.Visible := True;
   Access.OpenCurrentDatabase(DBPath + '\SWT3.mdb', False);
   Access.DoCmd.OpenReport('Maint2', $00000000, EmptyParam, EmptyParam);

Any ideas?

 

Re:MS Access Reports


It appears that the Access components you are using were produced from a
version of Access that is not the same as your MS Access installation. The
Delphi 5 default server components were produced from Office 97.

If so, you'll need to manually import and install components for your Office
version. You'll first need to remove the existing Office 97 components on
the IDE before installing the newer ones.

have fun
--
Binh Ly
http://www.techvanguards.com

Quote
"Red Green" <R...@Green.Com> wrote in message

news:8lfg6m$6ps2@bornews.borland.com...
Quote
> I would like to use MS Access as a report writer. Has anyone had any
sucess
> in doing this? I have some program that automate MS Word and do mail
merges
> and most of the time they work OK. I am using Delphi5, ADOExpress and MS
> Access 2000.

> I tried using the Access component in but I can't get it to work. When I
> drop in the server component and call

>    AccessApplication1.Connect;

> the program locks up. I can go to the task manager and see that Access has
> started (or is trying to start) but the program is hung.

> If I try it without using the components I can get part of it to work.
> Access opens OK and loads the db but the report never runs.

>    try
>       Access := GetActiveOleObject('Access.Application');
>    except
>       Access := CreateOleObject('Access.Application');
>    end;
>    Access.Visible := True;
>    Access.OpenCurrentDatabase(DBPath + '\SWT3.mdb', False);
>    Access.DoCmd.OpenReport('Maint2', $00000000, EmptyParam, EmptyParam);

> Any ideas?

Re:MS Access Reports


Ouch. Thank you again Microsoft. Well, I guess the changes in Access 2000
were worth it. We have both versions installed in our office and it is
becoming a problem.

I guess there is any way to make a com program that will work with either
Access 97 or Access 2000? Or if I import the new headers will they work OK
with 97?

We have the MS Office 2000 developers kit so I was planning to use the
Access 2000 run time to support computers without Access installed. Any idea
if this would be a problem installing on computers that already have Access
97 installed?

Quote
"Binh Ly" <b...@castle.net> wrote in message news:397cfdd3_2@dnews...
> It appears that the Access components you are using were produced from a
> version of Access that is not the same as your MS Access installation. The
> Delphi 5 default server components were produced from Office 97.

> If so, you'll need to manually import and install components for your
Office
> version. You'll first need to remove the existing Office 97 components on
> the IDE before installing the newer ones.

> have fun
> --
> Binh Ly
> http://www.techvanguards.com

> "Red Green" <R...@Green.Com> wrote in message
> news:8lfg6m$6ps2@bornews.borland.com...
> > I would like to use MS Access as a report writer. Has anyone had any
> sucess
> > in doing this? I have some program that automate MS Word and do mail
> merges
> > and most of the time they work OK. I am using Delphi5, ADOExpress and MS
> > Access 2000.

> > I tried using the Access component in but I can't get it to work. When I
> > drop in the server component and call

> >    AccessApplication1.Connect;

> > the program locks up. I can go to the task manager and see that Access
has
> > started (or is trying to start) but the program is hung.

> > If I try it without using the components I can get part of it to work.
> > Access opens OK and loads the db but the report never runs.

> >    try
> >       Access := GetActiveOleObject('Access.Application');
> >    except
> >       Access := CreateOleObject('Access.Application');
> >    end;
> >    Access.Visible := True;
> >    Access.OpenCurrentDatabase(DBPath + '\SWT3.mdb', False);
> >    Access.DoCmd.OpenReport('Maint2', $00000000, EmptyParam, EmptyParam);

> > Any ideas?

Re:MS Access Reports


Ouch. We have both Access 97 & 2000 installed in our office and it is
becoming a problem.

If I import the headers will the new ones work with both Access 2000 & 97?
If not is there any way to do this?

We have the Access 2000 developers kit and I was planning to distribute the
Access run time to support reports on computers that do not have access
installed. Any idea if this would cause problems on computers with Access 97
already installed?

Quote
"Binh Ly" <b...@castle.net> wrote in message news:397cfdd3_2@dnews...
> It appears that the Access components you are using were produced from a
> version of Access that is not the same as your MS Access installation. The
> Delphi 5 default server components were produced from Office 97.

> If so, you'll need to manually import and install components for your
Office
> version. You'll first need to remove the existing Office 97 components on
> the IDE before installing the newer ones.

> have fun
> --
> Binh Ly
> http://www.techvanguards.com

> "Red Green" <R...@Green.Com> wrote in message
> news:8lfg6m$6ps2@bornews.borland.com...
> > I would like to use MS Access as a report writer. Has anyone had any
> sucess
> > in doing this? I have some program that automate MS Word and do mail
> merges
> > and most of the time they work OK. I am using Delphi5, ADOExpress and MS
> > Access 2000.

> > I tried using the Access component in but I can't get it to work. When I
> > drop in the server component and call

> >    AccessApplication1.Connect;

> > the program locks up. I can go to the task manager and see that Access
has
> > started (or is trying to start) but the program is hung.

> > If I try it without using the components I can get part of it to work.
> > Access opens OK and loads the db but the report never runs.

> >    try
> >       Access := GetActiveOleObject('Access.Application');
> >    except
> >       Access := CreateOleObject('Access.Application');
> >    end;
> >    Access.Visible := True;
> >    Access.OpenCurrentDatabase(DBPath + '\SWT3.mdb', False);
> >    Access.DoCmd.OpenReport('Maint2', $00000000, EmptyParam, EmptyParam);

> > Any ideas?

Other Threads