Telerik Forums
Reporting Forum
2 answers
143 views

Hi guys, 

I know this has been asked in different ways before but what I'm looking to do is dynamically assign a reports datasource at runtime. Within this report will be a subreport, generated for every record of the datasource.

So my example would be by having a absence report for employees. The parent report will be bound to a list of employee object, in which there will a list of absences of type absences. This list is what I want to bind to a sub report. (see code below)

I've been going through a couple of other similar question on here and trying to figure out the best way.  

What I have is a sub report with the bindings 

Property Path                        Expression

DataSource                            =ReportItem.Absences

I found the documentation a little unclear in what is the datasource is and what is the properties being displayed. So any and all help is greatly appreciated.

 

public Class Employee{
public string EmployeeName {get; set;}
public string EmployeeNumber {get; set;}
public List<Absence> Absences {get; set;}
}
 
public Class Absence{
public DateTime AbsenceDateFrom{get;set;}
public DateTime AbsenceDateTo{get;set;}
public string AbsenceReason{get;set;}
}

Will
Top achievements
Rank 1
 answered on 04 Jun 2015
4 answers
119 views

The documentation for reporting helps you to configure reports for MVC 4. Will someone give me instructions for setting up my MVC 5 project. I tried following the instruction for MVC 4 but am getting reference errors for assemblies that are not defined.

 

Thanks in advance.

Stef
Telerik team
 answered on 04 Jun 2015
4 answers
203 views

I have multiple reports which I have built that I accidentally removed the headers.  I would drag the table onto the report body, and fill in the detail section with fields.  I would then add a group above, add another group above, etc.  Finally, there was an open row at the top which was not needed so I deleted it.  I now realize that this was the header.

 I want my headers to repeat on each page of a report that spans more then one page.  But the 'RowHeadersPrintOnEveryPage' isn't functioning.  I think this may be because I had removed the table header row on accident.

Does anyone know how to fix this?  Can I set a property to make a certain row the header?  Do I have to completely re-build?

Any help is greatly appreciated.

Phil
Top achievements
Rank 1
 answered on 03 Jun 2015
9 answers
444 views
I'm using Telerik Reporting 7.0.13.220.

When I create an HtmlTextBox on a report and set the CanGrow property to true, it will output the following HTML/CSS in the web viewer:

.s6 {font-family:Segoe UI;font-size:11px;color:Black;word-wrap:normal;white-space:nowrap;padding-left:0px;padding-right:1px;padding-top:0px;padding-bottom:-2px}

<div title="" class="commsHtmlBox s6" style="position:absolute;overflow:hidden;left:634px;top:69px;width:363px;height:77px;">
  <div class="html-root" style="margin-top:0px;">
    <p class="s1">content</p>
  </div>
</div>

When the white-space attribute is set to "nowrap" longer lines in the HtmlTextBox are cut off and do not display properly.  When I remove the white-space attribute using Chrome's developer tools, the content displays correctly.  Since this CSS is coming from an .axd request and is generated from the web viewer's iframe, I cannot override this value.  Is there a workaround for this?

Stef
Telerik team
 answered on 02 Jun 2015
4 answers
321 views

Hello ,

While creating a report we are using Font style to create a smiley but it's not working for the first data. it's working for other data.

we are  using

  public static void SetGradeConfiguration(ref Telerik.Reporting.Processing.TextBox textBox,Organization organization)
        {
            textBox.Style.Font.Name = "Lean Symbol";

------------

to apply a font style. please reply ASAP. and please check attached image

Nasko
Telerik team
 answered on 02 Jun 2015
5 answers
509 views
Based on one field in report i need to make visible/caluculate the values of other dependent textboxes.
So for this what i have done is Created a custome function.
eg: public static string Test(int idPt)
{
//Logic
if(idPdt==1)
{
textbox2.Value="test2";
textbox2.Visible=true;
}
if(idPdt==2)
{
textbox3.Value="test3";
textbox3.Visible=true;
}
else
{
textbox2.Visible=false;
textbox2.Visible=false;
}
}
But i am not able to access any of the report items in this function. when i remove static modifier for the method then all the items are accessible.

How to acheive this in Telerik Reporting?

Nasko
Telerik team
 answered on 02 Jun 2015
6 answers
359 views
Hi,

I just installed version 5.3.12.119 in my windows 7 machine. Now when I open reports which have a sqldatasource i get this error in the designer

"Object of type 'Telerik.Reporting.SqlDataSourceParameterCollection' cannot be converted to type 'Telerik.Reporting.SqlDataSourceParameterCollection'. "

Not sure how to fix this. I have restarted my machine and tried as well. Need help on this urgently!

Thanks.
Fridli Jacober
Top achievements
Rank 1
 answered on 02 Jun 2015
1 answer
145 views

Hi

I have text value and want to convert this into Small Caps format. Does this supported or not? I do find the functions ToLower and ToUpper but didn't find any solution for Small Caps.

 

Thanks in advance for your help and support.

Regards,

Umar

Stef
Telerik team
 answered on 02 Jun 2015
15 answers
624 views
I'm trying to deploy my ASP.NET MVC app that uses Telerik Reporting.  When trying to run a report on the test server I get an error:

Internal Server Error:
An error has occurred.
Access to the path '8.2.14.1027_ClientsCacheLock' is denied.

Can you provide direction on solving this problem?

Thank you
Timothy William
Top achievements
Rank 1
 answered on 01 Jun 2015
4 answers
426 views

I have a REST services console application which seems to be running successfully, in that I followed the instructions here: 

http://www.telerik.com/help/reporting/telerik-reporting-rest-host-http-service-using-self-hosting.html

and I'm able to serve up the document formats when I use IE to browse to:

http://localhost:8080/api/reports/formats

I have a Windows Form client in which I want to use an HTML5 report viewer, hosted in a System.Windows.Forms.WebBrowser.  

I used the Telerik wizard to add an HTML5 Report Viewer, which I assume added all the necessary references, and created a sample report, and the necessary report viewer in a new html file.  I am setting the url of the WebBrowser to the file location of my new report viewer html file, but I keep getting the following when I load the page:

Error loading the report viewer's templates.

I edited the default javascript to use the following:

 

<script type="text/javascript">
    $(document).ready(function () {
        $("#reportViewer1")
            .telerik_ReportViewer({
                serviceUrl: "http://localhost:8080/api/reports",
                templateUrl: "file://C:\Temp\Code\Reports\bin\Debug\ReportViewer\templates\telerikReportViewerTemplate-9.0.15.324.html",
                reportSource: {
                    report: "file://C:\Temp\Code\Reports\bin\Debug\Reports\SampleReport.trdx",
                    parameters: {
                        Date: new Date(),
                    }
                },
                viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
                scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                scale: 1.0,
                ready: function () {
                    //this.refreshReport();
                },
            });
    });
</script>

Those two files exist at runtime (the template and the trdx file).

This is just proof-of-concept right now, so obviously the moving pieces are not all set.  My thought is that the wizard is designed to set up a Web solution, not a Windows Forms solution, so I'm not set up correctly.

So can anyone suggest anything that might be causing that error?

Thanks,

Eric.

Stef
Telerik team
 answered on 01 Jun 2015
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?