Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
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
 
Old February 19th, 2006, 10:06 AM
Registered User
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Duplicate records in Crystal Report integrated int

Hello Everyone!

We are developing a ASP.NET application that has a bunch of Crystal Reports in it. Having created the template for our reports in Crystal report XI IDE and intergrating the same into Visual Studio .NET 2003, we have run into a strange problem. We still couldn't fix the problem ourselves. The problem is like this...

Having intregrated a report called Sample into VS.NET 2003 which resulted in Sample.cs class for the report. We haven't made any changes to IDE generated code. We then created a .aspx page to display the report in a WebForm at runtime. This .aspx has an instance CrystalReportViewer whose ReportSource was an instance of the Sample. This sample was bound was to a DataSet which has only rows in it. Unfortunately, the report comes up with 4 records.

The SQL Query which resulted in the dataset has been thoroughly checked and it always resulted in just 2 rows. The query does contain a JOIN between two tables and when the JOIN is removed, the report renders only two rows.
The JOIN was meant to get the name from a reference table. We somehow couldn't go to the root cause of this strange behaviour exposed by Crystal Report XI with .NET.

Is there something really wrong with the rendering aspect of the report or is there wrong with the Quert? All the queries associated with all the reports do have some sort of joins with one or more than one table... How come the Sql Query is bothering the Report? We just couldn't find any solution.

Could there some kind of a relation between the report and the backend? Hope... no.

It's been quite frustrating and all our reports have come to a halt just bcoz of this snag. Hope some body who has faced this kind of a problem before could guide us and help us in resolving this issue asap.

The query is as follows...
SELECT
    DISTINCT NET_POSITIONS_PROCESS.BOUGHT_QTY,
    NET_POSITIONS_PROCESS.BOUGHT_AVG_RATE,
    NET_POSITIONS_PROCESS.BOUGHT_VALUE,
    NET_POSITIONS_PROCESS.SOLD_QTY,
    NET_POSITIONS_PROCESS.SOLD_AVG_RATE,
    NET_POSITIONS_PROCESS.SOLD_VALUE,
    NET_POSITIONS_PROCESS.NET_QTY,
    NET_POSITIONS_PROCESS.NET_AVG_RATE,
    NET_POSITIONS_PROCESS.NET_VALUE,
    NET_POSITIONS_PROCESS.CLIENT_CODE,
    NET_POSITIONS_PROCESS.MARKET_RATE,
    NET_POSITIONS_PROCESS.MARK_TO_MKT,
    NET_POSITIONS_PROCESS.SCRIP_CODE,
    NET_POSITIONS_PROCESS.stlmnt_type_code,
    SCRIP_MASTER.SCRIP_SHORT_NAME
FROM
    NET_POSITIONS_PROCESS NET_POSITIONS_PROCESS,
    SCRIP_MASTER SCRIP_MASTER
where
    NET_POSITIONS_PROCESS.EXCHANGE_CODE = SCRIP_MASTER.EXCHANGE_CODE
AND
    NET_POSITIONS_PROCESS.SCRIP_CODE = SCRIP_MASTER.SCRIP_CODE
and
    NET_POSITIONS_PROCESS.exchange_code = 1
and
    stlmnt_no = '2006003' and stlmnt_type_code = 'N'

Thanks in advance...


Shashi Kumar Nagulakonda
Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
duplicate records vanitha SQL Server 2000 4 June 2nd, 2007 04:35 PM
Exception Report - Show Only Duplicate Records amphion SQL Server 2000 1 April 6th, 2007 04:33 AM
User selection to sort records in a Crystal Report MisterN Crystal Reports 1 January 24th, 2007 01:03 PM
duplicate row in crystal report priya_pooja12324 ASP.NET 1.0 and 1.1 Basics 0 November 23rd, 2006 04:59 AM
In Crystal Report .net, problem whenlarge records kathir Crystal Reports 0 January 19th, 2005 09:12 AM





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