Board index » delphi » I do not believe that nobody knows how to pass the parameters to the Access reports.

I do not believe that nobody knows how to pass the parameters to the Access reports.

Hi,

I am building an D5 application that has to drive Access 97. I got it 90%
working but still can not find a way to pass the parameters to the reports
other than by popylating some table temporarily. Any ideas?

Alex

 

Re:I do not believe that nobody knows how to pass the parameters to the Access reports.


post the code that is failing please.

Paul

Quote
"Alex Malmyguine" <alex...@nospam.usa.net> wrote in message

news:3b9e534a$1_2@dnews...
Quote
> Hi,

> I am building an D5 application that has to drive Access 97. I got it 90%
> working but still can not find a way to pass the parameters to the reports
> other than by popylating some table temporarily. Any ideas?

> Alex

Re:I do not believe that nobody knows how to pass the parameters to the Access reports.


There is no code to post as I have no idea how to write it. Right now I can
only populate a table with the values, that otherwise I would simply pass as
the report parameters, I mean, the underlying query parameters.

Alex

Quote
"Paul Qualls" <p...@xapware.com> wrote in message news:3b9f82d3_1@dnews...
> post the code that is failing please.

> Paul

> > I am building an D5 application that has to drive Access 97. I got it
90%
> > working but still can not find a way to pass the parameters to the
reports
> > other than by populating some table temporarily. Any ideas?

Re:I do not believe that nobody knows how to pass the parameters to the Access reports.


I was having the same problem, and I had to do the same thing you were: put
the parameters in a table.
But then I found that you can use Access.Run to call Access VB functions
from Delphi.  In Access97.pas Run is overloaded 19 times, so you can send it
anywhere from 1 to 20 parameters, depending on how many the function
expects.  The first parameter is the name of the function you want to call,
and the rest are the parameter values.  Just make sure the parameters are
OleVariants rather then the standard Delphi types,

So this is what my Delphi code looks like:

Access.Run('ReportToRtf', OleReport, OleFile);

Quote
"Alexei Malmyguine" <alex...@nospam.usa.net> wrote in message

news:3ba00a9c_1@dnews...
Quote
> There is no code to post as I have no idea how to write it. Right now I
can
> only populate a table with the values, that otherwise I would simply pass
as
> the report parameters, I mean, the underlying query parameters.

> Alex

> "Paul Qualls" <p...@xapware.com> wrote in message news:3b9f82d3_1@dnews...
> > post the code that is failing please.

> > Paul

> > > I am building an D5 application that has to drive Access 97. I got it
> 90%
> > > working but still can not find a way to pass the parameters to the
> reports
> > > other than by populating some table temporarily. Any ideas?

Re:I do not believe that nobody knows how to pass the parameters to the Access reports.


Great, thanks. I will try this method.

Alex

Quote
"Scott" <scottmckiss...@hotmail.com> wrote in message

news:3bbdee64$1_2@dnews...
Quote
> But then I found that you can use Access.Run to call Access VB functions
> from Delphi.  In Access97.pas Run is overloaded 19 times, so you can send
it
> anywhere from 1 to 20 parameters, depending on how many the function
> expects.  The first parameter is the name of the function you want to
call,
> and the rest are the parameter values.  Just make sure the parameters are
> OleVariants rather then the standard Delphi types,

> So this is what my Delphi code looks like:

> Access.Run('ReportToRtf', OleReport, OleFile);

Other Threads