SQL Server Not Found 
Author Message
 SQL Server Not Found

I have a problem that is making me pull my hair out!!  I have a Crystal
Report that I'm passing parameters to via VB.  All the other reports
work fine in my app. The report runs fine when I preview it in Crystal
and add the value I'm trying to pass from VB.
The offending section is bolded although I think specifically it's the
last bolded line.  I included CASE 5 because it works. So does the
elseif in CASE 4. The error is 20599- Can't find SQL server. Any ideas?

Jason

Case 4 ' reserve table view
            If Len(gsSelectedRegion) > 0 Then
                If mbSelectCheck = True Then  'select all bands from
selected region
                    msReportName = "View_reserveAll.rpt"
                    rptViewReport.Formulas(1) = "txtRegionEName=""" &
msRegionEName & """"
                    rptViewReport.Formulas(2) = "txtRegionFName=""" &
msRegionFName & """"
                    rptViewReport.Formulas(3) =
"txtDistrictName=""N/A"""
                    rptViewReport.SelectionFormula =
"{REGION.REGION_RPN} = " & gsSelectedRegion

                ElseIf Len(gsSelectedBand) > 0 Then
                    rptViewReport.Formulas(1) = "txtRegionEName=""" &
msRegionEName & """"
                    rptViewReport.Formulas(2) = "txtRegionFName=""" &
msRegionFName & """"
                    rptViewReport.Formulas(3) = "txtDistrictName=""" &
msDistrictName & """"
                    rptViewReport.Formulas(4) = "txtBandName=""" &
msBandName & """"
                    rptViewReport.SelectionFormula =
"{COLLECTION_BAND_RESERVE.BAND_RPN} = " & gsSelectedBand
                Else
                    MsgBox VBLM_RTString(190), vbOKOnly
                    GoTo Exit_cmdPrint_Click
                End If
            Else
                MsgBox VBLM_RTString(188), vbOKOnly
                GoTo Exit_cmdPrint_Click
            End If

        Case 5 ' tribal table view
            If Len(gsSelectedRegion) > 0 Then
                If mbSelectCheck = True Then   'Select all bands from
selected region
                    rptViewReport.Formulas(1) = "txtRegionEName=""" &
msRegionEName & """"
                    rptViewReport.Formulas(2) = "txtRegionFName=""" &
msRegionFName & """"
                    rptViewReport.Formulas(3) =
"txtDistrictName=""N/A"""
                    lsSQL = "{V_RDTCB.REGION_RPN} = " & gsSelectedRegion

                ElseIf Len(gsSelectedTribal) > 0 Then
                    lsSQL = "{V_RDTCB.REGION_RPN} = " & gsSelectedRegion

                    'May or may not have a district associated to a band

                    If Len(gsSelectedDistrict) > 0 Then
                        lsSQL = lsSQL & " AND {V_RDTCB.DISTRICT_RPN} = "
& gsSelectedDistrict
                    End If
                    rptViewReport.SelectionFormula = lsSQL
                Else
                    MsgBox VBLM_RTString(194), vbOKOnly 'Please select a
tribal council
                    GoTo Exit_cmdPrint_Click
                End If
            Else
                MsgBox VBLM_RTString(188), vbOKOnly
                GoTo Exit_cmdPrint_Click 'Please select a region
            End If



Mon, 30 Sep 2002 03:00:00 GMT  
 SQL Server Not Found

Hi Jason,

A couple of questions before I get into your code.  What database are
you using and how are you connecting to it?
What method or property are you using to log the report onto the
database with?
What version of Crystal are you using?

Looking at the code snipets you sent, there is nothing here indicating
anything you are doing with the database so I doubt this is the
problem.  I do have a question about Case5 and where you are setting the
SelectionFormula though.  I noticed you have a variable called IsSQL and
you are passing that to update the Record Selection Formula.  What is in
that String.  If you pasted that string into the report in the Report
Designer and ran it, does it work?  Sometimes the problem may be in the
formula and running that exact same formula inside the Report Designer
will help with any syntax problems.

If you are logging onto a different database or server than the one you
created the reports with, you will need to use the DataFiles property
for each of the tables in the report to point the report to the new
table locations.

Please reply with the above answers and I'll try to help you more.

--
Sincerely,
Brian Dong

To reply, remove nospam from the address.

Quote:

> I have a problem that is making me pull my hair out!!  I have a
> Crystal Report that I'm passing parameters to via VB.  All the other
> reports work fine in my app. The report runs fine when I preview it in
> Crystal and add the value I'm trying to pass from VB.
> The offending section is bolded although I think specifically it's the
> last bolded line.  I included CASE 5 because it works. So does the
> elseif in CASE 4. The error is 20599- Can't find SQL server. Any
> ideas?

> Jason

> Case 4 ' reserve table view
>            If Len(gsSelectedRegion) > 0 Then
>                 If mbSelectCheck = True Then  'select all bands from
> selected region
>                     msReportName = "View_reserveAll.rpt"
>                     rptViewReport.Formulas(1) = "txtRegionEName=""" &
> msRegionEName & """"
>                     rptViewReport.Formulas(2) = "txtRegionFName=""" &
> msRegionFName & """"
>                     rptViewReport.Formulas(3) =
> "txtDistrictName=""N/A"""
>                     rptViewReport.SelectionFormula =
> "{REGION.REGION_RPN} = " & gsSelectedRegion

