Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Fields are not displayed when SP is used as dataso Post Reply Post New Topic
Author Message
brainsoup
Newbie
Newbie
Avatar

Joined: 30 Jul 2009
Location: India
Online Status: Offline
Posts: 17
Quote brainsoup Replybullet Topic: Fields are not displayed when SP is used as dataso
    Posted: 30 Jul 2009 at 11:16pm
I am using a stored procedure to pull data for the report. In the Standard Report Wizard (Crystal Report XI) data source is selected as a Stored Procedure present in the database. In the next page, the stored procedure is displayed, but the fields selected in the SP are not getting displayed in 'Available Fields' section. Because of this I am not able to add fields to the report.
 
The query is executed using EXECUTE() method in the stored procedure and the stored procedure is created in the db without any errors/warnings.
 
Structure of the query in SP goes like this. (Just the framework; correct syntax has been used in the stored procedure)
 
if(param1 = 'val1')
  SET v_val1 = 123
else
  SET v_val1 = 456
 
SET v_query = 'Select a, b, c from tbl where col1=v_val1'
 
EXECUTE(v_query)
 
Can anyone please tell me why the fields are not getting displayed?
IP IP Logged
brainsoup
Newbie
Newbie
Avatar

Joined: 30 Jul 2009
Location: India
Online Status: Offline
Posts: 17
Quote brainsoup Replybullet Posted: 30 Jul 2009 at 11:31pm

Got the solution :)

When the report parameters are given, mandatory parameters needs to be passed. Once i passed all the parameters, the fields got displayed.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.