cancel
Showing results for 
Search instead for 
Did you mean: 

How open a CRWXI Report from a ASP file?

Former Member
0 Kudos

I can't open a report (CRW XI) from an application running on Internet Information Server (asp file) and using a SQL Express 2005 database. Before this database version, I used a MSDE database type and works without problems using a user without password; but now in SQLX this isn't possbile; can somebody help me???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes, I can opened the report from CR; but appears the login screen and I needs assign the user & password.

former_member183750
Active Contributor
0 Kudos

OK. I would then suggest that since this is the behavior you are seeing in the CR designer, then you'd expect the same behavior at runtime. You'll want to resolve the logon issue in the CR designer first, then move to runtime. To resolve the issue in the designer, post the query (omit any details regarding ASP as this will only confuse the issue) to the Crystal Reports Design forum:

and see if they can help. Once it works in the designer, see if it will work at runtime. If not, return to this post and we'll take things from there.

Ludek

Answers (3)

Answers (3)

Former Member
0 Kudos

ok, let me do it.

thank you

0 Kudos

Hi Jose,

As you have discovered database security is there for a reason. Crystal cannot get around it or it would be a major security breach. Which is also why we do not save the password in the RPT file. Example would be someone browsing finds a link to a report that show's everyones personal info and simply runs the report, without prompting for a password, that person now has everyones info and obviously this can cause all sorts of problems.

There are multiple ways to set up security. One way is to create a user account in SQL Server that has access to the database. Open the Reports up in CR Designer and set the User log on info and save the reports, you will need to set a password in code for that generic user but will give them access.

Another option is to use Trusted Authentication. Open the Report up in CR Designer and at the log on screen check on the option to use Trusted. You'll notice the user name an password are grayed out. In SQL Server you now must configure it to use NT Authenication also and import all the users or create all the users who can run these reports.

Bottom line is you cannot get around not using a password, Microsoft did this for a reason, to stop hackers from getting into DB servers that are not protected and accessing personal and sensitive data.

You MUST reconfigure your application to use security. If you have a Database Administrator discuss with them or hire a DBA to work with you on configuring your DB server to work with your application and user base.

Thank you

Don

Former Member
0 Kudos

Version CR XI R1 version 11.0.0.1282

In MSDE database is possible create a user with sysadmin privilegies without password, but now in SQL Express this isn't possible.

Actualy I'm using an ODBC conection between rpt file and asp file (using RDCRPTSERVER11.ASP, ETC). Into the asp file I'm using the next line to connect into database:

Conn.ConnectionString = "Provider=SQLOLEDB.1; Password=mm; User ID=mm;Initial Catalog=MAINTMAN;Data Source=SERVERNAME\INSTANCENAME"

But into rptf ile I can't use a user and password becuase the report don't still the password; that's the reason why I'm using a user without password.

Maybe there is other solution for this, and use other connection type between asp and rpt.

Thanks for you help!!!

former_member183750
Active Contributor
0 Kudos

Jose, thank you for the info. Are you able to run the report from the CR designer to than same datasource?

Ludek

former_member183750
Active Contributor
0 Kudos

Please provide the version of CR; CR XI r1 or CR XI r2. Also, elaborate on:

"...now in SQLX this isn't possible"

Why not? What is the issue? Error? Behavior?

Ludek