Telerik Forums
Reporting Forum
1 answer
102 views
  As we can't share our original data we have given sample data.
We are facing some issue here.
Some of the rows are not displaying when grouped in table.
For example

My Data
------------------------
IdTest IdTestName IdGroup(Datatype : String)
1         test1         1
2         test1         1
3         test2         2
4         test2        2
5         test3        3
6         test3        3

When i have grouped the table using IdGroup

Output is displayed as
--------
 test1
 test2

Expected Output
-------------------------
test1
test2
test3


Some of the data is  missing in this ouput.Any reasons or cases why these rows are missing? 
Steve
Telerik team
 answered on 04 May 2012
2 answers
183 views
One quick question ~

I have a master report that contains pageheader, reportheader and a subreport in its detail section. In the subreport, I only have a detail section that contains the data of my report in a table. When i run my report, my page header is attached to the data being displayed.

Is there anyway I can include a white space between my header and the subreport? I tried placing a panel above the hostingSubReport area and change its background to white, but that did not work.

I also added an empty group above the subreport, but the spacing would show up in the first page under the report header, but not in the second page between the page header and detail(subreport) section

Thanks much!!
Peet
Top achievements
Rank 1
 answered on 04 May 2012
1 answer
121 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
206 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
269 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
246 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.0K+ 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
111 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
210 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
89 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
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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?