Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Selection Specs Ignored Post Reply Post New Topic
Author Message
bgibson
Newbie
Newbie


Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
Quote bgibson Replybullet Topic: Selection Specs Ignored
     Posted: 17 Aug 2010 at 7:10am

I'm working on a program in Visual Basic 2008 that presents about a dozen Crystal Reports on screen. (My Crystal Reports is the real version 2008, not the more limited product that comes for free in Visual Studio.)

The complicated reports are working fine. I can pass run-time selection specs and sort orders into CR and get accurate results.

But I have one report that needs no programmatic modifications — I want it to use this fixed selection set built into the report: {FactTypes.FactType} in "AB1" to "AB7".

I call the report this way:

Dim Report As New ReportDocument
Dim FName As String = "..\..\AddressBook.rpt"
Report.Load(FName)
frmCRViewer.CRV.ReportSource = Report
frmCRViewer.Show()

The report is generated and displays, but the FactTypes run from A through Z, not the more limited set I want.

What am I missing?

Thanks for any help,

Benn Gibson

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Aug 2010 at 7:37am
Does the report work correctly when you run it in the Crystal designer, outside of your application?
 
-Dell
IP IP Logged
bgibson
Newbie
Newbie


Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
Quote bgibson Replybullet Posted: 17 Aug 2010 at 9:01am
Yes, run from Crystal Reports itself, it does fine.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Aug 2010 at 9:17am

Try using this formula instead:

{FactTypes.FactType} >= "AB1" and
{FactTypes.FactType} <= "AB7"
 
This does the same thing, but may react differently through the runtime engine.
 
-Dell
 
IP IP Logged
bgibson
Newbie
Newbie


Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
Quote bgibson Replybullet Posted: 18 Aug 2010 at 3:51am
Dell,

Thanks for the idea. Alas, while changing the select spec to Basic syntax works fine in CR's designer, it continues to be ignored when passed through the runtime engine.

Benn
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 18 Aug 2010 at 3:55am
Hmmm, that's odd.  I've never seen that happen before.  As a last resort, you could always set up the values as parameters, but set them to the same values in your code every time the report is run.  You shouldn't have to do that, but sometimes it's about getting it to work so you can get the app to your users.
 
-Dell
IP IP Logged
bgibson
Newbie
Newbie


Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
Quote bgibson Replybullet Posted: 18 Aug 2010 at 5:17am
Dell,

Yes, I'll probably set up some workaround in my program to handle this quirk and chalk this up as another of CR's mysteries.

I may also post my original message on SAP's Crystal Report forum and see if anyone has ideas. Those forums always seem like bedlam.

I appreciate your clear and quick responses!

Benn
IP IP Logged
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