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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assert Statement Failed

Status
Not open for further replies.

chrishovan

Programmer
Jan 21, 2003
1
GB
I am using Actuate version 5.0 on my desktop, and whenever I override the Start function, and put my own Oracle SQL statement in there, and build the report, when I try to run the report, I get an "Assert Statement Failed" error. How do I fix this?
 
I would need a little more information. Which START method are you overriding: the report root, connection, data source?

What I do when putting in my own text SQL is use the Textual query source; if it is complex SQL and I might want to comment out certain sections to get varied results while testing, then I put the most basic of query in the Textual query editor (just the SELECT columns and FROM tables; no WHERE) then in the Query source's ObtainSelectStatement (if you don't see it in the Component Editor, click FILTER and then "Include other methods you can override") build the entire SQL String like so:

Dim s As String

s = s & "SELECT column1, column2 "
s = s & "from TABLES "
s = s & "WHERE conditions..."

ObtainSelectClause = s
End Function


Hope this helps,

Bill
 
Adding on to the suggestion above, you can output the query statement to a test file with this bit of code. Then you can run the query in oracle and get oracle error messages.

I would put this code before ObtainSelectClause.

' Code below writes out selected code to a text file.
' Replace aStmt below with code to write.
' Replace strFileName with location of the file you want to print.

dim strFileName as string
dim intFileNum as integer
dim strOutput as string

strFileName = "c:\temp\whatever.txt"
strOutput = mySqlStatement

intFileNum = FreeFile
Open strFileName for Output as intFileNum
Print #intFileNum, strOutput
Close intFileNum

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top