Telerik Forums
Reporting Forum
2 answers
119 views
Using Telerik.Reporting, Version=8.1.14.804.
Visual Studio solution in C# with report designer.
Data from database returns column 'Field1' of SQL type REAL.
Textbox on report with expression : 
= Abs(Fields.Field1)

In preview a red exception box is shown with message : 'Specified cast is not valid.'

As a workaround we now have:

= Abs(CDbl(Fields.Field1))

Should it work with a real (Single in C#?) from the database? Or are we doing something wrong?


Nasko
Telerik team
 answered on 07 Oct 2014
1 answer
300 views
I am building a report which is going to be used as a sub-report from within several other master reports.  The sub-report is pretty simple: one Table in the details section bound to a data source displaying a bunch of records, and a few header rows displaying column headers.  I want to include a header which displays some information about the records on the page such as 'Records #1 through #20" on page 1 and "Records #21 through #40" on page 2, etc.  This seems like the perfect application for the 'PageExec' function, however since I am using this as a sub-report anything in the Page Header and Footer will not be displayed.  Is there a way to do such a header value on each page of a sub-report?

I also tried looking into using the 'RunningValue' function but was unable to figure out a 'scope' value which would allow me to do such a thing.  Is it possible via some other method?
Hinata
Top achievements
Rank 1
 answered on 06 Oct 2014
1 answer
468 views
Hi! I am new to telerik reporting and creating simple report using stored procedure which takes one parameter. I am designing my report in standalone report designer using sqldatasource and using generated .trdx file in my ASP.Net MVC application in VS 2012. I already tried to create simple report using sql query/ stored procedure without parameter as shown in your article, this works great but when I am trying to use stored procedure with parameter it's not working. Report content like header and other static information is displaying in report but data coming from stored procedure is not displaying. There is no issue in Stored Procedure as I checked it's working in Sql server. I am using following code to pass parameter

@{
        var DataSource = new UriReportSource() { Uri = ViewBag.TemplateName };
       DataSource.Parameters.Add(new Telerik.Reporting.Parameter("SiteID", 1));        
    }

    @(Html.TelerikReporting().ReportViewer()    
       .Id("reportViewer1")
       .ServiceUrl("/api/reports/")
       .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate-8.1.14.804.html")
       .ReportSource(DataSource)
       .ViewMode(ViewModes.INTERACTIVE)
       .ScaleMode(ScaleModes.SPECIFIC)
       .Scale(1.0)
       .PersistSession(false)
       ) 

This is working code and works with sql query/stored procedure without parameter but not working when I use stored procedure with parameter. 

Thanks......










Swapnil
Top achievements
Rank 1
 answered on 06 Oct 2014
1 answer
123 views
Hi everyone,
I am deploying a custom winform application that will use a database table to lookup reports that a user is allowed access to.
The table is just 3 fields
rptID, rptName, and rptDescription

On load of the Report  Form I query the database using the users ID and pull in the 3 fields above to create a group of radio buttons on the form.
What I need to be able to do is then load another form with a reportviewer on it when the user selects a radio button.

Is there anyway to take the string value of rptName and dynamically load it into the ReportViewer on the called form?

I am using instancereportsource with a compiled DLL of reports.

I can hard code the reports and use a Select Case on reportname but I would rather have it be dynamic so that I can add reports later on after the application is deployed by just replacing the reports DLL file.

The code I currently use for the hard coded select case is
Select Case ReportName
            Case "IncidentListingReporting" 
                Dim FullnameRpt2 As New Telerik.Reporting.InstanceReportSource 
                FullnameRpt2.ReportDocument = New Reporting.IncidentListingReport
                FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("SDate", Param2))
                FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("EDate", Param3))
                FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("PNUM", Param4))
                ReportViewer2.ReportSource = FullnameRpt2
End Select

What I would like is to be able to do something like
                FullnameRpt2.ReportDocument = Param1

Thanks for any help!


Nasko
Telerik team
 answered on 06 Oct 2014
0 answers
67 views
Hi
   I am use Windows 8,Telerik Reporting installed in my machine is 8.1.14.804.

Aravind
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 04 Oct 2014
1 answer
77 views
I use sub report in the footer of parent report.
There is a field of Document Type.
i want that Sub Report Visibility is false when Document Type = "DELIVERY ORDER".
I give the condition

Expression                               Operator                      Value
=Field.DocumentType                   =                      ="DELIVERY ORDER"

But this is not working it is show that report.
Help me.
Stef
Telerik team
 answered on 03 Oct 2014
1 answer
156 views
I use sub report in the footer of parent report.
There is a field of Document Type.
i want that Sub Report Visibility is false when Document Type = "DELIVERY ORDER".
I give the condition

Expression                               Operator                      Value
=Field.DocumentType                   =                      ="DELIVERY ORDER"

