By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Help needed in access to Crystal reports..

P: n/a
Hai

I have a designed Crystal report .rpt file which has 4 access tables
.. After designing the report i put a parameter field which filteres
the desired records quite naturally. Every thing works fine in the
crystal report design time as well as in the preview asking parameters
..

But if i call it thru my VB form it works nice after removing the
parameteres.
But if pass my parameter value , it gives the error like

** can not open sql server **

My code is

rep.reportfilename="c;\r1.rpt"
rep.parameterfields(0)="p1;" & val(t1.text) & ";true"
crep.action =1

the above code is the same one which i used to get rows from SQL
SERVER by passing the parameter.

MY query is

Does the parameter defining way differs from sql server to Access ?
Or please tell me how to use parameteres in Crystal reports for
Access.

Or what is the reason it works nice in disign time & preview and not
working in Vb.

With thanks
Raghu
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
How are you binding? What version and edition of CR are you using? Are you
using OLEDB, ODBC, or the Jet driver to connect to the mdb?

The selection for database access methods are made in the first steps of the
wizard or when you add/remove a Database. If you want to experiment by
changing driver/access methods - do so by setting the location to a
different database and tables, then choose to replace the ones you have with
the ones you select in the new location. Crystal is a bit trixy when doing
this - but it can be done without scrapping your report and starting over.
I would recommend picking "Database Files" then picking the mdb from there,
rather than oledb, ado, odbc, et...

If you are using OLEDB - you will probably have to write some code that
tells your report at runtime where the database is and how to access it. If
other methods don't work - post back and I will see if I can dig up some
code for you.

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Raghuraman" <ra************@rediffmail.com> wrote in message
news:66**************************@posting.google.c om...
Hai

I have a designed Crystal report .rpt file which has 4 access tables
. After designing the report i put a parameter field which filteres
the desired records quite naturally. Every thing works fine in the
crystal report design time as well as in the preview asking parameters
.

But if i call it thru my VB form it works nice after removing the
parameteres.
But if pass my parameter value , it gives the error like

** can not open sql server **

My code is

rep.reportfilename="c;\r1.rpt"
rep.parameterfields(0)="p1;" & val(t1.text) & ";true"
crep.action =1

the above code is the same one which i used to get rows from SQL
SERVER by passing the parameter.

MY query is

Does the parameter defining way differs from sql server to Access ?
Or please tell me how to use parameteres in Crystal reports for
Access.

Or what is the reason it works nice in disign time & preview and not
working in Vb.

With thanks
Raghu

Nov 12 '05 #2

P: n/a
By the way - there is a free book available from a very generous person who
was having trouble getting it published.

Check it out here... it's had 16,000 registrations now and some noise I
heard is saying it will be for sale on Amazon in Feb.

http://www.crystalreportsbook.com/

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Jerry Boone" <je***@antech.biz.killspam> wrote in message
news:rQ********************@newssvr11.news.prodigy .com...
How are you binding? What version and edition of CR are you using? Are you using OLEDB, ODBC, or the Jet driver to connect to the mdb?

The selection for database access methods are made in the first steps of the wizard or when you add/remove a Database. If you want to experiment by
changing driver/access methods - do so by setting the location to a
different database and tables, then choose to replace the ones you have with the ones you select in the new location. Crystal is a bit trixy when doing this - but it can be done without scrapping your report and starting over.
I would recommend picking "Database Files" then picking the mdb from there, rather than oledb, ado, odbc, et...

If you are using OLEDB - you will probably have to write some code that
tells your report at runtime where the database is and how to access it. If other methods don't work - post back and I will see if I can dig up some
code for you.

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Raghuraman" <ra************@rediffmail.com> wrote in message
news:66**************************@posting.google.c om...
Hai

I have a designed Crystal report .rpt file which has 4 access tables
. After designing the report i put a parameter field which filteres
the desired records quite naturally. Every thing works fine in the
crystal report design time as well as in the preview asking parameters
.

But if i call it thru my VB form it works nice after removing the
parameteres.
But if pass my parameter value , it gives the error like

** can not open sql server **

My code is

rep.reportfilename="c;\r1.rpt"
rep.parameterfields(0)="p1;" & val(t1.text) & ";true"
crep.action =1

the above code is the same one which i used to get rows from SQL
SERVER by passing the parameter.

MY query is

Does the parameter defining way differs from sql server to Access ?
Or please tell me how to use parameteres in Crystal reports for
Access.

Or what is the reason it works nice in disign time & preview and not
working in Vb.

With thanks
Raghu


Nov 12 '05 #3

P: n/a
Hai Jerry,

Thanks for your Step. Now i am in the Crystalbook . I shall get back to
u if i have some probs.
With Thanks
Raghu

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.