Crystal reports version is 2008. Errors encountered when attempting to add sql command:
1. With brackets around linked server name: [TIMMY\TIMMY].LIHP.dbo.table_name
Failed to retrieve data from the database. Details: 42000[Cache ODBC][State: 37000][Native Code 1] …[Location: <Prepare>]...
Anyone have any tips for the correct syntax to use in the SQL command to join a table from an external server and database? This works in a straight sql query with brackets around the server name, but Crystal rejects that with an error. It also works to manually select the tables from each...
My report is based on an SQL command that sets variables based on a CASE statement based on a parameter select. It then uses the variables to populate part of the where clause to select records. Example:
Set @var =
CASE
WHEN {?param} = 1
THEN '[^SUB]%'
Select…..
From…
Where tbl.field LIKE...
This works on static text, but when using an actual field it just prints the field name on the report, bolded and in red. Any suggestions on fixing this in Crystal Reports 2008?
IF {field_code} = 'Y'
THEN
"<html> <font color = red> <b> {field_value} </b> </font> </html>"
ELSE
{field_value}...
Thanks. That is likely the cause. The query returns NULL NULL on all of the tables. I don't have admin access here and would have to take this up with the DBA, but this is also a data warehouse copy of an Intersystems Cache database, and I guess there may be some reason it is this way. I'll...
I have a SQL Server 2008 query that runs by a date range for transactions. If I limit the date range to a period of 5 days or less, the query takes almost 2 full minutes to execute. However, if I set the date range for over 5 days, even for a period of several months, the results come back...
Thank you pmax9999. Your suggestion lead me to a solution that seems to work well. I found a post on another site that was an elaboration on your suggestion, and if it is of any help to anyone else it is:
"I've done this before. Took me a while to figure out how to get parameters into an SQL...
I have a report that typically pulls a small amount of data per instance since it is run per client ID. The main reports runs very quickly. When adding a needed subreport the report then takes a long time and appears to cycle through the entire database, rather than being narrowed by the...
I would greatly appreciate extra eyes to try to solve this issue. The EXISTS subquery is eliminating a row(s) of data that it should not. The first part of the query, prior to the EXISTS subquery returns the record in question, and a separate query on the table used in the EXISTS subquery...
Nevermind. Found the issue. It was further down in my code in a union of the same tables and fields where I missed changing the alias from a copy/paste. DOAH!
My SQL query runs fine in SQL management studio, but when pasting it into an SQL command in Crystal it is rejected with " HIST ...label is not among the applicable tables". Any pointers appreciated. here is the SQL
Select chrg.field1, hist.field2, etc.
FROM billing_tx_charge_detail AS chrg...
I am modifying a report that uses a formula for a grouping and would appreciate any advise/explanation that anyone might offer. The formula is:
REPLACE(TRIM(REPLACE({tbl.prog_val},{tbl.prog_code},'')),'/','-')
I am new to the REPLACE function, but I believe that I follow its functionality in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.