Click here to Skip to main content
15,918,742 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Dave Kreskowiak14-Dec-07 3:56
mveDave Kreskowiak14-Dec-07 3:56 
GeneralRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Jats_4ru14-Dec-07 4:09
Jats_4ru14-Dec-07 4:09 
GeneralRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Dave Kreskowiak14-Dec-07 5:28
mveDave Kreskowiak14-Dec-07 5:28 
AnswerRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Paul Conrad24-Dec-07 11:38
professionalPaul Conrad24-Dec-07 11:38 
Questionhow to calculate the date? Pin
sathyan_829413-Dec-07 23:06
sathyan_829413-Dec-07 23:06 
AnswerRe: how to calculate the date? Pin
Christian Graus13-Dec-07 23:35
protectorChristian Graus13-Dec-07 23:35 
GeneralCrystal Report(Vb.net) Pin
~V~13-Dec-07 21:39
~V~13-Dec-07 21:39 
GeneralRe: Crystal Report(Vb.net) Pin
Tom Deketelaere14-Dec-07 1:24
professionalTom Deketelaere14-Dec-07 1:24 
First: is you'r dataset filled??
second: in design vieuw of the report (at the bottom of the screen 'main report preview' is there data??
and third you could try the code below, this code will reconnect you'r report with you'r database.
And if you created the report with the tables in field explorer and such you don't even need to set the reportsource when using this code

<br />
Dim rpt As New crystalreport<br />
rpt = reconnectreport(rpt)<br />
<br />
<br />
Private Function reconnectreport(ByVal report As ReportDocument) As ReportDocument<br />
        Dim connection As IConnectionInfo<br />
        Dim oldServerName As String = report.DataSourceConnections(0).ServerName<br />
        Dim newServerName As String = sservername<br />
        Dim oldDatabaseName As String = report.DataSourceConnections(0).DatabaseName<br />
        Dim newDatabaseName As String = sdbname<br />
        Dim userID As String = susername<br />
        Dim password As String = spass<br />
        report = report<br />
        ' Change the server name and database in main reports<br />
        For Each connection In report.DataSourceConnections<br />
            If (String.Compare(connection.ServerName, oldServerName, True) = 0 _<br />
                And String.Compare(connection.DatabaseName, oldDatabaseName, True) = 0) Then<br />
                ' SetConnection can also be used to set new logon and new database table<br />
                report.DataSourceConnections(oldServerName, oldDatabaseName).SetConnection( _<br />
                newServerName, newDatabaseName, userID, password)<br />
            End If<br />
        Next<br />
        ' Change the server name and database in subreports<br />
        Dim subreport As ReportDocument<br />
        For Each subreport In report.Subreports<br />
            For Each connection In subreport.DataSourceConnections<br />
                If (String.Compare(connection.ServerName, oldServerName, True) = 0 _<br />
                    And String.Compare(connection.DatabaseName, oldDatabaseName, True) = 0) Then<br />
                    ' SetConnection can also be used to set new logon and new database table<br />
                    subreport.DataSourceConnections(oldServerName, oldDatabaseName).SetConnection( _<br />
                    newServerName, newDatabaseName, userID, password)<br />
                End If<br />
            Next<br />
        Next<br />
        Return report<br />
    End Function<br />


hope it was helpfull
If my help was helpfull let me know, if not let me know why.

The only way we learn is by making mistakes.

GeneralRe: Crystal Report(Vb.net) Pin
~V~14-Dec-07 19:19
~V~14-Dec-07 19:19 
GeneralRe: Crystal Report(Vb.net) Pin
Tom Deketelaere17-Dec-07 1:15
professionalTom Deketelaere17-Dec-07 1:15 
GeneralRe: Crystal Report(Vb.net) Pin
~V~16-Dec-07 18:13
~V~16-Dec-07 18:13 
GeneralRe: Crystal Report(Vb.net) [modified] Pin
~V~19-Dec-07 0:07
~V~19-Dec-07 0:07 
QuestionHow to Sort DataGridView Combobox Column? Pin
rashadaliarshad13-Dec-07 21:18
rashadaliarshad13-Dec-07 21:18 
Generali am using rich text box in vb.net Pin
Deepthy.P.M13-Dec-07 20:43
Deepthy.P.M13-Dec-07 20:43 
GeneralRe: i am using rich text box in vb.net Pin
Christian Graus13-Dec-07 21:54
protectorChristian Graus13-Dec-07 21:54 
GeneralReading .pdf file using visual basic code Pin
rkuravi13-Dec-07 19:35
rkuravi13-Dec-07 19:35 
GeneralRe: Reading .pdf file using visual basic code Pin
Christian Graus13-Dec-07 21:55
protectorChristian Graus13-Dec-07 21:55 
Generalhelp me to generate barcode with vb.net Pin
sitt13-Dec-07 19:18
sitt13-Dec-07 19:18 
GeneralRe: help me to generate barcode with vb.net Pin
Christian Graus13-Dec-07 21:58
protectorChristian Graus13-Dec-07 21:58 
GeneralRe: help me to generate barcode with vb.net Pin
sitt14-Dec-07 0:27
sitt14-Dec-07 0:27 
GeneralRe: help me to generate barcode with vb.net Pin
Dave Kreskowiak14-Dec-07 1:01
mveDave Kreskowiak14-Dec-07 1:01 
GeneralRe: help me to generate barcode with vb.net [modified] Pin
sitt16-Dec-07 15:26
sitt16-Dec-07 15:26 
GeneralRe: help me to generate barcode with vb.net Pin
Dave Kreskowiak16-Dec-07 18:01
mveDave Kreskowiak16-Dec-07 18:01 
GeneralRe: help me to generate barcode with vb.net Pin
sitt16-Dec-07 18:10
sitt16-Dec-07 18:10 
GeneralRe: help me to generate barcode with vb.net Pin
darkelv14-Dec-07 1:39
darkelv14-Dec-07 1:39 

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.