I'm struggling to get the ABMReport work correctly.
The code to recreated the report is as follows
the app is shown in the following screenshots but when I hit the 'print' button nothing happens.
Any help here would most appreciated.
thanks
The code to recreated the report is as follows
B4X:
Sub msbtn4_clicked(Target As String)
myReport.Initialize("myReport", Me, page, ID, ReportCSS, "")
' 'Log("entering Btn4")
page.CloseModalSheet("fixedsheet")
tblTrans.Visibility= False
Report_Build(page, "myReport")
' refresh the page
page.Refresh
page.FinishedLoading
' restoring the navigation bar position
page.RestoreNavigationBarPosition
tbl1.clear
Loadpallets(1)
End Sub
Sub Report_Build(InternalPage As ABMPage, InternalID As String)
Dim bar As String
Dim date1 As String
Dim cat As String
Dim doc As String
Dim beg As String
Dim bal As String
ABMShared.ConnectNavigationBar(page)
' the report header
Dim ReportHeader As ABMContainer = myReport.Header.InitializeAsContainer(page, "reportheader", "", ABM.PRINT_PAGEBREAK_INSIDE_AVOID)
ReportHeader.AddRows(1,False, "border").AddCells12(1,"")
ReportHeader.AddRows(1,False, "").AddCellsOS(1,0,0,0,9,9,9,"").AddCellsOSMP(1,0,0,0,3,3,3,20,0,0,0,"right")
ReportHeader.AddRows(1,False, "").AddCellsOS(1,0,0,0,7,7,7,"").AddCellsOS(1,0,0,0,5,5,5,"")
ReportHeader.BuildGrid
ReportHeader.CellR(0,1).AddComponent(BuildLabel(InternalPage, "repTitle", "{B} Transactions {/B}", ABM.SIZE_H4, "center", True, ABM.VISIBILITY_ALL))
' the report body
Dim Body As ABMReport
Body.Initialize("Body", Me, InternalPage, InternalID & "body", "", ABM.PRINT_PAGEBREAK_INSIDE_AVOID)
' header of the body
Body.Header.InitializeAsTexts(Array As String("Row", "Barcode", "Date", "Category ", "Document", "Beginning", "Current"), Array As Int(5,10,10,30,25,10,10), Array As String("repheader","repheaderright","repheaderright","repheaderright","repheaderright","repheaderright","repheaderright"), "")
'
For x = 0 To RSList.Size -1
Dim tblF As Map = RSList.Get(x)
bar = tblF.Get("barcode")
date1 = tblF.Get("dbdate")
cat = tblF.Get("category")
If tblF.Get("document1") = Null Then
doc = "N/A"
Else
doc = tblF.Get("document1")
End If
beg = tblF.Get("dbquantity")
bal = tblF.Get("dbvalue")
' create a text block
Dim block As ABMReportBlock
block.InitializeAsTexts(Array As String(x, bar, date1, cat, doc, beg, bal), Array As Int(5,10,10,30,25,10,10), Array As String("repbody","repbodyright","repbodyright","repbodyright", "repbodyright","repbodyright","repbodyright"), "")
Body.AddBodyBlock(block)
Next
myReport.AddBodySubReport(Body)
page.refresh
End Sub
the app is shown in the following screenshots but when I hit the 'print' button nothing happens.
Any help here would most appreciated.
thanks