SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast lisette's Avatar
    Join Date
    Jul 2004
    Location
    Mumbai
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling Crystal Report in VB.net

    We have a dynamic Report developed in Crystal 10. It is a Summary Report ( Weighted Average). The field and asscociated field used for calculating the weighted average are to be passed to the report. We would like to call this report in VB.net using RAS (Report Application Server), but could not do it.


    The code we used with vb6 with Crystal 8.5 for the same is


    If arr(3) = "S" Then
    Set objSum(i) = m_report.Sections(sumSection).AddSummaryFieldObject(m_report.Sections(DtlSection).ReportObjects(i).Field.name, crSTSum, Locx, 0)
    ElseIf arr(3) = "A" Then
    Set objSum(i) = m_report.Sections(sumSection).AddSummaryFieldObject(m_report.Sections(DtlSection).ReportObjects(i).Field.name, crSTAverage, Locx, 0)
    ElseIf arr(3) = "C" Then
    Set objSum(i) = m_report.Sections(sumSection).AddSummaryFieldObject(m_report.Sections(DtlSection).ReportObjects(i).Field.name, crSTCount, Locx, 0)
    ElseIf arr(3) = "W" Then
    'Set tempfield = m_report.Database.Tables.item(1).Fields.GetItemByName(CStr(arr(5)))
    Set objSum(i) = m_report.Sections(sumSection).AddSummaryFieldObject(m_report.Sections(DtlSection).ReportObjects(i).Field.name, crSTDWeightedAvg, Locx, 0, m_report.Database.Tables.item(1).Fields.GetItemByName(CStr(arr(5))))
    End If





    The code we are using for defining the SummaryType field in vb.net is given below.

    Dim sumField As New SummaryField()
    With sumField


    .SummarizedField = oField
    If blnIsFromGroup = False Then
    .Group = m_report.DataDefinition.Groups.Item(GroupNo)
    End If
    .Operation = CrSummaryOperationEnumcrSummaryOperationWeightedAvg
    .Type = CrFieldValueTypeEnum.crFieldValueTypeNumberField

    End With




    How do we define the other field used for calculating the weighted average ?

    Could we have assistance regarding this problem?

    Thanking You
    Be the change you want to see in the world.

  2. #2
    SitePoint Member
    Join Date
    Apr 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i dont understand what exactly u looking. just give me some more information.

    If u r new in crystal report in vb.net follow this url

    http://vb.net-informations.com/cryst..._tutorials.htm

    http://vb.net-informations.com/cryst...ynamically.htm

    i think it will help you. If you dont get it reply it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •