Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Using formula field as parameter to subreport fail Post Reply Post New Topic
Author Message
pkyuen
Newbie
Newbie


Joined: 01 Dec 2009
Location: Canada
Online Status: Offline
Posts: 1
Quote pkyuen Replybullet Topic: Using formula field as parameter to subreport fail
     Posted: 01 Dec 2009 at 5:45am
Anyone passing formula fields to subreport to feed into a SQL stored proc?  I'm using Crystal XI to develop the report and I haven't consistently been able to get it to work.  

The main report is essentially a shell to call the subreport.  I have created a variable to store the currentceusername value so it can be passed to the subreport as a parameter.  This doesn't work immediately since I get the error message "Database connector error '42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure or Function 'usp_PG0123...' expects parameter '@username', which was not supplied. [Database vendor code: 201]

But I have set up that parameter in the Subreport Link.  My workaround is to edit the subreport, refresh the report and enter the parameters to the subreport to retrieve data.  Close the subreport and the main report will now function properly and pass the data to the subreport.

After it is working locally in my CR XI, I save the report to the BOE XI server.  Running the report on the server I get "Error in file reportnamerpt: Database Connector Error".  My local copy of CR XI is patched with the latest SP and hotfixes.  Our BOE XI server is on SP2 (not SP3) I believe with some hot fixes.  

I can't figure out what I'm not doing right... I have been constantly removing and re-creating the subreport and re-creating the sublinks.  This error does not occur if I replace the formula field with a regular parameter in the main report to feed to the subreport.

Anyone have any suggestions?

Thx.
Patrick
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