>                 ElseIf Len(gsSelectedBand) > 0 Then
>                     rptViewReport.Formulas(1) = "txtRegionEName=""" &
> msRegionEName & """"
>                     rptViewReport.Formulas(2) = "txtRegionFName=""" &
> msRegionFName & """"
>                     rptViewReport.Formulas(3) = "txtDistrictName=""" &
> msDistrictName & """"
>                     rptViewReport.Formulas(4) = "txtBandName=""" &
> msBandName & """"
>                     rptViewReport.SelectionFormula =
> "{COLLECTION_BAND_RESERVE.BAND_RPN} = " & gsSelectedBand
>                 Else
>                     MsgBox VBLM_RTString(190), vbOKOnly
>                     GoTo Exit_cmdPrint_Click
>                 End If
>             Else
>                 MsgBox VBLM_RTString(188), vbOKOnly
>                 GoTo Exit_cmdPrint_Click
>             End If

>         Case 5 ' tribal table view
>             If Len(gsSelectedRegion) > 0 Then
>                 If mbSelectCheck = True Then   'Select all bands from
> selected region
>                     rptViewReport.Formulas(1) = "txtRegionEName=""" &
> msRegionEName & """"
>                     rptViewReport.Formulas(2) = "txtRegionFName=""" &
> msRegionFName & """"
>                     rptViewReport.Formulas(3) =
> "txtDistrictName=""N/A"""
>                     lsSQL = "{V_RDTCB.REGION_RPN} = " &
> gsSelectedRegion
>                 ElseIf Len(gsSelectedTribal) > 0 Then
>                     lsSQL = "{V_RDTCB.REGION_RPN} = " &
> gsSelectedRegion
>                     'May or may not have a district associated to a
> band
>                     If Len(gsSelectedDistrict) > 0 Then
>                         lsSQL = lsSQL & " AND {V_RDTCB.DISTRICT_RPN} =
> " & gsSelectedDistrict
>                     End If
>                     rptViewReport.SelectionFormula = lsSQL
>                 Else
>                     MsgBox VBLM_RTString(194), vbOKOnly 'Please select
> a tribal council
>                     GoTo Exit_cmdPrint_Click
>                 End If
>             Else
>                 MsgBox VBLM_RTString(188), vbOKOnly
>                 GoTo Exit_cmdPrint_Click 'Please select a region
>             End If



Mon, 30 Sep 2002 03:00:00 GMT  
 SQL Server Not Found

Hi there,

It's an Oracle 7.2 database and it's connected using a data control.
Case 5 does work though and so does the elseif section in case 4.  One
thing that may or may not be significant is that the report
View_reserveall.rpt is new. All the other reports were created when I
took over the project.  Plus I used an existing report and modified it
and just saved it under the new name. The Crystal version is version 6


Quote:
> Hi Jason,

> A couple of questions before I get into your code.  What database are
> you using and how are you connecting to it?
> What method or property are you using to log the report onto the
> database with?
> What version of Crystal are you using?

> Looking at the code snipets you sent, there is nothing here indicating
> anything you are doing with the database so I doubt this is the
> problem.  I do have a question about Case5 and where you are setting
> the SelectionFormula though.  I noticed you have a variable called
> IsSQL and you are passing that to update the Record Selection
> Formula.  What is in that String.  If you pasted that string into the
> report in the Report Designer and ran it, does it work?  Sometimes the
> problem may be in the formula and running that exact same formula
> inside the Report Designer will help with any syntax problems.

> If you are logging onto a different database or server than the one
> you created the reports with, you will need to use the DataFiles
> property for each of the tables in the report to point the report to
> the new table locations.

> Please reply with the above answers and I'll try to help you more.

> --
> Sincerely,
> Brian Dong

> To reply, remove nospam from the address.


>> I have a problem that is making me pull my hair out!!  I have a
>> Crystal Report that I'm passing parameters to via VB.  All the other
>> reports work fine in my app. The report runs fine when I preview it
>> in Crystal and add the value I'm trying to pass from VB.
>> The offending section is bolded although I think specifically it's
>> the last bolded line.  I included CASE 5 because it works. So does
>> the elseif in CASE 4. The error is 20599- Can't find SQL server. Any
>> ideas?

>> Jason

>> Case 4 ' reserve table view
>>            If Len(gsSelectedRegion) > 0 Then
>>                 If mbSelectCheck = True Then  'select all bands from
>> selected region
>>                     msReportName = "View_reserveAll.rpt"
>>                     rptViewReport.Formulas(1) = "txtRegionEName="""
>> & msRegionEName & """"
>>                     rptViewReport.Formulas(2) = "txtRegionFName="""
>> & msRegionFName & """"
>>                     rptViewReport.Formulas(3) =
>> "txtDistrictName=""N/A"""
>>                     rptViewReport.SelectionFormula =
>> "{REGION.REGION_RPN} = " & gsSelectedRegion

