Click here to Skip to main content
15,921,113 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Windowless ActiveX controls are not supported Pin
Christian Graus5-Mar-08 21:40
protectorChristian Graus5-Mar-08 21:40 
QuestionHow do I exit a loop early Pin
AAGTHosting5-Mar-08 14:09
AAGTHosting5-Mar-08 14:09 
AnswerRe: How do I exit a loop early Pin
Christian Graus5-Mar-08 14:12
protectorChristian Graus5-Mar-08 14:12 
GeneralRe: How do I exit a loop early Pin
AAGTHosting5-Mar-08 14:26
AAGTHosting5-Mar-08 14:26 
GeneralRe: How do I exit a loop early Pin
Christian Graus5-Mar-08 16:47
protectorChristian Graus5-Mar-08 16:47 
AnswerRe: How do I exit a loop early Pin
Nilesh Hapse5-Mar-08 18:29
Nilesh Hapse5-Mar-08 18:29 
GeneralDisplay table relations in datagridview Pin
regedit5-Mar-08 7:27
regedit5-Mar-08 7:27 
QuestionChallenging Crystal Reports / .NET Windows application question Pin
KreativeKai5-Mar-08 6:19
professionalKreativeKai5-Mar-08 6:19 
I have a VB.NET VS2008 windows form application where I have a crystalviewer form setup to print a few reports out from the menu off of the main data entry form.

The crystal reports are already written and stored in a folder on one of our servers (For this example lets call it \\MyServer\ReportFolder\). The crystal report uses a DSN to know where to find the data (For this example lets call it MyCrystalDSN).

The code on the menu fires off the report as shown below:

Dim frmCV As New frmCrystalViewer
frmCV.CrystalReportViewer1.ReportSource = "\\MyServer\ReportFolder\Reportname.rpt"
frmCV.WindowState = FormWindowState.Maximized
frmCV.ShowDialog()

Ok, everything works great for now, but of course it never fails that when you develop at your desk with all the rights available as a developer it all works and when you deploy the app, everything never works as planned.

When I publish the project for use by the client, I have to setup a DSN so the Crystal Reports will work.

Can I do this on the fly with code? For example, my crystal reports are using the MyCrystalDSN, and I don't want to have to remember to setup a DSN for everyone's computer I deploy the application on. Can I code the DSN information to use in the code prior to firing off the report?

A coworker gave me the following code from an article that I believe was written in 2001 for VB6. Is anyone doing this in .NET? Here is that code:

Public Sub RegisterDatabaseSample()
'Create a DSN called TEST on a server called ThatServer
DBEngine.RegisterDatabase "TEST", "SQL Server", True, _
"Database=pubs" & _
vbCr & "Description=Sample DSN" & _
vbCr & "Server=ThatServer"
End Sub

Any help is appreciated Smile | :)

Lost in the vast sea of .NET

AnswerRe: Challenging Crystal Reports / .NET Windows application question [modified] Pin
KreativeKai5-Mar-08 8:17
professionalKreativeKai5-Mar-08 8:17 
GeneralRe: Challenging Crystal Reports / .NET Windows application question Pin
codemunch5-Mar-08 9:28
codemunch5-Mar-08 9:28 
GeneralRe: Challenging Crystal Reports / .NET Windows application question Pin
KreativeKai6-Mar-08 2:45
professionalKreativeKai6-Mar-08 2:45 
GeneralRe: Challenging Crystal Reports / .NET Windows application question Pin
codemunch6-Mar-08 8:44
codemunch6-Mar-08 8:44 
GeneralReading all data from port 80 Pin
stikiweb5-Mar-08 5:43
stikiweb5-Mar-08 5:43 
QuestionReport.Sections.Add gets an error, why? Pin
soporificeffect5-Mar-08 2:03
soporificeffect5-Mar-08 2:03 
GeneralTransparencykey not working Pin
Ahmad Zaidi5-Mar-08 1:12
Ahmad Zaidi5-Mar-08 1:12 
GeneralRe: Transparencykey not working Pin
Xmen Real 5-Mar-08 2:28
professional Xmen Real 5-Mar-08 2:28 
QuestionHow to copy files in a folder tree into a single folder Pin
Krishnaraj Barvathaya B5-Mar-08 0:51
Krishnaraj Barvathaya B5-Mar-08 0:51 
AnswerDuplicate Post. Ignore It! Pin
Vasudevan Deepak Kumar5-Mar-08 0:57
Vasudevan Deepak Kumar5-Mar-08 0:57 
QuestionSQL Timeout Pin
Zacharia John4-Mar-08 23:51
Zacharia John4-Mar-08 23:51 
GeneralRe: SQL Timeout Pin
Vasudevan Deepak Kumar5-Mar-08 1:05
Vasudevan Deepak Kumar5-Mar-08 1:05 
QuestionWebBrowser Control: Suppressing File Download Dialog Pin
Mbire4-Mar-08 23:18
Mbire4-Mar-08 23:18 
GeneralRe: WebBrowser Control: Suppressing File Download Dialog Pin
Vasudevan Deepak Kumar5-Mar-08 1:04
Vasudevan Deepak Kumar5-Mar-08 1:04 
GeneralRe: WebBrowser Control: Suppressing File Download Dialog Pin
Mbire5-Mar-08 1:19
Mbire5-Mar-08 1:19 
QuestionFileSystem searching and error handling Pin
The One4-Mar-08 23:15
The One4-Mar-08 23:15 
AnswerRe: FileSystem searching and error handling Pin
mschol24-May-08 6:27
mschol24-May-08 6:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.