Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal Reports vs. SQL Queries

I'm a programmer (mostly C++) who has moved into a non-software workplace. However, I don't have much experience with database stuff at all.

TL;DR: If we compare Crystal Reports to just writing scripts that execute SQL queries and parse the results, is there anything that CR can do that isn't possible via SQL queries & scripts? I'm talking purely in terms of extracting data - not making pretty documents.


Detail:

At my workplace they have a process where you run a bunch of Crystal Reports, modify the date range to the current month, manually export each to excel, delete the rows and columns that aren't needed, and then cut and paste into a summary excel document that is used by management.

To me, this is pretty crazy and stupid. I'd like to automate/script most of it.

So I have two options:

  • Learn Crystal Reports and try to modify the existing reports to be more automated.
  • Dump CR and just learn SQL and do the whole thing programmatically with scripts working with CSV files or something.

I'd much rather learn SQL since it's more general and useful. But I need to be assured that I can get the data output that I need (without writing a million lines of code to reproduce CR myself.)

So yeah, I'm looking for an answer like, "The two are equivalent. Anything you can do in CR you can do easily via scripts and SQL," or "If you need to group records into categories based on a parameter and then sum their one of their fields, then CR will do it much more easily than raw code," to push me in one direction or another.

Edit: Some additional detail. At the moment my crystal reports run a database query, and then crystal does things like, "don't display the records that are returned, instead group the records by Field A and then display the count of how many records in each group."

Is functionality like this difficult to reproduce via SQL coding? I wouldnt want to have to write a python (or whatever) script to parse and manipulate the data from plaintext CSV, for example.

like image 314
AlternateZ Avatar asked Oct 04 '13 05:10

AlternateZ


People also ask

Do you need to know SQL for Crystal Reports?

This is where Crystal reports come into picture, Using crystal reports they do not have to worry about SQL; they will just enter required fields and get their data. Programmer perspective: Simple data outputs can be achieved through SQL but consider a scenario where you need to pull details as well as summary.

Do companies still use Crystal Reports?

Many organizations are still operating legacy versions of Crystal Reports, and there is a cost to upgrade to the most current version. And even once a company shells out the cost of the upgrade, there is work to be done.

Can you write SQL in Crystal Reports?

Rather than adding a table or view to a report, you can add a SQL command. This command represents a SQL query that you will type in. After this SQL command is created, it is treated just like a table in that it contains fields that can be used in the report and can be linked to other tables or SQL commands.

Is Crystal Reports similar to SQL?

Both of these products are similar in that they can take data from various sources and generate a report which will reflect that data in a meaningful way to end users. Neither are a full object-oriented report writer; instead, they are object-based with a rich object model that use cascading.


1 Answers

You can't just compare SQL and CR - they have different purpose. SQL (in this context) is data source, CR is pretty output formatter. For excel you would need data, not formatted output. Excel combined with SQL can give you all CR options (dynamic crosstab reports, charts etc) what you can't get directly from SQL data. BTW, creating SQL views or procedures is often needed to overcome CR limitations; from this standpoint SQL has lot of more options than CR.

I personally would go with SQL+Excel route. In our company we're using simply SQL+CR without postprocessing, sometimes SQL+Excel. Our customers are using different approaches.

But like said by other people, choice of tools depends on more things. Who has to redesign reports? Who will maintain these reports? How often requirements change? Are there more uses for CR reports besides sourcing Excel tables? Who will be waked up at night, if reports do not work?

like image 123
Arvo Avatar answered Oct 06 '22 19:10

Arvo