Telerik Forums
Reporting Forum
9 answers
399 views
Hello,

For a new project we are trying tu use the Telerik's ReportViewer control in SILVERLIGHT.
We are using RIA Services/Prism/MVVM/SILVERLIGHT for our project.
ReportViewer is working fine but we needs some parameters in the report to be initialized by user input in the view.
So we need the RenderBegin method to be in the ViewModel and then we need to use a trigger in our view :
View :
<telerik:ReportViewer 
Height="400"
Margin="0,10,0,0"
Visibility="{Binding ViewModel.ReportVisibility, Source={StaticResource ListViewModel}}"
ReportServiceUri="../ReportService.svc"
Report="Jet2.Server.ReportLibrary.ReportTest, Jet2.Server.ReportLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
ZoomMode="PageWidth">
    <interactivity:Interaction.Triggers>
        <interactivity:EventTrigger EventName="RenderBegin">
            <infrastructureCommands:InvokeDelegateCommandAction Command="{Binding ViewModel.RenderBeginCommand, Source={StaticResource ListViewModel}}"                                                           CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=InvokeParameter}" />
        </interactivity:EventTrigger>
    </interactivity:Interaction.Triggers>
</telerik:ReportViewer>
ListViewModel comes from a ViewModelHelper, and Interactivity from System.Windows.Interactivity

The ViewModel:
//The Command
public DelegateCommand<RenderBeginEventArgs> RenderBeginCommand { get; private set; }
  
//In the ViewModel Constructor:
this.RenderBeginCommand = new DelegateCommand<RenderBeginEventArgs>(this.BeginRenderReport);
  
//The RenderBegin Method:
private void BeginRenderReport(RenderBeginEventArgs rbea)
{
    rbea.ParameterValues["CompanyId"] = this.CurrentCompany.Id;
}

With all this code, the RenderBegin Method is not called... So, does the interactivity trigger and the renderbegin method can work together ?
We can't use reportviewer without parameters in our report...

Thanks for your help.

FYI: Triggers are working fine in all of our project, for button events or combobox event or dataform events...
Rob Ainscough
Top achievements
Rank 1
 answered on 19 May 2014
1 answer
117 views
I'm building a report that uses a subreport in the report header.  This subreport will only occasionally contain data, so I have used this link to help me hide the subreport when it has no data, and this works fine.  However, I also want to force the subreport to be on its own page when it is visible, but I can't figure out the appropriate binding to make this happen. 

For the reportHeader section (that contains the subreport), I already have the following binding:

Property Path: Height
Expression:  = "1px"

I want to add

Property Path: PageBreak
Expression:  = IIF(???, PageBreak.After, PageBreak.None)

I tried  setting ??? to ReportItem.Height > "1px", but that caused error "Cannot perform '>' on Telerik.Reporting.Drawing.Unit and System.String.
I tried setting ??? to ReportItem.subreport2.Visible  that caused error object subreport2 not defined in the current context.

What is the correct binding code to detect if the subreport was visible or not?

Alternatively, in code I have tried

var rptBook = new ReportBook();
var rpt1 =
new MyReport1();
if (rpt1.Report.Visible) rptBook.Reports.Add(rpt1);
var rpt2 =
new MyReport2();
rptBook.Reports.Add(rpt2);

but this doesn't work, because the report hasn't executed when I test the Visible property.  Can I do something differently to make it work this way?

Thanks







Nasko
Telerik team
 answered on 19 May 2014
5 answers
92 views
I am trying to represent nested data in a report. The data structure just likes Master View and Detailed Tables in Radgrid.
Put simply,how to show the data in a report which has a relationship like Order and Order Details.
I've tried many ways to achieve it but never success.
I know how the demo Invoice works,but I can't modify it to achieve my goal.
I wish some one could help to get through this.
Thanks in advance.
Stef
Telerik team
 answered on 19 May 2014
5 answers
4.0K+ views
Hi..
     Sir now i had doubt in displaying 3 fields in a single text box., I am used can grow property also.,
