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

Newbie: raw sql question

Status
Not open for further replies.

JBaileys

Technical User
Jun 23, 2003
244
US

Hello,

I am brand new to Crystal reports. We are using version 8.5. I have years of experience with sql development. I would like to simply open the crystal query or crystal report - write a sql statement and get the result set back that I can manipulate the placement of fields on the report.

How is this done?

Thanks,

-jb
 
hi
start crystal query designer
then select insert query direct
then fill in your query and run it
then save it
then open crystal report and then select the query


Durango122
 

Durango,

I did see this option through the help files also. But, I am seeing different options. I did confirm we are using CR 8.5. When I click 'new', ireceive a crystal report gallery dialog. I select create balnk report. It prompts me for the data source (ie odbc, sql ole, db files, etc.) No option to enter the sql direct.

Why would the 8.5 help files differ from the cr functionality?!?

Thanks,

 
hi
in the drytal report file option check if the databse you can see that quer is select to be viw
You must created the query first.
and
1. do you have crystal query designer in program file

start->program->crytal report-> query designer
you will not see sql direct you must creat a query

Durango122
 
The Query Designer is a bad, bad idea, it's no longer supported.

Crystal 8.5 does not allow for entering a query directly (OK, there is a means if you use the RDC/ADO connectivity, but you can't apply parameters to the query).

You're best served to create Views or Queries or whatever on the database and use those in Crystal. That allows for simplified maintenance and reusability.

If you're asking about data, post the database being used, SQL is a database language, not a database.

-k
 
Anything you can do in a single SQL selection, you can also do in Crystal, using Record Selection or the 'Select Export'. Try doing a few statements and then checking the SQL generate. You'll find it's not so different.

SQL in Crystal is necessary for things you can't do in a single selection. It is always more hassle.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 

I am using SQL Server 2000. The issue is that I have an ASP page that calls the Crystal report. It is a heterogeneous query as I am pulling data from both Access 2000 and sql server. I am able to manipulate the data retrieval to get what I need with the exception of parameters. In some cases, I want to sort by the month # (1 - 12) in other cases, I want to sort alphabetically. And Crystal says the sorting options should be of the same type. Any ideas?

Thanks,

jb
 
I would suggest starting new threads for new issues.

Since you are using MS Access, consider LINKing the SQL Server tables to eh Access database, creating a Access Query, and make that the source of the report.

It will prove faster than Crystal will be against the tables, and provide better reusability and maintenance.

-k
 
Linking through Crystal (access and sql server) has been successful. There was simply an issue with the parameters that were being passed in.

Thanks.
 
Good to read, however the solution I offered should prove more desirable long term anyway.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top