>>                 ElseIf Len(gsSelectedBand) > 0 Then
>>                     rptViewReport.Formulas(1) = "txtRegionEName="""
>> & msRegionEName & """"
>>                     rptViewReport.Formulas(2) = "txtRegionFName="""
>> & msRegionFName & """"
>>                     rptViewReport.Formulas(3) = "txtDistrictName="""
>> & msDistrictName & """"
>>                     rptViewReport.Formulas(4) = "txtBandName=""" &
>> msBandName & """"
>>                     rptViewReport.SelectionFormula =
>> "{COLLECTION_BAND_RESERVE.BAND_RPN} = " & gsSelectedBand
>>                 Else
>>                     MsgBox VBLM_RTString(190), vbOKOnly
>>                     GoTo Exit_cmdPrint_Click
>>                 End If
>>             Else
>>                 MsgBox VBLM_RTString(188), vbOKOnly
>>                 GoTo Exit_cmdPrint_Click
>>             End If

>>         Case 5 ' tribal table view
>>             If Len(gsSelectedRegion) > 0 Then
>>                 If mbSelectCheck = True Then   'Select all bands
>> from selected region
>>                     rptViewReport.Formulas(1) = "txtRegionEName="""
>> & msRegionEName & """"
>>                     rptViewReport.Formulas(2) = "txtRegionFName="""
>> & msRegionFName & """"
>>                     rptViewReport.Formulas(3) =
>> "txtDistrictName=""N/A"""
>>                     lsSQL = "{V_RDTCB.REGION_RPN} = " &
>> gsSelectedRegion
>>                 ElseIf Len(gsSelectedTribal) > 0 Then
>>                     lsSQL = "{V_RDTCB.REGION_RPN} = " &
>> gsSelectedRegion
>>                     'May or may not have a district associated to a
>> band
>>                     If Len(gsSelectedDistrict) > 0 Then
>>                         lsSQL = lsSQL & " AND {V_RDTCB.DISTRICT_RPN}
>> = " & gsSelectedDistrict
>>                     End If
>>                     rptViewReport.SelectionFormula = lsSQL
>>                 Else
>>                     MsgBox VBLM_RTString(194), vbOKOnly 'Please
>> select a tribal council
>>                     GoTo Exit_cmdPrint_Click
>>                 End If
>>             Else
>>                 MsgBox VBLM_RTString(188), vbOKOnly
>>                 GoTo Exit_cmdPrint_Click 'Please select a region
>>             End If



Tue, 01 Oct 2002 03:00:00 GMT  
 SQL Server Not Found

The more I fiddle with this, the more convinced I am that I don't have
an error in my code.  As I said, I simply modified an exsiting report
and saved it with a new name, in the same directory.  The call to the
original works.  Is there something I have to change in the report
possibly to make it distinct. Do I have to distribute it or something
possibly?



Tue, 01 Oct 2002 03:00:00 GMT  
 SQL Server Not Found

I thought I'd let anyone know what the problem was.  In the report I had
selected 3 tables from the production database and 1 from the test
database.  This was it.  Thanks

Quote:

> The more I fiddle with this, the more convinced I am that I don't have
> an error in my code.  As I said, I simply modified an exsiting report
> and saved it with a new name, in the same directory.  The call to the
> original works.  Is there something I have to change in the report
> possibly to make it distinct. Do I have to distribute it or something
> possibly?



Tue, 01 Oct 2002 03:00:00 GMT  
 SQL Server Not Found
Not sure if this helps in VB, but using Delphi, there is a PELogOnInfo
structure which gets initialized with, among other things, the ServerName.
In your report, if you go to the Database menu, and select Set Location, the
Location box should show the same value for Server Name as in your code.  If
it doesn't, go ahead and click Set Location and login to the database using
the same Server Name as in your code.  (You may need to go into File|Options,
the SQL tab, and set the Owner Like property with the correct schema prefix.)

Hope I'm not sending you on a wild goose chase.



Quote:

> --------------423695B77C4ED5E80256F4CB
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

> Hi there,

> It's an Oracle 7.2 database and it's connected using a data control.
> Case 5 does work though and so does the elseif section in case 4.  One
> thing that may or may not be significant is that the report
> View_reserveall.rpt is new. All the other reports were created when I
> took over the project.  Plus I used an existing report and modified it
> and just saved it under the new name. The Crystal version is version 6

....snip....

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 14 Oct 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Specified SQL server not found.

2. SQL-Server not found

3. Crystal 6 with Oracle - Error 599 SQL SERVER NOT FOUND

4. SQL Server not found

5. Error:SQL server not Found?

6. Specified SQL server not found (ERROR)

7. Specified SQL Server not found error

8. SQL Server Not Found

9. Specified SQL server not found.

10. Specified SQL server not found.

11. Can not find SQL Server (I'm not using SQL Server)

12. Another Physical DB not found (but with SQL server)

 

 
Powered by phpBB® Forum Software