Question

Passing multiple value parameter to Oracle table function in Crystal Report 2008

Asked by: csi-consulting

Dear all,

I think that everything is said in the title:
I'm new to Crystal Report 2008 and I have to make some tests in order to see if some functionnalities found in Cognos are possible to use in Crystal Report 2008.
One of the most important thing to me is passing a multiple value parameter to my function in a oracle package.
I have tried a lot of things, and also cast the "array" of the parameter as a comma separated string with quotes, It could be really usefull to me but I can't pass it too to the function.

Thanks for your help.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-05-25 at 08:34:53ID24436018
Tags

Crystal Report 2008

,

Crystal Report

,

Parameter

,

multiple value

,

oracle

,

function

,

procedure

Topic

Crystal Reports Software

Participating Experts
3
Points
500
Comments
24

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Oracle & Crystal reports
    Creating a crystal report in Oracle. The problem is how would I use the Decode function in crystal reports. This is how used it before I used crystal reports, Decode(isactive,null,'No',0,'No',1,'Yes').Right now when i used crystal reports , a 1 or 0 gets returned in the isact...
  2. Oracle + Crystal Reports
    I am using Oracle as a back end for Crystal reports. I am new to crystal reports and I have not found a book for it. The Question: I have two tables, one table in which I am using to generate the report. It has a foreign key on it related to another table. I need to use ...
  3. Crystal Reports and Oracle
    I am trying to allow access through the web to my crystal reports accessing an Oracle 8 database. From the web I am asked to login several times before the report appears. Why am i being asked to login several times? Is Crystal closing the connection after I query certain ...
  4. crystal reports to oracle reports conversion
    how can i convert reports done in crystal reports to oracle reports? the database is in oracle 8.
  5. Crystal Reports using Oracle Database
    Hi, I have oracle database 9i. And i want to use Crystal Reports to generate Reports. I have a stored procedure in the database which takes two parameters for start and enddates. Is there a way i can use this stored procedure in oracle and call from Crystal Reports, by passi...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: wykabryanPosted on 2009-05-26 at 05:59:36ID: 24472676

in short, it wont be pretty.
the long version is this. You can not pass multiple values like a list of something in the convensional way. Crystal doesnt know how to do that. But....You can create a parameter that is a text/string and pass that in. A text/string only accepts what is entered right, so what happens when you enter something like this '123asd','12345add','dfowe'. Crystal looks at it as one string. This can be passed to the procedure. In the procedure you will need to break it appart so that it is 3 different values. Simple enough?? Not to my knowledge, it is more of a pain than anything. Additionally with this way you will introduce a new way for your end users to break the report. This is the only "work around" (if you want to call it that) that I am aware of.

 

by: csi-consultingPosted on 2009-05-26 at 10:20:47ID: 24475363

Hi wykabryan,

Thanks for your answer.
I think that for the Oracle side, it shouldn't be a problem: I'm used to work with Cognos, and I've managed to pass multiple values parameters to table function / procedures. (but it seems easier in the end to work with cognos, for the moment)
As soon as I get in the end a comma separated string that I can pass as a parameter to my procedure, I'm fine.
In a test, I found something to "cast" one of the parameters as a comma separated string, with the "Join" function of crystal; but it is in the "Formula fields" category, not really parameters
So It's clear that I don't know how to use it as a parameter, if it is possible.

The other "critical point" is that the parameters have to be cascading.
I've managed to pass single value parameter to a procedure (for the moment, I give up with the table function as nothing was working), but I don't even know how to make the parameters for this procedure as cascading ones.

Thanks,
Best regards

 

by: wykabryanPosted on 2009-05-26 at 10:32:42ID: 24475491

well cast is a function of sql to make a field appear like something else.
For example: cast(12345 as varchar(5)) number_cast

Next the Join is a function of crystal, which allows you to join a string array with a delimiter. So one field would have to have all the elements in it.  Something like this:
1 straw hay weeds

and not like this:
1 Straw
2 hay
3 weeds

Your final critical point can not been done in this situation. If it was not based around a procedure, it would have no issue at all but that is a limitation of the application.

 

by: James0628Posted on 2009-05-27 at 21:42:02ID: 24489774

To get CR to pass a string containing multiple values, you have two basic choices:

 1) Have the users enter the values that way.  The report would have a simple string parameter and the user would enter something like "1,2,3,4" (without the quotes).

 2) Use a subreport.  The main report would just be a shell that accepted a multi-value parameter and the user would select the values they wanted.  The main report would have a formula that used Join, for example, to take the values from the multi-value parameter and combine them in one string.  That formula would be passed to the subreport as a simple string parameter.
 This is necessary because you can't use a formula as a parameter directly.  What you can do is pass the results from a formula to a subreport and the subreport can then use that as a parameter.


 I don't know what you mean by cascading parameters, so I can't really comment on that one.

 James

 

by: wykabryanPosted on 2009-05-28 at 05:52:19ID: 24492373

cascading parameters, James, is like this..

One parameter name called city.. The first prompt in this parameter is state, whereby when you select Florida it will automatically filter the second parameter called city down to just those that exist in Florida rather than every city in the USA. It is a new feature as of 11.

 

by: mlmccPosted on 2009-05-28 at 12:07:19ID: 24496782

Cascading parameters were added with CR XI.

They will work correctly if you choose single values.  If you  allow multiple values then the second parameter can have all the valid values for all the primary parameters.

mlmcc

 

by: James0628Posted on 2009-05-28 at 16:55:37ID: 24499058

Thanks wykabryan.  I haven't used CR XI (or later), so I haven't seen parameters like that, but I've seen them described, so I'm more or less aware of them.  My comment was partly because I don't know if that's what the OP was actually talking about.  The obvious guess is that he's talking about the same kind of thing, but you never know.

 James

 

