MySQL recordset data not displating in Fast Reports for Harbour Master Databand

edited 6:45PM in FastReport 4.0
I am using Sergey Spirin Fastreport for my Harbour applications so far, but now a days Harbour new version not supporting Sergey Spirin Fastreport. So I am planing to change reports into xailer fastreport. For that, I downloaded the demo version for testing. In my case, I am using a MySQL Database ADO record set and SetUserDataset function for reports in Sergey Spirin Fastreport and same code used in xailer fastreport. In xailer fastreport design, data window shows data sets with all fields / columns. Drag the fields /columns into a master data band and run preview it not showing data. But in this case, ADO Table data set and drag the fields / columns into the master data band, then it shows the value while previewing. Following code used for reporting.
cSQL :="Select * from Branches"
oRs := FW_OpenRecordSet(oConnection, cSQL)

oFrPrn := frReportManager():new()

With Object oFrPrn

    :SetUserDataset("Branch",MySqlFields(oRs),;
                   {|| If(!oRs:BOF() .OR. !oRs:EOF() ,oRs:MoveFirst() ,)} ,;
                   {|| oRs:MoveNext()} ,;
                   {|| oRs:MovePrev()} ,;
                   {|| oRs:EOF() },;
                   { | aField |  oRs:Fields(afield):Value }) 

                  
    :LoadFromFile("Branch.fr3")    
    
     :DesignReport()
     :DestroyFr()    
  
End With


*---------------------------------------------------------------------------------------------*
Function MySqlFields( oRs ) /* Generating Fast Reports Data fileds from Recordset*/
*---------------------------------------------------------------------------------------------*
Local cField := ""
Local I
Local nLen

nLen := oRs:Fields:Count()-1

For i := 0 To nLen

cField := cField + iif(oRs:Fields(i):Name='Photo',oRs:Fields(i):Name+'^b',oRs:Fields(i):Name)+ iif( i < nLen ,";","" )
    
Next    
    
Return cField

Please help me to solve this issue.

Comments

  • gpigpi
    edited 6:45PM
    Does your Branch dataset enabled in the FR (menu Report-Data)?
    Ask xailer fastreport developers about :SetUserDataset usage
  • edited 6:45PM
    gpi wrote: »
    Does your Branch dataset enabled in the FR (menu Report-Data)?

    Yes, Dataset listed in Data Tree window.

    gpi wrote: »
    Ask xailer fastreport developers about :SetUserDataset usage

    In which forum or topic?
  • gpigpi
    edited 6:45PM
    wrote:
    In which forum or topic?
    http://www.xailer.com

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.