passing parameters to active reports

I have an asp.net app developed with vs2008 and vb.net. 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.

Thanks
jbh_blueAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

samtran0331Commented:
what I do is on the active report's codebehind I have a public variable that is a datatable...so 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 reports...so 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
rpt.Run(False)

0
jbh_blueAuthor Commented:
Samtran0331,
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.
0
samtran0331Commented:
Sorry, I should've explained that better...it'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.

0
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

samtran0331Commented:
>>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 control...so 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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.

0
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.