jbh_blue
asked on
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
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
ASKER
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.
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
Imports DataDynamics.ActiveReports
Also, I should have mentioned that I'm using the webViewer to display the report.
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 .HtmlExpor t
Imports DataDynamics.ActiveReports .Export.Pd f
Imports DataDynamics.ActiveReports .Export.Xl s
Imports DataDynamics.ActiveReports .Export.Ht ml
Imports DataDynamics.ActiveReports .Export.Te xt
Imports DataDynamics.ActiveReports .Export.Rt f
Imports DataDynamics.ActiveReports .Export.Ti ff
Imports DataDynamics.ActiveReports .Web
Imports ActiveReportsAssembly
The last one of course is my "assembly" project.
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
Imports DataDynamics.ActiveReports
Imports DataDynamics.ActiveReports
Imports DataDynamics.ActiveReports
Imports DataDynamics.ActiveReports
Imports DataDynamics.ActiveReports
Imports DataDynamics.ActiveReports
Imports DataDynamics.ActiveReports
Imports ActiveReportsAssembly
The last one of course is my "assembly" project.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, i can't help but think there's a better way, but putting it in table and joining to it will work.
ASKER
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
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.MyRe
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)