But this is not working it is show that report.
Help me.
Stef
Telerik team
 answered on 03 Oct 2014
2 answers
801 views
The Export options are missing from the Report Viewer - I'm using the HTML5 Report Viewer.  The icon is visible but clicking it does nothing. 

I can successfully call api/reports/formats and see the available formats in the returned json
I have references to DocumentFormat.OpenXML and Telerik.Reporting.OpenXmlRendering

According to the docs this is enabled by default, so what am I missing? 

Mark
Top achievements
Rank 1
 answered on 03 Oct 2014
1 answer
65 views
Hello telerik,

we have problem with telerik reporting cache configuration. We have web application with that one configuration
Cache configuration for Telerik Reporting - Documentation

But we have limit for web request execution timeout <httpRuntime maxRequestLength="10240" executionTimeout="120" /> in web.config.

If user print more than ten reports sometimes error occured. 
In IIS we found that error:
Event code: 3001 
Event message: The request has been aborted. 
Event time: 1. 10. 2014 8:28:28 
Event time (UTC): 1. 10. 2014 8:28:28 
Event ID: fac8e9f29da44308a956b8a40a77f776 
Event sequence: 468895 
Event occurrence: 4 
Event detail code: 0 
......
Request information: 
    Request URL: ...../Telerik.ReportViewer.axd?instanceID=e2e347934c98455992ff6c852ad9b479&optype=Report&PageIndex=0&RenderID=1cf163f3e6dc4c469f1ee686e29ee837&RenderingFormat=HTML5 
    Request path: /Telerik.ReportViewer.axd 
    ....(sensitive data)
    Is authenticated: True 
    Authentication Type: Forms 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

In Application stack trace error:
Delete failed: System.InvalidOperationException: ExecuteReader needed open Connection. Current state is closed.
   v Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeUpdate()
   v OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeUpdate()
   v OpenAccessRuntime.Relational.RelationalStorageManager.deleteRow(PreparedStatement ps, RelationalOID oid, String sql)
Row: GenericOID@6e636f66 SessionState resource_id=05ceed656ae242a3a0b5c2f083098bf2/session_id=6fc22894b45a47878fa2e191f9fdcd1a
DELETE FROM [session_state] WHERE [resource_id] = ? AND [session_id] = ?
(set event logging to all to see parameter values) System.InvalidOperationException: ExecuteReader vyžaduje otevřené a dostupný element Connection. Aktuální stav připojení je Zavřeno.
   v Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeUpdate()
   v OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeUpdate()
   v OpenAccessRuntime.Relational.RelationalStorageManager.deleteRow(PreparedStatement ps, RelationalOID oid, String sql)


How can solve that problem?

Best regards
Vladimir












Hinata
Top achievements
Rank 1
 answered on 03 Oct 2014
1 answer
538 views
Hello,

I am trying to create Telerik reporting table programmatically , facing an issue with Telerik.reporting.table where my datatable rows are not getting rendered. Report is showing up only columns not rows. For more info, please find attached images for datatable and Telerik.reporting.table.

Here is code snippet my using

public Table DataGrid()
        {
            Table table = new Table();
 
            // Get data and bind it to the table
            System.Data.DataTable data = ChartsData.chartTable();
             
            // Clear table before binding
            table.ColumnGroups.Clear();
            table.Body.Columns.Clear();
            table.Body.Rows.Clear();
 
            table.DataSource = data;
 
            int colCount = data.Columns.Count;
 
            for (int i = 0; i <= colCount - 1; i++)
            {
                TableGroup tableGroupColumn = new TableGroup();
                table.ColumnGroups.Add(tableGroupColumn);
                 
                //table.Body.Columns.Add(new TableBodyColumn(Unit.Inch(0.01)));
 
                HtmlTextBox txtGroup = new HtmlTextBox()
                {
                    Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3)),
                    Value = data.Columns[i].ColumnName,
                    Style =
                    {
                        BorderStyle = { Default = BorderType.Solid },
                        BorderColor = { Default = System.Drawing.Color.Black },
                        Font = { Name = "Arial", Size = new Unit(10) },
                        VerticalAlign = VerticalAlign.Middle
                    },
                };
                tableGroupColumn.ReportItem = txtGroup;
 
                HtmlTextBox txtTable = new HtmlTextBox()
                {
                    Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3)),
                    Value = "=Fields." + data.Columns[i].ColumnName,
                    Style =
                    {
                        BorderStyle = { Default = BorderType.Solid },
                        BorderColor = { Default = System.Drawing.Color.Black },
                        BorderWidth = { Default = new Unit(0.5, UnitType.Point) }
                    }
                };
                 
                table.Body.SetCellContent(0, i,txtTable);
                table.Items.AddRange(new ReportItemBase[] { txtTable, txtGroup });
            }
 
            return table;
        }

Please advise how to resolve this issue? 
Nasko
Telerik team
 answered on 03 Oct 2014
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?