Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: pass multiple values var into oracle stored proc Post Reply Post New Topic
Author Message
aussie_1968
Newbie
Newbie


Joined: 14 May 2008
Online Status: Offline
Posts: 7
Quote aussie_1968 Replybullet Topic: pass multiple values var into oracle stored proc
     Posted: 27 May 2009 at 11:16pm
hi,
 
i need to pass a variable (multiple values) into a report, which then needs to be passed to an oracle stored procedure in a subReport.
currently i am using "join" in a formula and then the formula gets passed to the stored proc.
works all right in the CR dev env.
as soon as i deploy the report in our app (using java engine) the report does not show at all - white page.
if i display the formula without going to the db, then it works, showing the concatonated strings.
 
i just read this:
if a formula simply declares a variable, or declares the variable and assigns it a literal or constant value, CR evaluates that formula in the "before reading" record pass.
 
therefor i guess using a formula should work, right ?
 
has anyone got an idea ?
 
cheers
  Martin
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 28 May 2009 at 6:28am
I'm a bit confused.  you need to pass a multivalue into a report, so you app is doing the join and passing it to the report?
 
If so, then wouldn't the report see it as a parameter?
 
If the report is selecting data and then you use the join so that the stored proc can be used, then this can't be a literal.
 
If you display the formula, but don't call the subreport, everything works?  Just double checking.
 
I don't program for the web, window apps only, but the first thing that comes to mind is that the stored proc is having issues.  I am assuming that the same database and connections are being used in the app as in the development (we have different dbs/servers/connection strings between our dev and production).  If any of the above is not true, I would check that.  Another idea, and I don't know how difficult it is to do, but write a quick report that runs the subreport as the main report, and see if it displays correctly, or has the same issues.
 
Sorry I can't be more definitive.
IP IP Logged
aussie_1968
Newbie
Newbie


Joined: 14 May 2008
Online Status: Offline
Posts: 7
Quote aussie_1968 Replybullet Posted: 28 May 2009 at 4:37pm
hi,
 
thanks for the quick reply !!
 
>you need to pass a multivalue into a report, so you app is doing the join and passing it to the report?
the app (which i have not written) passes a multi value into the report.
just checked it by changing the param to non multi value and the report comes back with an error about it not allowing multi values.
the join is done in the main report and then used in the subreport link.
 
>If the report is selecting data and then you use the join .....
i found something in the docu, that if a formula does not use database entries, then the formula can be used prior to reading data.  see last post.
 
>If you display the formula, but don't call the subreport, everything works?
in the CR dev env it works just fine.  only once using the java CR engine, it does not seem to work any more.
if i display the formula in the subreport, then that gets shown properly, even using the java engine.
 
>...same database and connections are being used ...
the same database, but not connection.
i use a jdbc connection to create the report and app replaces the connection with the one used by the app, which is also jdbc.
 
>...write a quick report that runs the subreport ... 
will give that a go.
 
thanks
   Martin
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum