Report run issue .Help me please .Thanks in Advance

Hello Friends, I am using Xojo report that has data source both a class and data from sqlite databse. Now I have an issue that which Run method I need to call ? . We have two format of Run Method that are as below :-

  1. Report.Run(ds as Reports.DataSet, printerSettings as PrinterSetup) As Boolean . This is for data source as Class

2.Report.Run(rs as RecordSet, printersettings as PrinterSetup) As Boolean. This is for data source as sqlite select query result.

Now My issue is that which one to call as I have to run my Report with both the data source.
Please help me Friends . I would be very thankful for you kind help.

that with a class use a interface.
the other use a Rowset (r3.1) query result.
when you use the class call Run with your class.
when you use a database result call Run with your recordset.
if then
select case

Thank you Mr. MarkusR for the suggestion. My Report contains header where data come from a Studentclass that implements Reports.dataset interface and the data of body comes from the RecordSet.

I have to send both the data source to the report . Below is the code I m using ,

// calling Run method with student_object data source

If rpt.Run(student_object, ps) Then
If rpt.Document <> Nil Then
ReportViewer1.SetDocument rpt.Document
End If
End If

dim rs as RecordSet = app.SBGBDB.SQLSelect(“SELECT Scores.Value, Scores.SecondValue, Scores.Name,Scores.ttime ,Scores.IdCartridge,Scores.student_id FROM Scores WHERE Scores.IdCartridge =”+cartId+" AND Scores.student_id="+stuId)
dim rsq as new Reports.RecordSetQuery(rs)

// Calling Run method with RecordSet data source
If rpt.Run(rsq, ps) Then
If rpt.Document <> Nil Then
ReportViewer1.SetDocument rpt.Document

End If
End If

Here only one run method is working that is called first. I am resolving this issue to how to run the single report with both the data source at once. Please help me in solving this issue as I am trying to resolve this issue from last week.

Seeking for your kind help.

Thank you again.

A report can only use on data source of any kind at a time

Thats either a recordset/rowset OR a class that implements the Report.Dataset Interface

IF you need to provide data from a sqlite query & a class of your own at the same time then you need to create a new class that incorporates that data from the other two and that implements the Report.Dataset interface

Then use that to run your report

Thank you very much for the support . I try it now.