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

Keep SQL and Create new report

Status
Not open for further replies.

emax6

MIS
Dec 7, 2005
58
US
I have a report that give me all the info I need. I would like to present the information with a new look.
Since I already have the SQL that retrieve all the info, is there a way for me to copy-it somewhere and use for example one of the Standard report that come with Chrystal XI.
thanks in advance.
 
You can export to ODBC from Crystal (to a new table). Then, use that table in another report.

hth,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Ok, but in this case I will be able to use the data only one time. Since my data change overtimes, I guess the solution would be to recreate the links in the database expert.
 
You can go to Database->Show SQL Query to get the sql for a report designed using Crystal's data interface. Then you can use an Add Command to paste that SQL into another report if need be.

You can also just save orignal the report under another name and then modify it as the need be. You

As for using it in a *standard report* that comes with Crystal, I suggest that you get some training on Crystal and databases, what you propose would likely be more work than just creating a new report.

Rather than guessing generic questions to ask, try posting your actual requirements.

-k
 
I usually do what you suggested (Copy the report under another name) and modify it. With one or two tables it's OK, when there is a lot of table and links, it takes time.

Regarding the cut and paste of the SQL statement, I did this before I put the message, but I never figure out where to do the 'paste' part of it.

My current problem is to recreate an existing report and make it look like an excel spreadsheet, and even if I can do it from scratch, I was wondering if a faster way exist - by just using the exiting query, and selecting a 'premade' template.
 
Ahhh, there's the requirement.

The trick I use for building Excel files is to create another prompt in the report that says something like Export to Excel?

If they answer yes, I use this parameter to suppress every section in the current report.

Then add in 2 more sections, a report header, which will have the column names in it, and a detail section, which will have the fields in it directly under the excel report header section.

If they've answered no to the export, then suppress the 2 sections you created for export.

So if an Excel export, you get a standard sort of columnar output, otherwise the report looks normal.

-k
 
Thanks,
I will use this for some futur reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top