Skip to content

Infragistics Community Forum / Cross Platform / Ultimate UI for Xamarin / A single Report Viewer, but multiple reports

A single Report Viewer, but multiple reports

New Discussion
Ingo
Ingo asked on Dec 10, 2017 11:51 AM

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

Sign In to post a reply

Replies

  • 0
    Ingo
    Ingo answered on Feb 7, 2012 8:00 PM

    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.
    • 0
      Ingo
      Ingo answered on Feb 7, 2012 8:04 PM

      Nope…doesnt work at all…sry 🙁

       

      Need help, thx

      • 0
        Ingo
        Ingo answered on Feb 7, 2012 8:23 PM

        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 ;)
      • 0
        Miguel Machado
        Miguel Machado answered on Feb 8, 2012 1:06 PM

        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

  • 0
    Noha
    Noha answered on Feb 22, 2012 9:37 AM

    Here's a solution that could help you. It will be efficient but quite not perfect.

     You could try creating multiple report headers. But you should adjust your headers size so that they fit in one page.


    There's another solution I found here. I hope it helps.

  • 0
    tai tran van
    tai tran van answered on Dec 10, 2017 11:51 AM

    you would:  rptView.Parameters.Clear();

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Ingo
Favorites
0
Replies
6
Created On
Dec 10, 2017
Last Post
8 years, 4 months ago

Suggested Discussions

Tags

Created by

Created on

Dec 10, 2017 11:51 AM

Last activity on

Feb 18, 2026 2:15 PM