p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > Other .NET > Crystal Reports
I forgot my password Register Now
Register | FAQ | Members List | Calendar | 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 19th, 2006, 07:28 PM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crystal Report, Stored Procedure, Dataset

Hello,

I wanted to edit a crystal report that has been made using VS.Net 2003 and SQL Server 2000.
Under the Database Fields in Field Explorer, the developer used dataset that
was returned from stored procedure in SQL Server. The code of the stored
procedure is shown below.

CREATE PROCEDURE spP902A
AS
SELECT Store,ProgramType, COUNT(CustomerControlID) As TotalCustomer
FROM CUSTOMER_CONTROL_LOG
WHERE Status = 'A'
GROUP BY Store,ProgramType
ORDER By Store,ProgramType;
GO

CREATE PROCEDURE spP902B
AS
SELECT Store,ProgramType,MONTH(AdminDT) as Month, COUNT(CustomerControlID)
As TotalAdmits
FROM CUSTOMER_CONTROL_LOG
WHERE YEAR(AdminDT) = YEAR(GetDate())
GROUP BY Store,ProgramType,MONTH(AdminDT)
ORDER By Store,ProgramType,MONTH(AdminDT);
GO

CREATE PROCEDURE spP902C
AS
SELECT Store,ProgramType,MONTH(DischargeDT) as Month,
COUNT(CustomerControlID) As TotalDischarges
FROM CUSTOMER_CONTROL_LOG
WHERE YEAR(DischargeDT) = YEAR(GetDate())
GROUP BY Store,ProgramType,MONTH(DischargeDT)
ORDER By Store,ProgramType,MONTH(DischargeDT);
GO

The report is made so that it shows the # of customer for each program type,
each month. Eg. ProgramType A will have (spP902A-spP902B+spP902C) customers
in Jan/Feb/...
I have looked at the Crystal Report itself and under the Database Fields, it
has P902(dataset), which expands out to Store, Jan_A, Jan_B, Feb_A, Feb_B,
etc... (A, B are the ProgramType)
I have looked at dsP902.xsd(Dataset&XML), dsP902.xsx, dsP902.vb, and
rptP902.rpt, rptP902.vb, but I didn't see any query made to create Jan_A, or
Jan_B, or....

Questions:
If we have a new ProgramType C, and I wanted to include it in the report,
how do I add a new dataset (Jan_C)???
If I made a new stored procedure, and I wanted to make a dataset something
like the example I give above, how do I do that?

Thank you for your time. I am so sorry because of my poor English. If
possible, can you give a few screenshots please? I have bought a few books
about vs.net 2003, crystal reports, and have read a little about ADO.NET,
but I still don't understand. So please help me. Thank you very much in
advance. Hope to hear from you soon.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataset & Stored Procedure Problem clioz BOOK: Professional Crystal Reports for VS.NET 0 July 21st, 2006 08:42 PM
Parameterized CRystal report & Stored procedure jay4ever_2000 ASP.NET 1.0 and 1.1 Professional 3 June 6th, 2006 09:53 AM
Return DataSet / DataTable from Stored Procedure ashu_from_india ADO.NET 3 March 20th, 2005 05:39 AM
Setting up stored procedure for Crystal Report.... potato3 SQL Language 1 December 9th, 2004 12:33 PM
How to fill stored procedure in dataset. jayaraj ADO.NET 4 August 2nd, 2004 03:40 AM



All times are GMT -4. The time now is 12:42 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc