VB.NET/Crystal - How do I change a report's connection "integrated security" to FALSE?

  • Thread starter Thread starter Henry
  • Start date Start date
H

Henry

I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that
utilizes Crystal Reports. I want to be able to dynamically set the
report data source at run time.

I'm trying to change the the reports "integrated security" from TRUE to
FALSE via the "Set Location" dialog in the report designer with no
success. It is not intuitive (at least not to me.)

I get the following error:

"Error in file....Invalid table number."

The error is being generated at this line of my code:

'DatabaseName is changing at runtime, specify the table location.
CrTable.Location = "UpsizeUATSQLBackup.dbo." &
CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)

If I change "UpsizeUATSQLBackup.dbo." to the original db location i.e.
"UpsizeUATSQL.dbo" it works fine.

I've seen other posts on the web that state that the "integrated
security" for the report connection has to be FALSE, otherwise the
connection is hard coded into the report.

Article c2011430 on CR support site seems to indicate that you can
change it in Crystal 9, where previously you could not, due to a bug.

My question is how do I change the report's connection "integrated
security" to FALSE?

Tks for any guidance/help you can provide.

....Henry
 
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that
utilizes Crystal Reports. I want to be able to dynamically set the
report data source at run time.

Why don't you pass a dataset instead?
 
Hi Henry,

Sorry; I was out all evening and just saw your post.

I am changing mine in crystal 10.0, however it should also work in cr 9.

Go to set location; then select 'new connection'; connect via ole db; when
it asks for a pwd and login, enter the appropriate sql server login; check
or uncheck for integrated security, etc. Once finished, you should check
properties and it should show the connection as integrated security false.

HTH,

Bernie Yaeger
 
I was able to change "integrated security" to FALSE by pausing mySQL Server & then, in the report designer, I right click on theFieldExplorer/DatabaseFields and select 'Verify Database' fromthe menu. Since it can't find the database, it prompts for theconnection info. Start-up SQL server again & then fill out theconnection info (with integrated security unchecked). Then saveyour report.

:>kris
I am writing a Windows forms VB.Net/MS SQL application via VS2003 that
utilizes Crystal Reports. I want to be able to dynamically setthe
report data source at run time.

I'm trying to change the the reports "integrated security" fromTRUE to
FALSE via the "Set Location" dialog in the report designer withno
success. It is not intuitive (at least not to me.)

I get the following error:

"Error in file....Invalid table number."

The error is being generated at this line of my code:

'DatabaseName is changing at runtime, specify the tablelocation.
CrTable.Location = "UpsizeUATSQLBackup.dbo." &
CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") +1)

If I change "UpsizeUATSQLBackup.dbo." to the original dblocation i.e.
"UpsizeUATSQL.dbo" it works fine.

I've seen other posts on the web that state that the"integrated
security" for the report connection has to be FALSE, otherwisethe
connection is hard coded into the report.

Article c2011430 on CR support site seems to indicate that youcan
change it in Crystal 9, where previously you could not, due toa bug.

My question is how do I change the report's connection"integrated
security" to FALSE?

Tks for any guidance/help you can provide.

....Henry
User submitted from AEWNET (http://www.aewnet.com/)
 
Hi,

ON Crystal 10 (perhaps 9 as well):
1. go to 'set database location'
2. in the top, open the name of the server and properties until you see the
tables
3. on the bottom, click 'history'
4. select the server name in the bottom
5. you will now see a connection info request
6. fill out the request and enter user id and pwd; uncheck 'use integrated
security'
7. click next
8. click finish
9. now select the table to replace the table above - same name
10. click the 'update' button

You're done. I had to do this to over 150 reports some time ago. It's a
bit buggy, so after you save, reopen the report to verify that the change
'took'.

HTH,

Bernie Yaeger


I was able to change "integrated security" to FALSE by pausing my SQL Server
& then, in the report designer, I right click on the
FieldExplorer/DatabaseFields and select 'Verify Database' from the menu.
Since it can't find the database, it prompts for the connection info.
Start-up SQL server again & then fill out the connection info (with
integrated security unchecked). Then save your report.

:>kris
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that
utilizes Crystal Reports. I want to be able to dynamically set the
report data source at run time.

I'm trying to change the the reports "integrated security" from TRUE to
FALSE via the "Set Location" dialog in the report designer with no
success. It is not intuitive (at least not to me.)

I get the following error:

"Error in file....Invalid table number."

The error is being generated at this line of my code:

'DatabaseName is changing at runtime, specify the table location.
CrTable.Location = "UpsizeUATSQLBackup.dbo." &
CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)

If I change "UpsizeUATSQLBackup.dbo." to the original db location i.e.
"UpsizeUATSQL.dbo" it works fine.

I've seen other posts on the web that state that the "integrated
security" for the report connection has to be FALSE, otherwise the
connection is hard coded into the report.

Article c2011430 on CR support site seems to indicate that you can
change it in Crystal 9, where previously you could not, due to a bug.

My question is how do I change the report's connection "integrated
security" to FALSE?

Tks for any guidance/help you can provide.

....Henry
User submitted from AEWNET (http://www.aewnet.com/)
 
Bernie,

At least I succeeded in finding a solution for a progressbar with the fill
of the datatable.

Interested or did you found it yourself already

I used an access database to get it slow, however it is terrible slow.

Cor
 
Did you post how you did it and if so what was the thread name?

If not, will you please? :)
 
Here is an example:

Dim
rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument
rpt =
New CrystalDecisions.CrystalReports.Engine.ReportDocument
rpt.FileName =
"myreport.rpt"
rpt.DataSourceConnections.Item(0).IntegratedSecurity = False
rpt.SetDatabaseLogon("user","password","server","database")
CrystalReportViewer1.ReportSource = rpt
 
Back
Top