Telerik Forums
Reporting Forum
1 answer
141 views
Hi,

I have a report with the following data strucure
(for each row in data source)
-1 row
- Lots of child rows  in a sub report

Becouse the rows in the sub report occupy lots of pages, you can forget the parent row information.

So what i want to do is to repeat the parent row on each page.

Thanks in advance,

Agustín.



Steve
Telerik team
 answered on 04 May 2012
3 answers
233 views
Hi!

I have a detail section with a vertical line in it. The height of the line is equal to the height of the detail section so that I get a nice line that separates my columns.

However if one of my fields contains to much data and the detail section grows, the line will be separated because the line doesn't grow. Is there a way to set the heigt of my vertical line equal to the height of the detail section?
Steve
Telerik team
 answered on 04 May 2012
0 answers
320 views
I had been struggling for a few days to try and figure out how to do this. I found a few solutions that were partial answers that finally lead me to this. This will print directly to the default printer without stopping for directions. It doesn't require a special view or partial view. It's just clean. I have some cleanup to do on it, but so far it works quite well. Hopefully someone else finds it useful!

I'm using a custom Knockoutjs grid to start the code
@Html.Hidden("Report", Url.Action("Reports"))
<script id="OHSTemplate" type="text/html">
  <tr>
      <td class="formno">${formNo}</td>
      <td class="name">${ name }</td>
      <td class="online">-</td>
      <td data-bind="click: $parent.PrintCurrent.bind($data, fileName)" class="print"></td>
  </tr>
</script>
 
 //This is Javascript
PrintCurrent: function (file) {
 
            var Url, d;
 
            Url = $('#Report').val();
            d = { fileName: file };
            $.ajaxSettings.traditional = true;
            $.ajax({
                type: "GET",
                url: Url,
                data: d,
                contentType: "application/json;",
                dataType: "json",
                success: function (response) {
                    //response will give success or failure text (response.Result)
                }
            });
             
        }
 
 //This is c# in my controller
public class Results
        {
            string result;
            public Results()
            {
            }
 
            public string Result
            {
                get
                {
                    return this.result;
                }
                set
                {
                    this.result = value;
                }
            }
        }
 
public JsonResult Reports(string fileName)
        {
            if(fileName != null)
            {
 
                Results results = new Results();
 
                List<Report> reports = new List<Report>();
                //Add each Telerik report you have that you'll be searching through
                
                 
                Report r = new Report();
                r = (from c in reports
                            where c.Name == fileName
                            select c).FirstOrDefault();
                //Configure Printer Settings
                System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings();
 
                if (printerSettings.CanDuplex)
                {
                    printerSettings.Duplex = System.Drawing.Printing.Duplex.Default;
                }
                printerSettings.DefaultPageSettings.Color = false;
 
                //Initialize ReportProcessor
                Telerik.Reporting.Processing.ReportProcessor rp = new Telerik.Reporting.Processing.ReportProcessor();
 
                //Print Report
                try
                {
                    rp.PrintReport(r, printerSettings);
 
                    results.Result = "Print Successful";
                }
                catch (Exception e)
                {
                    results.Result = "Failed to print report because: " + e.InnerException;
                }
 
                return Json(results, JsonRequestBehavior.AllowGet);
            }
             
            return null;
        }
Eric Moore
Top achievements
Rank 1
 asked on 03 May 2012
10 answers
284 views
I have a report that takes 5 copies of a subreport and feeds it different data in the NeedsDataSource event.
lets call them subreport1 through subreport5
in Q2 this worked fine.
In Q3 subreport1 is displayed where ever the subreports 2 - 5 should be displayed. They have a conditional visibility.

Perhaps using one reference to a subreport multiple times is prohibited in the Q3 release?
Macloud
Top achievements
Rank 1
 answered on 03 May 2012
6 answers
2.1K+ views
Hi,

I'm creating a report based on a stored procedure, expecting 2 datetime paramaters.
The 2 datetime parameters are filled by ReportParameters of type DateTime an valid value; Testing the statment in the DataSource Wizard shows correct result set; no null values or else.

While developing, the report worked fine in preview mode, but in the end, something was changed, by me or a co-worker, and now the report only shows 'Input String was not in a correct format'.

We don't know what exact step caused this error, but we digged through the whole report, trying to find what causes this.
We removed every expression, every data field, all conditional formating, replaced the ReportParameter by static values and removed every grouping and filtering.

