view sql produced by crystal reports - crystal-reports

I am developing reports for a system using Workforce Time and Attendance. The system uses an Oracle database, Crystal Reports, and (I think) Business Objects. My reports use parameters. I want to know how those parameters are being used. Is there a way to see the actual SQL that's being sent to the database server?
Please don't respond with Database | Show SQL Query... That shows me the SQL I created (with the parameter names). I want to see what the database server is receiving.

Related

Calling Stored Procedures from Microstrategy

We have a stored procedure that takes in a set of parameters (from dimension tables) and then outputs a set of rows from which a report has to be created.
Till now this is done in a .NET app using an ORM, but is it possible to integrate it with MicroStrategy?. How do I pass the selected params (from a report prompt) to a Stored Procedure on the database and then map the results back to the report?
In the past I did a Free Form SQL (FFSQL) report in MicroStrategy on top of a PL/SQL function which returned a 'table' (Of course that was an Oracle database, more info about returning a table with a function here).
So what you are looking for is something doable.
You can use the prompts in FFSQL report as parameters for your function
Then you have to map the columns of the returned table as attributes and metrics returned by the FFSQL report
This is something I did in a very old MicroStrategy implementation to provide writeback functionality: the users were allowed to update some values in some tables and the function returned a Success or Error message.
As you can imagine this was not a standard Data Warehouse solution, it was more an hoc solution for an operational database.
My suggestion is to avoid similar solution if not necessary and prepare in advance the tables/rows that you need. Of course in your case you have already the procedure ready so you have just to figure out how to combine it with MicroStrategy.
Some useful readings:
TN37783: Instructions to use stored procedures within Freeform SQL reports in MicroStrategy 9.x against different databases
Using Prompts in Freeform SQL Reports

"Set Datasource Location" results in inescapable looping of DB login prompt

Here's the situation: I receive reports written by a vendor which are all developed on their own Oracle DB. Normally, there is no issue in setting a new datasource to our own Oracle DB, but this one report in particular is not playing nicely.
The report in question has 8 SQL Expressions, and a subreport with an additional 3 SQL Expressions (I mention this because I suspect this may have something to do with it, but not sure. Almost like CR is attempting to verify the SQL Expressions on the old DB). I'm able to update the data source of the subreport just fine, but when I try it with the main report, Crystal prompts me repeatedly for the login to the OLD DB where the report was developed (which I obviously do not have access to). The prompt is inescapable and I have to terminate Crystal's process each time.
I've tried unchecking all report and database checking/verification options in CR to no avail. If anyone has any advice as to what I could try next, it would be greatly appreciated!
EDIT: Well, it looks like all I had to do is close the login window a BILLION times (OK, more like ~16, twice for each SQL Expression?). Leaving the question open, though, to see if there is any way to avoid having to go through this for future reports.
EDIT EDIT: Some more details. This is still happening with CR 2008 SP3 attempting to connect to an Oracle 11g database with 11g R2 client. I'm not sure about how these reports were developed, but it was with CR XI at the earliest.
I have seen this w/ migrated reports before, but it's been loong ago.
If you had to do it a million times, I would have guessed that you actually had 999,999 sub-reports -- all to the same old data source, all needing verification or failure to try the new data source. Sorry, I just re-read... I meant to put 'a BILLION' minus 1.
Did you check your TNSNames against (whatever config supplied by the vendor)?
Are you using the same driver used by the vendor Oracle reports? (Oracle driver vs MS ODBC for Oracle vs CR ODBC for Oracle vs MyPrettyPony ODBC Dri...)
Did you go through the Set DataSource exercise in CR?
Can you save the subreports seperately and run them individually w/out needing the (insert some large number) login window closures?
Can you create a new report, set to your own Oracle data source? (I have to assume this one is ok, based on your comments)
If you copy the Show SQL Query and use that as a Command query in a new report, does that run? (Rinse and repeat as sub-reports).
(I'm stalling for time as I search my memory for the last time I experienced the same...)

Ignore failed data source in SSRS 2008

I have a report that runs one query in 9 different Oracle databases. If one of these databases is down, the whole report bombs. Is there any way to set it so it ignores this failure and proceeds with the rest of the report?
I'm not sure if there is a way to do what you're wanting within RS, but here's my idea:
If you can call from a SQL database -
Set up linked servers on a sql server.
Wrap the call in a stored procedure and return an alternate data set if the call fails to the linked server.
You could probably do something similar if there is an oracle server you can use.

Share functions between Crystal Reports without Crystal Reports Server?

We have several reports that do the same formatting operations (e.g. displaying "PASS" or "FAIL" if a value is within a particular range.)
Without Crystal Reports Server, is there a way to share functions between reports so that they do not need to be duplicated? I understand I could do this with a user function library but I would prefer not to port all of the crystal functions to UFL.
Using Crystal Reports 2008.
The only other option I know would be to port the functions to Stored Procedures or Database Functions. This is actually a better implementation (in general) as the Crystal Reports Client Processing is much slower than the SQL Server. so your pass or fail would become a function or stored proc or even the use of a case statment in the Select Query.
Good rule of thumb with crystal reports, flatten out the dataset as much as possible before returning the dataset to Crystal. This will allow you to use the power of the Database server before relying on the Client to handle the processing. The perfect example is to return 1 million rows to the client but flatten it out to only displaying totals from 5 groups. Crystal will choke on the fetching of 1 million rows before it can process the totals.
I recall that earlier version of CR support the notion of a shared repository in addition to the repository that is available via BusinessObjects (nee Crystal Decisions) Enterprise.
I haven't found any mention of similar functionality (meaning a shared, non-BOE repository) in version XI+.

In crystal report unable to open rowset. Incorrect syntax near

Failed to load rowset. Incorrect syntax near...this error comes when I run the program. I want to show report in a crystal report. I have many tables linked by key. Anyone can suggest
I don't know what kind of database you're pulling from, but you may want to do your joins before you pull it into CR.
If that doesn't do it, you may want to save your data to a temporary table as well, then link CR to the temporary table.
In most cases this means that Crystal Reports has build an incorrect SQL statement. This happens sometimes as f.e. with SQLBase. Mostly that is difficult to solve.
Sometimes it can be solved by using a different database driver, f.e. try to use OLEDB instead of ODBC.
If that doesn't help, please provide more details:
Database (SQL Server, Oracle, or ...)
Database driver: ODBC, OLEDB, or ...
Query (via menu [Database, Show SQL Query).