Report calling conventions/doco  Topic is solved

Support for Crystal Reports within Jiwa.

Report calling conventions/doco

Postby neil.interactit » Wed Apr 08, 2015 9:24 am

I am working through some requirements involving various Crystal Reports mods - in some cases needed to source additional data.

I have been looking through both the forums and doco, but haven't been able to locate the info I need. I notice in another post mention of some formulas that are set (Pass_DebtorID, etc) but I can't find the doco specifying what is passed in all the various Jiwa reporting situations and scenarios.

I could spell out my specific requirement this time around and no doubt sort it quickly, but then I'd need to ask again for the next one ... if possible, could you point me toward the reference/API/whatever, and hopefully I can then sort without needing to trouble you (well, too much at least!).

Cheers,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Report calling conventions/doco  Topic is solved

Postby Scott.Pearce » Mon Apr 13, 2015 12:17 pm

Some (slightly outdated) information is available from here.

In your original post you alluded to wondering which formula fields Jiwa will set for you. You will have to look at standard report for the form of interest for clues. Often it is the "Pass_XXXID" or "Pass_XXXXDocumentNo" formula that gets given a value (which then flows through to the stored procedure parameter of the same name minus the prefix "Pass_"). Sometimes a record selection string is simply inserted into the record selection formula property of the report object.

There are also some "special" fields that Jiwa will populate when found in a Crystal report:

Code: Select all
For Each lCrystalFormula In m_CrystalReportObject.DataDefinition.FormulaFields
                Found = True
                Select Case lCrystalFormula.Name.ToUpper
                    Case "PASS_DSN"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ConnectionString & "'"
                    Case "PASS_USER"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.JiwaLoginUserName & "'"
                    Case "PASS_COMPANYNAME"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyName", "'Jiwa Financials'") & "'"
                    Case "PASS_COMPANYPHONE"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyPhone", "''") & "'"
                    Case "PASS_COMPANYFAX"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyFax", "''") & "'"
                    Case "PASS_COMPANYADDRESS1"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyAddress1", "''") & "'"
                    Case "PASS_COMPANYADDRESS2"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyAddress2", "''") & "'"
                    Case "PASS_COMPANYADDRESS3"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyAddress3", "''") & "'"
                    Case "PASS_COMPANYADDRESS4"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyAddress4", "''") & "'"
                    Case "PASS_COMPANYEMAIL"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyEmail", "''") & "'"
                    Case "PASS_COMPANYWEBSITE"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyWebSite", "''") & "'"
                    Case "PASS_COMPANYACN"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyACN", "''") & "'"
                    Case "PASS_COMPANYABN"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("System", "CompanyABN", "''") & "'"
                    Case "PASS_APPLICATIONDATE"
                        lCrystalFormula.Text = Trim("Date(" & Year(JiwaApplication.Manager.Instance.Database.SysDateTime) & ", " & Month(JiwaApplication.Manager.Instance.Database.SysDateTime) & ", " & Day(JiwaApplication.Manager.Instance.Database.SysDateTime) & ")")
                    Case "PASS_APPLICATIONDATETIME"
                        lCrystalFormula.Text = Trim("Date(" & Year(JiwaApplication.Manager.Instance.Database.SysDateTime) & ", " & Month(JiwaApplication.Manager.Instance.Database.SysDateTime) & ", " & Day(JiwaApplication.Manager.Instance.Database.SysDateTime) & ")")
                    Case "PASS_SYSTEMDATE"
                        lCrystalFormula.Text = Trim("Date(" & Year(Today) & ", " & Month(Today) & ", " & Day(Today) & ")")
                    Case "PASS_SYSTEMDATETIME"
                        lCrystalFormula.Text = "'" & Today.ToLongDateString & "'"
                    Case "DELDOC"
                        For Each m_JiwaPrintFormula In m_JiwaPrintFormulaCollection
                            If UCase(m_JiwaPrintFormula.Name) = "DELDOC" Then
                                lCrystalFormula.Text = m_JiwaPrintFormula.NewContent
                            End If
                        Next m_JiwaPrintFormula
                    Case "PASS_PARAMETERPROMPTING"
                        If UCase(Replace(lCrystalFormula.Text, """", "")) = UCase("True") Then
                            lEnableParameterPrompting = True
                        ElseIf UCase(Replace(lCrystalFormula.Text, """", "")) = UCase("False") Then
                            lEnableParameterPrompting = False
                        End If
                    Case "PASS_KITROUNDINGINVENTORYID"
                        lCrystalFormula.Text = "'" & JiwaApplication.Manager.Instance.Database.ReadSysData("InvoicingParams", "KitRoundingPart", "''") & "'"
                    Case Else
                        Found = False
                End Select

                If Found = True Then
                    lErrorFlag = False
                    lFormulaErrorMessage = ""
                    lCrystalFormula.Check(lFormulaErrorMessage)
                    If Trim$(lFormulaErrorMessage).Trim.Length > 0 Then
                        Throw New Exception(lFormulaErrorMessage & " (" & lCrystalFormula.Name & ")")
                    End If
                End If
            Next lCrystalFormula


Also note that Jiwa 7 looks for a formula that has been given the name of "JiwaRanges" for range parameter information. The aforementioned help link is for Jiwa v6, and Jiwa v6 looks in the "Record Selection Formula".

Other than that you'll have to ask specific questions here on the forums until the technical documentation for reporting gets updated.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 743
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221


Return to Crystal Reports

Who is online

Users browsing this forum: No registered users and 3 guests