Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Creating formula through VB.Net Post Reply Post New Topic
Author Message
KarthickBabu
Newbie
Newbie


Joined: 25 Jul 2012
Location: India
Online Status: Offline
Posts: 9
Quote KarthickBabu Replybullet Topic: Creating formula through VB.Net
    Posted: 26 Jul 2012 at 5:39am
Thanks to all.

Is it possible to add new formula field in CR through vb.net code?
Regards,
KarthickBabu
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 26 Jul 2012 at 8:01am
Yes and no - it can be done through the ReportAppServer SDK which I believe is only available when you have Crystal Server or BusinessObjects installed.  What are you trying to do?
 
-Dell
 
p.s. I moved this post to its own thread as it wasn't really a continuation of the thread where you posted.
IP IP Logged
KarthickBabu
Newbie
Newbie


Joined: 25 Jul 2012
Location: India
Online Status: Offline
Posts: 9
Quote KarthickBabu Replybullet Posted: 26 Jul 2012 at 7:42pm
Thanks for moving the post into separate thread...

I am trying to do write a piece of code. Add new formula fields to add in multiple reports using code.

Regards,
KarthickBabu
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 27 Jul 2012 at 2:58am
So, if I understand you correctly, you're trying to update a set of reports by adding new formula fields.  Is this correct?
 
You could look at the ReportAppServer SDK - the documentation is available at help.sap.com.  There may be a way to use it without Crystal Server or BusinessObjects.  I haven't really used it so I'm not sure.
 
Another way to handle this without actually typing the formulas in to every report would be to add them to one report, place the formula on the report, then copy the object and paste it into the reports where you want the formula.  Pasting the formula object automatically creates the formula if it doesn't exist.
 
-Dell
IP IP Logged
KarthickBabu
Newbie
Newbie


Joined: 25 Jul 2012
Location: India
Online Status: Offline
Posts: 9
Quote KarthickBabu Replybullet Posted: 27 Jul 2012 at 8:38pm
Yes, your understanding is correct.

Thanks for your suggestion hilfy... I will try this way.
Regards,
KarthickBabu
IP IP Logged
KarthickBabu
Newbie
Newbie


Joined: 25 Jul 2012
Location: India
Online Status: Offline
Posts: 9
Quote KarthickBabu Replybullet Posted: 27 Jul 2012 at 8:53pm

One more doubt, Shall we pass optional formula fields to crystal reports? I am using CR in VS 2008 version.
Regards,
KarthickBabu
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 29 Jul 2012 at 11:36am
There is no way to "pass" a formula into Crystal - Crystal can't parse and run a formula that's in data or a parameter, formulas have to be defined in the report itself.  However, if you calculated the value of a field as part of the data set you're connecting Crystal to, that would work.
-Dell
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.023 seconds.