Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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
  #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

  #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


  #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


  #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






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





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