INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Crystal Reports - adding Excel spreadsheet as second database

Crystal Reports - adding Excel spreadsheet as second database

(OP)
Hello guys.

I'm new here.

I was searching for solution online how to make copies directly inside Crystal Reports, and I've found the referenced thread (thread767-1734555: print number of copies based on a parameter?) to be what I exactly need. So many thanks pmax9999.

But it works only inside Crystal Reports. When I set this report live for our users inside the software we use, I get the following error:
Logon Failed. Error number - 2147189176

Now I know there is also a thread on these forums regarding this same issue (thread767-1694752: excel data source) but I have the template field blank.

So my question is, how do I need to add the Excel spreadsheet properly inside my report? The report already uses data from Oracle DB.
Do I have to use some form of logon credentials even for this single spreadsheet? It's not protected and everyone on domain has access to it, so the problem should not be there.

Thanks in advance
Jan

RE: Crystal Reports - adding Excel spreadsheet as second database

You could eliminate the Excel spreadsheet by creating a new report with a table that contains at least as many records as the maximum number of copies that you might want. Add a field to the report header and suppress the field. Then creat a formula {@cnt}:

Whilereadingrecords;
Numbervar cnt := cnt + 1;

Insert a group on this formula.

Create a number parameter called {?No of Copies} and then go to report->selection formula->record and enter:

{@cnt}<={?No of Copies}

Next insert your current report as an unlinked subreport in the group header or footer of the main report. Suppress unwanted sections in the main report and remove the group name {@cnt}.

-LB

RE: Crystal Reports - adding Excel spreadsheet as second database

(OP)
Hi LB.

Thanks for quick response. However I'm really new to Crystal Reports itself and till now, for about half a year, was working on already created reports, making only small changes and adjustments.

So if you won't mind: by creating new report, you mean totally new and clean report? And after all is set, add my current report as subreport?
If yes then I think that will not be possible in my case, I should have probably mentioned this, but my report already uses quite a few subreports, too.

Is there any other way I could get this to work?

Thanks
Jan

RE: Crystal Reports - adding Excel spreadsheet as second database

Yes, you can't use a subreport if there are subs already your report.

I don't know if I can help with the issue with the Excel spreadsheet. When you make the report available for your users, you also need to do the same with the Excel spreadsheet, so you might want to check Database->"Set Location" and see where the Excel spreadsheet is being referenced and reset if necessary. In other words, the Excel spreadsheet has to be available to the report wherever it is located. Could be a permissions issue, too.

-LB

RE: Crystal Reports - adding Excel spreadsheet as second database

(OP)
Hi LB.

The spreadsheet is located on shared network, accessible to everyone, without any special permissions (it's set for Everyone).

I guess this is not problem of the report but the software we use to pull these reports. Oh well, looks like there's no other way dealing with this.

Thank you anyway for help LB.

Regards
Jan

RE: Crystal Reports - adding Excel spreadsheet as second database

One of the big issues of using an Excel spreadsheet as a data source. If the spreadsheet is opened by anyone, then it 'locks' the spreadsheet and Crystal Reports will return an error. So in your case, you either need to make a copy of the spreadsheet (in a different location?) or import the data to a regular database (Oracle, MS-SQL, MySQL, Access, etc).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close