Results 1 to 6 of 6

Thread: Suggestion & one problem detected with RDS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Panama City, Panama
    Posts
    1,219

    Default Suggestion & one problem detected with RDS

    Hi! VRW Alpha II

    Suggestion: I want to be able to copy a text object from one report to the other.

    Question: is it possible to relate an RDS table with a sql table? (I get an "Only one database per table allowed")

    Problem: with RDS, I just created just ONE (1) record and look at the generated report in the attached image.

    Thanks in Advanced.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	RDS showing two records in the preview instead of one.jpg 
Views:	102 
Size:	116.0 KB 
ID:	6479  

  2. #2
    Join Date
    May 2013
    Location
    Hengelo, the Netherlands
    Posts
    12
    Blog Entries
    2

    Default Re: Suggestion & one problem detected with RDS

    Hi Boris

    For your question, use a subreport for the RDS table (fill the RDS by previewing the subreport once)
    see attachment how to pass a ID from SQl to the subreport/RDS.

    I can't reproduce the problem that you have, can you attach the report ?

    with Kind Regards
    Bénar
    Attached Files Attached Files

  3. #3
    Join Date
    Feb 2009
    Posts
    130

    Default Re: Suggestion & one problem detected with RDS

    Hi Boris,

    I'm guessing you have an empty row in the RDS sample data grid which will result in an empty record.

  4. #4
    Join Date
    Feb 2009
    Location
    Panama City, Panama
    Posts
    1,219

    Default Re: Suggestion & one problem detected with RDS

    I just opened VRW and double checked and I don't have an empty record.

  5. #5
    Join Date
    Feb 2009
    Location
    Panama City, Panama
    Posts
    1,219

    Default Re: Suggestion & one problem detected with RDS

    Ulbe

    I just found out that I had 6 empty records (which I don't know how they got there) but it was impossible for me to detect it because the Runtime Datasource Data dialog only showed me the first record and there was not way to see this empty records.

    I found out in a bizarre way, because I added a "Page N of M" field in the header and it showed Page 1 of 7.

    There should be a better way to show us this empty records.

    Thanks for pointing me in the right direction.

  6. #6
    Join Date
    Feb 2009
    Posts
    1,084

    Default Re: Suggestion & one problem detected with RDS

    Boris,
    I have the following in my RDS reports which will dump the contets after I load it, before it's reported... WARNING, it's not pretty or elegant code....

    Code:
            Procedure LoadRDSData String sReportId Integer iLevel
                Variant[][] vData
                Integer iElements iElement iSubReports iSubReport
                Integer i j iDim1Size iDim2Size
                Integer iCount iChOut
                tVRWTableName[] ReportTableNames
                String sSubReportId sFilename
    
                Get RDSTableNames sReportId to ReportTableNames
                Move (SizeOfArray (ReportTableNames)) to iElements
                If (iElements > 0) Begin
                    Decrement iElements
                    For iElement from 0 to iElements
                        Get AddRDSData ReportTableNames[iElement].sTableName iLevel to vData
                        // Right here is where we want to dump the data
    
                        // retrieve size of outer (leftmost) dimension
                        Move (SizeOfArray(vData)) to iDim1Size
                        // retrieve size of inner (2nd) dimension
                        If (iDim1Size > 0) Begin
                            Move (SizeOfArray(vData[0])) to iDim2Size
                        End
                        //Send Info_Box ("Array is" * (String(iDim1Size)) * "by" * (String(iDim2Size))) "Size"
                        // dump the array's contents
                        Move "C:\Arraydump2.txt" to sFilename
                        // obtain an available channel for output
                        Move (Seq_New_Channel()) to iChOut
                        // no channel available 
                        If (not(iChOut=DF_SEQ_CHANNEL_NOT_AVAILABLE)) Begin
                            // Create a text file. Replaces the file if it already exists.
                            Direct_Output channel iChOut sFileName
        
                            For i from 0 to (iDim1Size-1)
                                For j from 0 to (iDim2Size-1)
                                    Write channel iChOut vData[i][j]
                                    Write channel iChOut ", "
                                Loop
                                Writeln channel iChOut ""
                                //Showln  // go to next line for next row
                            Loop
                            // close output channel 
                            Close_Output channel iChOut
                            // release channel for reuse 
                            Send Seq_Release_Channel iChOut 
                        End 
                        Else Begin
                            Send Info_Box "No Channel Available for Output - File not created" "Error"
                        End
                        Send TableData sReportId ReportTableNames[iElement].iTable vData
                    Loop
                End
    
                Get SubReportCount sReportId to iSubReports
                If (iSubReports > 0) Begin
                    Decrement iSubReports
                    For iSubReport from 0 to iSubReports
                        Get SubReportId sReportId iSubReport to sSubReportId
                        Send LoadRDSData sSubReportId (iLevel + 1)
                    Loop
                End
            End_Procedure

Posting Permissions

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