Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Report Built on Stored Procedure

Status
Not open for further replies.

Daythril

Programmer
Jun 6, 2012
3
I have a few dozen legacy Reports, many of them with Sql Server stored procedures as their data source. I'm trying to use them in an application built with VB.NET 2010 and CR for Visual Studio 2010 version 13.0.2.

When I run a report based on a stored procedure I get an error message saying something like

Code:
The table 'REPORT_SCHEDULEB' could not be found

The table definition in the report looks like this:

Code:
LogOnInfo.ConnectionInfo for REPORT_SCHEDULEB:
Name: "REPORT_SCHEDULEB", Location: "Proc(REPORT_SCHEDULEB;1)"
AllowCustomConnection: False, DBName: myDb, IntegratedSecurity: False
ServerName: myComputer, User: myName, Password: myPassword, Attributes:
    Database DLL: crdb_ado.dll
    QE_DatabaseName: myDb
    QE_DatabaseType: OLE DB (ADO)
        Auto Translate: -1
        Connect Timeout: 0
        Data Source: myComputer
        General Timeout: 0
        Initial Catalog: myDb
        Integrated Security: False
        Locale Identifier: 1033
        OLE DB Services: -5
        Provider: SQLOLEDB
        Tag with column collation when possible: 0
        Use DSN Default Properties: False
        Use Encryption for Data: 0
        Owner: dbo
    QE_ServerDescription: myComputer
    QE_SQLDB: True
    SSO Enabled: False
    Owner: dbo

I'm guessing that there's some issue with the way the Location field is defined, but

when I try to change the Overridden Qualified Table Name in the report editor it won't accept the change, and
I'd really rather find a programmatic solution than hand-edit dozens of reports.
So, I tried in my code to set the table.Location value, but that throws a COM exception -- I guess it's readonly at some level.

I also thought of the possibility of setting some sort of QualifiedName property but haven't found a way to do that.

Any ideas?

TIA
 
Can you run the stored procedure REPORT_SCHEDULEB when you log in with the same credentials to the SQLServer ?

Viewer, scheduler and report manager for Crystal reports and SSRS.
Send your report everywhere.
 
Thanks for the reply, which I think is pointing in the right direction. I have been given to understand that the "could not be found" message often means there was some problem running the stored procedure, so to clear the decks, and because the report was written a long time ago when the SP might have looked different, I replaced the report's data source definition with a new one to the same SP. That got me past the "could not be found message" but it's now telling me that it doesn't recognize a certain table field that appears in one of the formulas. I could deal with that, except that the field does exist in the table returned by the SP, so now I am once-more at a loss.

Any further thoughts on how to debug this will be appreciated.
 
Okay, this is it: That error message was misleading (seems to be a pattern with this library); there was in fact a field that doesn't exist in this version of the SP, but it wasn't LABEL_TYPE. It was further down in the formula. After plowing through that one and a few more like it, my report actually displays.

Thank you very much for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top