... the Report still shows this error.

Is there a way to get the details of the exception which seems to be thrown? Or is there any other way to get more details why or where this error is thrown exactly?
There error message doesn't help at all.


Any help is appreciated, we don't want to start all over again.


Thanks in advance
Nav
Top achievements
Rank 1
 answered on 03 May 2012
1 answer
137 views
Hello There,

I saw some articles where it discusses how to add a new total row, but how do i solve this problem with and existing one?

I have a report page where i have total and grand total values dispalyed in some of the row. How do i use the conditional formatting so if any row contains a word like 'total' it is highlighted in yellow

Thanks much in advance
Petio Petkov
Telerik team
 answered on 03 May 2012
1 answer
239 views
I would like to add te selected values of a multivalued parm to the header of my report. E.g. I have a drop down with doctors loaded with a sql data source where doctorid (Guid) is the value member, and name (string) the display member. In my report I want to show the selected doctors or all available in case of no selection. I do not want to show the guids (obviously) but the names...
Yet, only the value members are accessible,  where I would like the get my hands on the display members.

This is my (working) code:
Public Shared Function VoorschrijverLabels(ByVal selection As Object(), ByVal reportItem As Object) As String
 
        Dim labels As String = String.Empty
 
        Try
             Dim processingReport As Telerik.Reporting.Processing.Report = TryCast(reportItem, Telerik.Reporting.Processing.ReportItemBase).Report
             Dim report As rptDagstaat = TryCast(processingReport.ItemDefinition, rptDagstaat)
            Dim da As New SqlDataAdapter(report.dsVoorschrijvers.SelectCommand, report.dsVoorschrijvers.ConnectionString)
            Dim ds As New DataSet
            da.Fill(ds)
 
            For Each row As DataRow In ds.Tables(0).Rows
                If labels.Length > 0 Then labels += "; "
                If selection Is Nothing OrElse selection.Contains(row("VoorschrijverID").ToString) Then
                    labels += row("Voorschrijver")
                End If
            Next
 
        Catch ex As Exception
        End Try
 
        Return labels
 
    End Function
Basically I do an extra query to the database to get the paramater datasource values (again!), and compare them against the selected  value members.
But as you can see, it is not very generic... It's per parameter because I need to cast the report to access the parameter data source and the specific parameter data source properties. A separate function for each multivalued parameter with a separate database call...

The selection variable contains an ArrayList(Of string) These are casted value members of the parameter data source {CStr(VoorschrijverID)} The result of this function is a string with the names of the doctors semicolon separated.

My question is: Is there a more easy way to do this? Preferably without the database call and accessing the parameter data source directly.

Regards,
Raoul

Peter
Telerik team
 answered on 03 May 2012
1 answer
103 views
Hello,

Is it possible to manage dynamically the list of extensions the user can select in the asp.net report viewer at runtime?
We have a list of extensions configured in the Web.Config file. However for some reports only, we would like to change this list to one or two values.
Is there a way to do that?
Thanks for answer.
Regards

Joel
Steve
Telerik team
 answered on 03 May 2012
3 answers
351 views
Hi,
    I have a report in which I need to have a first page header image different than the second page header when exported into pdf.  Also, in html my reports are all on one long page so I don't get to see the second page at all even though I have multiple pages, one for each case # report.  Once it is exported into pdf, paging automatically space out each case # report into multiple pages which is when I need the first page of each report to have the company logo image, and subsequent page headers to be only the case # of the report.  Is there any method or event that tells me the report is rendering on the first page or the second page and beyond?  The page count and page number are for the whole report which I have multiple case # reports in it; is there some way that I can get the page count and page number for each case report? Can you show me some pointers or hints on how to get this done.  
    In summary, I need help on the following:
  1. How to display different header images on second page of the report
  2. Is there any method or event that tells me the report is rendering on the first page or the second page and beyond? 
  3. Is there some way that I can get the page count and page number for each case report? 
Thanks.
Steve
Telerik team
 answered on 03 May 2012
1 answer
106 views
I have a report that I display on the screen witht the report viewer but also the user can print to pdf or to a printer.  The cross tabe section alot of times spreads across two pages.  Is there a way to repeate the row groups on the new page?
Eric Klein
Top achievements
Rank 1
 answered on 02 May 2012
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?