passing parameters to active reports

I have an app developed with vs2008 and I'm using Data Dynamics Activereports for reporting.

I can't find an example of how to pass a parameter to the SQL view that I'm using to populate the report. Does anyone have a link or example of how to do so? I don't want to prompt the user from a dialog like the examples/walkthroughs on their site do, but pass the parameter dynamically.

Who is Participating?
>>Also, I should have mentioned that I'm using the webViewer to display the report.

My app has to work on all major browsers (IE, FF, Safari, Opera)...and if I remember correctly...their WebViewer control was an ActiveX I'm not using their WebViewer control, but it shouldn't make a difference....
The bottom line is being able pass a loaded datatable to the ActiveReport report...and having a datatable as a public variable or property on the AR report codebehind and being able to get a reference and instantiate the report from the aspx is all that is needed.
what I do is on the active report's codebehind I have a public variable that is a for example, I have an active report named MyReport, in the codebehind:

    Public DtReport As DataTable

then from the aspx page, you can use any amount of paramaters you want to populate a datatable...then you just assign the dt on the aspx page to the dt on the active on the aspx:

    Dim  rpt
    rpt = New ActiveReportsAssembly.MyReport

   Dim DtOnPage as new datatable
'do anything you need to with parameters to populate DtOnPage
'then since DtReport is public, you can:

rpt.DtReport = DtOnPage

jbh_blueAuthor Commented:
thanks for the quick response.

what imports are you using, because I can't find ActiveReportsAssembly. I checked in the object browser and couldn't find it either.

I have
Imports DataDynamics.ActiveReports
Imports DataDynamics.ActiveReports.Document
Imports DataDynamics.ActiveReports.Web

Also, I should have mentioned that I'm using the webViewer to display the report.
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Sorry, I should've explained that's kind of key to making what I posted work...

My solution in Visual Studio has the Web App as one project and in another project I named ActiveReportsAssembly I have all the Active Reports.
Then, in the Web App, I added a reference to my Active Reports project (the ActiveReportsAssembly)...
On the aspx codebehind, I have the following references:
Imports DataDynamics.ActiveReports.HtmlExport
Imports DataDynamics.ActiveReports.Export.Pdf
Imports DataDynamics.ActiveReports.Export.Xls
Imports DataDynamics.ActiveReports.Export.Html
Imports DataDynamics.ActiveReports.Export.Text
Imports DataDynamics.ActiveReports.Export.Rtf
Imports DataDynamics.ActiveReports.Export.Tiff
Imports DataDynamics.ActiveReports.Web
Imports ActiveReportsAssembly

The last one of course is my "assembly" project.

jbh_blueAuthor Commented:
thanks, i can't help but think there's a better way, but putting it in table and joining to it will work.

jbh_blueAuthor Commented:
thanks, but I can't help but think there's a better way than putting it in a table and joining to it, but that worked. there has to be a way to pass it in to the .vb file
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.