Hey tehre infragistics team,
I am currently testing your new Reporting Solution...which is of to a great start...but still lacks in a lot of fields. Well, for now I want to do the following:
I use Visual Studio 2010 and created two reporting files (*.igr) within my project.
I formatted those reports and create a simple dialog with the UltraWinReportViewer Control.
I can now bind a report to the Report Viewer.... but what i basicly want is to bind more then one report to the viewer (ut only one at a time)
What I wish for is to call my dialog something like this:
Dim _dlg as new dlgReportViewer("order.igr")
Dim _param As New Infragistics.Win.UltraWinReportViewer.Parameter()
_param.ParameterName = "Order_ID"
_param.ParameterValue = m_Order.ID
_dlg.ReportViewer..Parameters.Add(_param)
_dlg.ShowDialog()
and ....voila! I can bind a report by using my constuctor.... unfortunately it seems I need to create one Reporting Dialog for each report file....which would be seriously stupid....and knowing the intelligent people at Infragistics I just know there must be a better way to do this.
Let me ask you one more thing: Where do you wish to go with your Reporting Solution? It has a lot of great features allready but is missing pretty basic things too (Grid-Lines for better alignment, resizing the grid-cells for better aligning, vertical lines, rtf-support, more charts, ...)
I wish you best of luck with this product and hope for a quick reply.
ChaosC0der
Found a quick and dirty solution:
Let the ReportViewer Dialog accept a string which is the path to the report file.
Let the ReportViewer Dialog accept a ID of the Object that will be used as a DataSource.
In the Load of the ReportViewer Dialog do it like this:
Select Case m_file Case "Crafting.igr" Dim _param As New Infragistics.Win.UltraWinReportViewer.Parameter() _param.ParameterName = "Crafting_ID" _param.ParameterValue = m_id urvDefault.Parameters.Add(_param) Case "Order.igr" End Select urvDefault.RenderSettings.DefinitionUri = New Uri(m_file) urvDefault.PerformAutoScale()Yeah yeah, I know, this is 100% dirty ...but I just wanted to test if it is possible like this....and it seems it is.
Nope...doesnt work at all...sry :(
Need help, thx
Hello,
I see you already found a way of doing this, for future reference here is a snippet on how to instantiate Client & Server rendering settings, when setting this property the viewer.will automatically try to render and refresh its view.
...
// Server RenderSettings
xamReportViewer1.RenderSettings = new ServerRenderSettings{
DefinitionUri = new Uri("MyAssembly;component/MyReport.igr", UriKind.RelativeOrAbsolute),
ServiceEndpointUri = new Uri ("/ReportService.svc", UriKind.RelativeOrAbsolute));
// Client RenderSettings
xamReportViewer1.RenderSettings = new ClientRenderSettings{
DefinitionUri = new Uri("MyAssembly;component/MyReport.igr", UriKind.Relative)
};
Regards,
Miguel
Got it to work by setting the DefinitionUri like this:
urvDefault.RenderSettings.DefinitionUri = New Uri("reporting\" & m_file, System.UriKind.Relative) really dirty, but works. Will clean it in a few ;)