| Author |
Message |
bgibson
Newbie
Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
|

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 Logged |
|
|
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

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 Logged |
|
bgibson
Newbie
Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
|

Posted: 17 Aug 2010 at 9:01am |
|
Yes, run from Crystal Reports itself, it does fine.
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

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 Logged |
|
bgibson
Newbie
Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
|

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 Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

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 Logged |
|
bgibson
Newbie
Joined: 02 Dec 2008
Location: United States
Online Status: Offline
Posts: 4
|

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