Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Port Crystal VB6 Code to .NET Crystal API Post Reply Post New Topic
Author Message
keithf1138
Newbie
Newbie


Joined: 15 Jun 2015
Online Status: Offline
Posts: 2
Quote keithf1138 Replybullet Topic: Port Crystal VB6 Code to .NET Crystal API
    Posted: 22 Jun 2015 at 8:24am
So I am moving some Crystal Report logic from VB6 to .NET. For some of the more complex reports the code sets the value for grouping. I figured out how to set the 1st item in the SortFields array. What I cant find is how to set the first item in the GroupSortFields array because well GroupSortFields doesnt exist in the .NET API. I have a number of reports that uses this syntax and need to get the code that invokes them converted. Amazes me that this isnt simply documented, but I havent found anything.

Here is a simplified version of the VB6 code

CR1.ReportFileName = fullPathAndFileNameToRpt
CR1.Connect = dataConnectionString
CR1.ParameterFields(0) = "SortField;" & rptParameter & ";TRUE"
CR1.SelectionFormula = ""{Manager_Category1.List}"="SomeValue""
CR1.GroupSortFields(0) = "Sum({@ABSWeightedValue},{Manager_Category1.Category1})"
CR1.SortFields(0) = "{@ABSWeightedValue}"
CR1.PrinterStartPage = 1
CR1.PrinterStopPage = 1

Also can you tell me what GroupSortFields and SortFields map into the report?


Edited by keithf1138 - 22 Jun 2015 at 8:24am
IP IP Logged
keithf1138
Newbie
Newbie


Joined: 15 Jun 2015
Online Status: Offline
Posts: 2
Quote keithf1138 Replybullet Posted: 26 Jun 2015 at 5:03am
Wow is this such a hack that no one knows how to accomplish the same thing with .NET code. I am just asking not being critical. I inherited this code base and never did a great deal of Crystal Reports work so just looking for some help to get these final few reports executing properly.
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.016 seconds.