Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: "display string" Post Reply Post New Topic
Page  of 2 Next >>
Author Message
epaga
Newbie
Newbie


Joined: 18 Jun 2008
Online Status: Offline
Posts: 15
Quote epaga Replybullet Topic: "display string"
    Posted: 22 Jun 2008 at 11:41pm
hey there, sorry, but another API question. (see also my other API question)

how do I access the display string formula? What I'm trying is once I have a ReportObject, to access the formula via:

                ConditionFormula f = obj.Format.ConditionFormulas[CrObjectFormatConditionFormulaTypeEnum.crObjectFormatConditionFormulaTypeDisplayString];

Unfortunately f.Text is always null even if I have a display string formula set for the object.

Any thoughts?

Thanks so much,
epaga

edited: f.Text is null, not f itself.


Edited by epaga - 22 Jun 2008 at 11:44pm
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 24 Jun 2008 at 12:11am
If you're still having problems, can you give me a little more info? What API are you using? C#? And what class is 'obj' defined as?

To set the record selection formula, I use the an instance of the ReportDocument class (my report object) and reference the property RecordSelectionFormula.

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
epaga
Newbie
Newbie


Joined: 18 Jun 2008
Online Status: Offline
Posts: 15
Quote epaga Replybullet Posted: 24 Jun 2008 at 2:33am
Hi, sorry for the missing info.

Using the RAS SDK with C#. obj is a ReportObject.

I don't want the record selection formula, I want the "display string" formula, the one you can use to customize the actual output of the value.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 24 Jun 2008 at 2:38pm

I see. ReportObject is a base class. You have to case it as whatever the actual class it and then reference its properties. However, I still don't understand your original code if it is in C#. You're trying to reference the ConditionFormulas array from the Format property? I need to install CR 2008 on top of my VS 2008 virtual machine to see what this is doing. So many virtual machines on my hard drive.... 

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
epaga
Newbie
Newbie


Joined: 18 Jun 2008
Online Status: Offline
Posts: 15
Quote epaga Replybullet Posted: 25 Jun 2008 at 1:32am
yeah, see the RAS API here: < ="Content-" content="text/; charset=utf-8">< name="GENERATOR" content="BLOCKNOTE.NET"><>BODY { FONT-FAMILY:Verdana; FONT-SIZE:10pt } P { FONT-FAMILY:Verdana; FONT-SIZE:10pt } DIV { FONT-FAMILY:Verdana; FONT-SIZE:10pt } TD { FONT-FAMILY:Verdana; FONT-SIZE:10pt } http://support.businessobjects.com/global/interactive/xi/om/RAS/default.html

You can reference the conditionformulas array from the ObjectFormat class. But as you can see it doesn't help for getting the display string formula.

As far as I can tell, they shipped the new API with tons of theoretically offered functionality, but there are a few things like this and the BooleanGroupOptions that apparently are flat out not implemented yet.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 25 Jun 2008 at 9:50am
Thanks, I'll check it out (I'm building a RAS 2008 virtual machine as I write this. No better time than the present to get my hands dirty...)
 
I talked to one of the developers a few weeks ago about RAS functionality and he was asking me what I thought it needed versus what it currently has (they are trying to beef it up). So if you wanted to put together a list in the 'New Features' section of the forum, I know that they come to the website periodically to check it out. But you have to be specific with requests, because they don't pay as much attention to generic complaining. Also put 'RAS 2008' in the header so that it's clear what it applies to.
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
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 25 Jun 2008 at 10:13am

One thing that occurred to me is that the new RAS API gives you complete control to create a report from scratch. The only way for this to be possible is for there to be a property which gives r/w access for every aspect of a report. Thus, if it is part of a report, you should be able to reference/change it. Thus, it has to be in the object model SOMEWHERE.

Also, in the earlier comment you said that obj is a ReportObject. Have you looked at ReportDocument.ReportClientDocument yet? This is the object which gives you access to the full report creation API (RCAPI). If you haven't tried this one yet, it might be a better route to take.
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
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 25 Jun 2008 at 5:17pm
I spent the afternoon setting up a RAS 2008 virtual machine and I still can't get it working. There isn't any documentation on how to get it setup and working. Everything I find is with for RAS 9 (many years out of date) or XI. The XI samples should work, but that is assuming that RAS is installed properly. So I'm having a heck of a time with this.
 
Also, for what you are doing, I'm thinking that you are using the improved object model that gets installed with CR 2008, but you're not using the RAS. The RAS is completely separate from the .NET API and gives you ten times more functionality. Is this true?
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
epaga
Newbie
Newbie


Joined: 18 Jun 2008
Online Status: Offline
Posts: 15
Quote epaga Replybullet Posted: 25 Jun 2008 at 11:46pm
Well I'm using the ReportDocument.ReportClientDocument and then working my way from there...

Haven't heard of the RCAPI yet, so I'll look into that.

Yeah the documentation is really, really sparse, the object model is huge, but as you can see there are certain things missing.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 26 Jun 2008 at 8:05am
You're doing it right then. RCAPI is just the old acronym for this. I can't get mine to work at all and I'm debugging it now. When I do the following line:

rcd = rd.ReportClientDocument;

I get the error:
"The ReportClientDocument property can only be accessed when the report is opened using a Report Application Server".

It's making me crazy....
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
Page  of 2 Next >>
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.016 seconds.