Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2006, 02:46 AM
Authorized User
 
Join Date: Jan 2006
Location: gangtok, Sikkim, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with the report Source

hi...
   i have a problem setting a stored procedure like this one:

create procedure procedureName
             (@Parameter varchar(10))
as
if(@Parameter!='')
begin
    select e.empId from employeemaster e,employeeToProject ep
    where e.empId=ep.EmployeeId and ep.Billable=@Parameter
end

as the datasource of a crystal report ... the problem i get is ..i select the above stored procedure as the datasource ...but then in the field explorer ...the databasefields are not shown ...what i am trying to say is that i cannot select any field to add to my crystal report....
Please could somebody help me out asap with this... as the project that i am doing has been stalled because of this Crystal report problem ... i am using asp.net 1.1(c#) with visual studio.net 2003
thanks in advance


achhetri
__________________
achhetri
Reply With Quote
  #2 (permalink)  
Old May 17th, 2006, 04:04 AM
Authorized User
 
Join Date: Sep 2005
Location: Hydrabad, AP, India.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vijaykumartaduri Send a message via Yahoo to vijaykumartaduri
Default

comment if(@Parameter!='') condition And check

Reply With Quote
  #3 (permalink)  
Old May 17th, 2006, 01:20 PM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

from what it looks like, you are using two tables but not doing any type of joining. What is the paramater value you are passing and what is the value in the Billable field?

create procedure procedureName
             (@Parameter varchar(10))
as
if(@Parameter!='') I don't know about this line != -maybe check for null instead
begin
    select e.empId
from employeemaster e INNER JOIN
     employeeToProject ep ON e.empID=ep.empId
    where e.empId=ep.EmployeeId and ep.Billable=@Parameter
end


Reply With Quote
  #4 (permalink)  
Old May 17th, 2006, 01:25 PM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oops....

create procedure procedureName
             (@Parameter varchar(10))
as

SET NOCOUNT ON
if @Parameter is null
begin
    select e.empId
from employeemaster e INNER JOIN
     employeeToProject ep ON e.empID=ep.empId
where ep.Billable=@Parameter
end
GO


Reply With Quote
  #5 (permalink)  
Old May 17th, 2006, 01:28 PM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oops again...I'm having a hectic day!!..lol

create procedure procedureName
             (@Parameter varchar(10))
as

SET NOCOUNT ON
if @Parameter is null
Begin
   set @Parameter=1
end

select e.empId
from employeemaster e INNER JOIN
     employeeToProject ep ON e.empID=ep.empId
where ep.Billable=@Parameter

GO




Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Source siddu Crystal Reports 3 March 24th, 2007 05:09 AM
Invalid Report Source Error jmurdock BOOK: Professional Crystal Reports for VS.NET 1 March 6th, 2006 02:59 AM
Chapter 17 - Report Data Source Granted BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 February 21st, 2006 10:53 AM
Invalid Report Source jmurdock Crystal Reports 0 January 24th, 2006 01:21 PM
set data source to blank report lpastor Crystal Reports 0 October 15th, 2004 05:21 AM



All times are GMT -4. The time now is 09:26 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.