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

Using Excel as input to a Crystal report

Status
Not open for further replies.

UHsoccer

Programmer
Apr 24, 2003
139
US
I want to include an Excel spreadsheet as part of my Crystal report. I cannot figure out how to do so.
Do I have to create it as a table in my of my data bases?

Any help appreciated
 
Just name the range in Excel.

Then, create an ODBC DSN using Microsoft Excel driver.

The range would then show up as a table in Crystal.

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Select the "table" in Excel.
Then, in the top left input box, enter a name for that range.
Save...

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I was able to get the Excel table into my report. I then updated the spreadsheet, how do I refresh the original one?
 
Do you mean how do you refresh the report? Just refresh it (assuming the data range stayed the same or was expanded to accomodate more rows).

If more columns were added or if column data types were changed, use the Crystal menu option of Database, Verify Database...

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I found my error, I had not modified the Excel table range.

Next issue, my query if the following

if {?Salescode} = {SbuExcel.SalesCode} then {SPStats.code} like {SbuExcel.NavCode}

The reason for the "like" is:

SbuExcel.NavCode is HEVE
SPStats.code HEVE, HEVE/JOAN or JOAN/HEVE

How do I code the segment "like {SbuExcel.NavCode}" to retrieve all of them. As is it only finds SPStats.code = HEVE data
 
Where are you placing this supposed query?

It looks like a formula to me, and one that won't work.

Rather than typing out formulas, why not show the data, and what you want returned, and where?

The LIKE predicate would use:

if {?Salescode} = {SbuExcel.SalesCode} then
{SPStats.code} like "*"+{SbuExcel.NavCode}+"*"

-k
 
When I prepare my spreadsheet, I need to link a column to aan ineger defined data base table. I formattted the column as Custom , 0 (to insure it is an integer with no decimals).

Once I add the spreadsheet, the specific column still looks like "1.00" instead of "1"

Please advice
 
I publish the report using the Crystal Management console, it goes to the server that handles the Crystal reports.

One of the tabs is "Database" and it wants me to supply it with a login and password for the Excel "data base". The spreadsheet sits in the C:/Excel/ directory.

I tried my system login to the server, but it does not accept it.

How do I solve that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top