Data Connectivity
 Crystal Reports Forum : Crystal Reports .NET 2003 : Data Connectivity
Message Icon Topic: Select Expert setting being ignored Post Reply Post New Topic
Author Message
gee5767
Newbie
Newbie
Avatar

Joined: 09 Mar 2007
Location: United States
Online Status: Offline
Posts: 3
Quote gee5767 Replybullet Topic: Select Expert setting being ignored
    Posted: 09 Mar 2007 at 1:26pm
Hello,
This is my first post here as I'm a new member.  I was wondering if anyone has seen this problem or knows of a solution. 
 
I am modifying an existing ASP.NET application that uses CR for the reporting functions.  I need to add a lookup table to several reports to pull descriptions for various fields like commodity type, buyer name, etc.  I have added the lookup table using the database expert and get the data I expect.  However, the lookup table hase a cytp field that tells me what to look for.  That is 'C' is commodity, 'B' is buyer.  So I thought I could qualify the query using the select expert for ctyp = 'B'  (I only want buyers on the report).  When I run the report I see all lookup table records regardless of the ctyp setting.  The SQL is here:
 
 SELECT "report_work_tbl"."whos", "report_work_tbl"."ebas", "report_work_tbl"."eact", "report_work_tbl"."buyr", "lookup_tbl"."ctyp", "lookup_tbl"."desc"
 FROM   "MCGSourcing"."dbo"."report_work_tbl" "report_work_tbl" INNER JOIN "MCGSourcing"."dbo"."lookup_tbl" "lookup_tbl" ON ("report_work_tbl"."whos"="lookup_tbl"."whos") AND ("report_work_tbl"."buyr"="lookup_tbl"."keyv")
 WHERE  "lookup_tbl"."ctyp"='B'
 ORDER BY "report_work_tbl"."whos", "report_work_tbl"."buyr"
 
Is there any know problem with the Select Expert in .NET?
 
Thanks
Greg in PA
We must all hang together, or assuredly we shall all hang separately.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Mar 2007 at 2:07pm
I don't know of a problem with the selection expert. In fact, the SQL that is being passed to the server uses your selection filter. Have you checked the SQL Server Profiler to view the actual SQL sees and how many rows it returns? I would copy it to the SQL Query tool and run it manually to see what the results are.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
gee5767
Newbie
Newbie
Avatar

Joined: 09 Mar 2007
Location: United States
Online Status: Offline
Posts: 3
Quote gee5767 Replybullet Posted: 09 Mar 2007 at 6:32pm
Brian,  Thanks for the quick reply. 
I have tried the SQL in the Query tool and it works as I expect.  I will check the SQL Server Profiler as you suggest.

Greg.


Edited by gee5767 - 09 Mar 2007 at 6:32pm
IP IP Logged
gee5767
Newbie
Newbie
Avatar

Joined: 09 Mar 2007
Location: United States
Online Status: Offline
Posts: 3
Quote gee5767 Replybullet Posted: 10 Mar 2007 at 12:24pm
I found the problem. 
The recordSelectionFormula proerty of the ReportDocument was being overwritten in the VB codebehind of the ASP page that calls the report.  It ignored any criteria I entered in the CR designer.  I have added my code in the VB and all is now well.
 
Thanks,
Greg
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.063 seconds.