but i didn't get a clear output.,i must need the line break keyword  like "/n" or some other//

Example :

             i need output as

                    Bill No,
                    Bill Name,
                    Narantion...
in a single textbox...
I want to break the line automatically when 1 field ends & the 2nd field must display in the new line..


or

Give any tips to decrease or increase the height of detail band in the run time..

Thanks

By
Suriya
Hinata
Top achievements
Rank 1
 answered on 19 May 2014
1 answer
169 views
Hello,

The issue is related to a Silverlight Application which uses Telerik reports to show data concerning the products selected to be displayed.
The data is collected from an SQL database, the product images are rendered in Telerik pictureBox controls.  
Using HTTP, the images are displayed correctly.
Using HTTPS, the images are not displayed at all, the other data in the text boxes appears correctly. 

Thank you for your suggestions.

Cristian
Hinata
Top achievements
Rank 1
 answered on 19 May 2014
3 answers
98 views
I am very new to Telerik and am currently just evaluating it as a possible reporting solution. Please bear with me.

Here is a basic example of what I am trying to do:

I have a Panel. Inside the Panel is a Shape. Inside the Shape are some TextBoxes. I am using the Shape to frame some TextBoxes (for visual organization). The Panel grows with the TextBoxes, but the Shape does not. So on some records, some of the data in the TextBoxes bleeds over the Shape.

What I would like to do is to have the shape grow/shrink with each record - basically, resize the Shape in relation to the Panel for *each record* that gets rendered. One thing I tried was to Anchor the Shape to the Panel. That has resulted in limited success. So I assume I may have to do this through code(?).

If anyone could point me in the right direction (documentation/examples/etc), I'd really appreciate it. I've been searching for hours and have only come up with out-dated code examples that don't align with the current API.

Thanks in advance!

Paul
Nasko
Telerik team
 answered on 19 May 2014
1 answer
83 views
Hi,

We have a report with 300+ columns and there are 3000 records. The report takes over 15 minutes to render into Excel. (We are not talking about time from server to browser here). This is on local machine.

Anyone has idea is whether this slowness is due to high number of columns? We checked the SP that it returns the data very fast. 

Thanks
Piyush Bhatt


Hinata
Top achievements
Rank 1
 answered on 19 May 2014
1 answer
185 views
I'm attempting to export to a memorystream not filestream.  It works fine when there's a single stream.  But I'm also trying to export to a multi-document format.  bmp or png.  When I export to this format I only get the first page of the report.  I did try combining the bytes from each stream but still only get the first page.  Would appreciate any help you can provide.

http://www.telerik.com/help/reporting/programmatic-exporting-report.html

Hinata
Top achievements
Rank 1
 answered on 19 May 2014
1 answer
125 views
In our report we had added two subreports which show up for each row returned by the main report.
We populate rest of the data depending on the main report in the subreports.
And when we export to csv the o/p has rows against each field in the subreports too. But it is not mapped correctly.
For eg: in Main report if I have two rows corresponding to  Employees : Raj and Jaya
The data in the subreport shows the Company Name. For Raj its Wipro and Jaya its TCS
When exported to csv the company Name for both the employees shows as Wipro. Is this an issue related to having subreports when rendering to csv.
Please suggest a solution asap....
Stef
Telerik team
 answered on 16 May 2014
3 answers
80 views
Our HTML5 implementation is working very nicely, but we have requests to perform different visual effects on the web page once the report is done rendering. 

Would it be possible to have a way to hook into the onReportLoadComplete event when we instantiate the reporting object (telerik_ReportViewer)?

$("#reportViewer1").telerik_ReportViewer({
      serviceUrl: "../api/reports/",
      templateUrl: 'src/templates/telerikReportViewerTemplate.htmll',
      reportSource: { report: "product catalog.trdx" },
      onReportLoadComplete : function(e){
              // our code run here
       }
});


Thank you
Stef
Telerik team
 answered on 16 May 2014
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?