Home Forums CoreObjX / DB Where are my post going?

This topic contains 5 replies, has 2 voices, and was last updated by  gbronson 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #64573

    gbronson
    Premium Member

    Trying to post to this forum and they don’t make it here.

    #64574

    gbronson
    Premium Member

    Now this one worked – Hmmmm

    #64575

    gbronson
    Premium Member

    Okay i give up. My forum post with code on them won’t show up. I’m pasting it here to see if it shows up.

    How frustrating!!

    I’m using the trial in a C# Windows Application. I can connect to the QB database. I am attempting to return data from a report i normally run in OpenSync. Its the Profit and Loss Budget Overview Report. Here is the code i used which i had to figure our on my own using some samples from this forum and trying to figure it out on my own.

    It returns the following XML

    "<BudgetSummaryReportQueryRq><BudgetSummaryReportType>ProfitAndLossBudgetOverview</BudgetSummaryReportType><FiscalYear>2018</FiscalYear><ReportClassFilter><FullName>Inn:Rooms</FullName></ReportClassFilter></BudgetSummaryReportQueryRq>

    Its not returning any data. Are there any decent C# examples on how to return the data using this product?

    #64584

    Yudel Rosales
    Keymaster

    Private Sub Command2_Click()

    Dim rep As Report
    Dim iRpt As Integer

    ‘ Create new report object and set the base report
    If Combo1.ListIndex < 0 Then MsgBox "Please select report" Exit Sub End If iRpt = Combo1.ListIndex + 1 Set rep = New Report rep.BaseReport = iRpt ' Set the date span. rep.DateMacro = DateMacroCustom rep.StartDate = Text1(0).Text rep.EndDate = Text1(1).Text ' Set Account Filters, entities and items work the same way With rep.Filters For i = 0 To List3.ListCount - 1 If List3.Selected(i) Then .AccountFilter.FullNames.Add List3.List(i) End If Next .AccountFilter.WithChildren = (Check1.Value <> 0)
    For i = 0 To List7.ListCount – 1
    If List7.Selected(i) Then
    .AccountFilter.TypeFilter = EVal(List7.List(i), qoeReportAccountFilters)
    End If
    Next
    End With

    ‘ Set the transaction filters
    With rep.Filters
    For i = 0 To List6.ListCount – 1
    If List6.Selected(i) Then
    .TxnTypes.Add EVal(List6.List(i), qoeTxnType)
    End If
    Next
    End With

    ‘ Set the desired columns
    Set Cols = rep.ColumnHeaders
    For i = 0 To List2.ListCount – 1
    If List2.Selected(i) Then
    Cols.Add EVal(List2.List(i), qoeReportField)
    End If
    Next

    ‘ Get the report
    rep.Refresh

    ‘ Paint it in the gris
    With MSFlexGrid1
    curRow = 0

    .Clear
    .Rows = 1500
    .Cols = rep.ColumnHeaders.Count

    For i = 1 To rep.ColumnHeaders.Count
    Set colHdr = rep.ColumnHeaders.Item(i)
    .Row = curRow
    .Col = colHdr.ID – 1
    .Text = colHdr.Title
    Next

    For i = 1 To rep.ReportRows.Count
    curRow = curRow + 1
    Set oRow = rep.ReportRows.Item(i)
    .Row = curRow
    If oRow.RowType = 1 Then
    .Col = 0
    .Text = oRow.Text
    Else
    For j = 1 To oRow.Columns.Count
    Set oCol = oRow.Columns.Item(j)
    .Col = oCol.ID – 1
    .Text = oCol.Text
    Next
    End If

    Next
    End With

    End Sub

    #64585

    Yudel Rosales
    Keymaster

    That code is to retrieve report. It is a vb6, but still decent. Attached is the form. So you will have a better idea.

    Attachments:
    You must be logged in to view attached files.
    #64609

    gbronson
    Premium Member

    Can’t post replies with code

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.