by: csi-consultingPosted on 2009-05-29 at 11:10:36ID: 24504752

Hi all,

Thanks for your answers.
. for cascading parameters: yes, it is exactly what I was taliking about and expecting. But it seems to be quite difficult or impossible to get it my situation.
. for passing multiple value parameters to procedure: I'll try the idea n°2 with a subreport.
But to be clear, the "final target" is to see if we can get the same functionnality as in Cognos:
I call a table function in a SQL like:
"
select *
from table(my_function(parameter1, parameter2, parameter3, etc...) )
"
In Cognos, the multiple values parameters can be passed as comma separated string, so then it's easy to work on it in Oracle.
But I fear I won't be able to get the same functionnality in Crystal ....

 

by: wykabryanPosted on 2009-05-29 at 11:20:56ID: 24504856

There are differences between cognos and crystal. This is one of them. There are benefits and draw backs to both from a functionality stand point. I currently work in a Cognos 8 environment as well, but my background is in Crystal. I have to say I am more impressed with the streamline of crystal than the choppiness of Cognos. But this thought only highlights the bias that I show. I believe you will be able to get alot of similarities between the two but do not be surprise on the differences.

 

by: James0628Posted on 2009-05-29 at 16:53:58ID: 24507051

Re: the subreport idea

 One thing I forgot to mention is that you can not have nested subreports in CR.  A subreport can not contain a subreport.  So, if your report requires a subreport, you won't be able to use the "shell" idea and have another report accept a multi-value parameter, convert that to a string and then execute your report as a subreport and pass it that string.

 James

 

by: csi-consultingPosted on 2009-05-30 at 03:24:18ID: 24508517

Hi,

Ok thanks James0628, that's a really good information; so I won't try anything like that because I'm in this situation.

So, I keep on with an other question:
-> and what about calling this report from an other application ?
I've seen (quickly, I don't have much details on it) that Crystal reports can be "called" from others applications built in C++ or C# for example, so is it possible to work on parameters in this situation and so pass them comma separated string ?
Is it possible to launch a report from an other web based interface, like in Cognos using particular parameters in URL.

Thanks

 

by: James0628Posted on 2009-06-01 at 17:13:26ID: 24523018

I believe it's possible to build a parameter like that if you use your own code to run the report, but I don't run reports that way, so I can't say for sure.  Hopefully someone with experience in that area will jump in.

 James

 

by: mlmccPosted on 2009-06-02 at 16:42:59ID: 24532425

Yes you can get an application to build a string like that and pass it to Crystal.  The trick will be to get Crystal to handle it correctly.

mlmcc

 

by: James0628Posted on 2009-06-02 at 17:38:15ID: 24532647

Well, if I'm following correctly, all he wants to do is pass a string containing multiple values to a function/procedure in Oracle and that function/procedure would interpret it, so CR doesn't need to "handle" the string.  CR just needs to pass it along to Oracle.  The only trick here is getting the multiple values into the string, which is what his app would do.  Then the app would pass the string to CR, which would then pass it to Oracle.

 I think.  :-)

 James

 

by: mlmccPosted on 2009-06-02 at 18:32:15ID: 24532875

What application tools do you have?

Would you be using a combo box with multiple selections or several fields that the user could choose from?

mlmcc

 

by: csi-consultingPosted on 2009-06-10 at 13:48:33ID: 24596242

Hi all,
Yes James0628, it is exactly like that.
I'll have a "personnal" (home made) web page, containing all the objects and datas in order to "filter" the report, and I hope that I can pass paramaters as string containing multiple values (comma separated) to CR; it is the same I've done for Cognos (still with Oracle as DB), and it is working fine.

But I don't know so many things from CR (just a few things, I'm beginning): I've seen that there is a crytal report 2008 server version, or something like that; It sounds like something I would need; If I correctly understand, I would be able then to launch report using URL, isn't It ?
Am I correct ?

If yes, are there particular specification for this, example of correct syntax ?

Thanks

 

by: James0628Posted on 2009-06-10 at 17:17:05ID: 24597760

Sorry.  I can't answer those questions.  I just run reports from CR, and I'm using CR 10 and haven't used the later versions.  mlmcc can probably answer some of your questions.

 James

 

by: mlmccPosted on 2009-06-12 at 12:44:46ID: 24615447

You shouldn't need the server version.  You should be able to run the reports from ASP or HTML on your web page.  

Multiple parameters are passed in an array and not as comma separated strings.  So if that is required you will have to build them yourself in the web page and pass them as single parameters to Crystal.  Crystal can then pass them to the database and it can use them as comma separated strings.

mlmcc

 

by: csi-consultingPosted on 2009-06-20 at 03:39:12ID: 24673188

Hi mlmcc,

Thanks for your answer. Any example possible for launching CR report from web page ?

Regards,
vinc.

 

by: mlmccPosted on 2009-06-20 at 16:52:25ID: 24675696

I don't see any for CR2008.  You might check the Crystal download site for Samples.

https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm

mlmcc

 

by: csi-consultingPosted on 2009-07-20 at 05:17:52ID: 24894293

Hi,
The "process" is stopped for the moment: we don't know if crystal report will be still choosen by the client, or if cognos finally will be implemented.
I still didn't find any example for launching CR report from web page, but I must admit that I've stopped searching for the moment.
I think I should close and award points to those who helped me.

Thanks again.

 

by: James0628Posted on 2009-09-29 at 21:04:16ID: 25455569

Based on the OP's last comment, I'm thinking an even split between all 3 of us, wykabryan, mlmcc and James0628.  As for exactly which posts to count as the solution, that's trickier, in that quite a few of them seemed to contribute something.

 James

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...