Telerik Forums
Reporting Forum
1 answer
288 views
I am adding a stored procedure event and using the code below which I got from another thread about stored procedures and fit it for my needs.  Unfortunately, I am getting errors on the (.Load).  The error says "Event Load Cannot be Found" and IsPostBack is not declared.

Any help would be appreciated.  The code I am using is below.  Also, if you see any other errors with the code let me know, thanks.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        If Not IsPostBack = False Then
            Dim myReport As New Report1()
 
            Dim sql = "[dbo].[spMBUser]"
            Dim connectionString = "Data Source=MyServer;Initial Catalog=NDB;Integrated Security=True"
            Dim command As New SqlCommand(sql, New SqlConnection(connectionString))
            command.CommandType = CommandType.StoredProcedure
 
            Dim sqlparam As New SqlParameter("@uval", SqlDbType.NVarChar)
            sqlparam.Value = 3
            command.Parameters.Add(sqlparam)
 
            Dim adapter As New SqlDataAdapter(command)
            Dim dataSet As New DataSet()
            adapter.Fill(dataSet)
 
            myReport.DataSource = dataSet.Tables(0)
 
            Dim reportSourceInstance1 As New InstanceReportSource()
            reportSourceInstance1.ReportDocument = myReport
            reportSourceInstance1.Parameters.Add("uval", HttpContext.Current.User.Identity.Name)
            ReportViewer1.ReportSource = reportSourceInstance1
 
 
        End If
    End Sub
Squall
Top achievements
Rank 1
 answered on 24 Feb 2014
3 answers
219 views
I can see stacked charts are supported and clustered charts are too, but it seems that jointly stacked and clustered at the same time are not.

I appreciate that this is complex, is it on the roadmap?

An example of what I mean by stacked and clustered at the same time;
http://peltiertech.com/WordPress/clustered-stacked-column-bar-charts/ 

An example of what Telerik reports / charts currently support and look like;
http://www.telerik.com/help/wpf/radchartview-series-chartseries.html 

Thanks in advance

Terry
Stef
Telerik team
 answered on 24 Feb 2014
5 answers
278 views
Hello,

I'm having a problem with Telerik Reporting. All the reports in my project display properly when running on my development box, but once deployed to our test web server the following error is displayed in the report viewer,

Object reference not set to an instance of an object.
 
at Telerik.Reporting.Processing.ParametersManager`1..ctor(IReportDocument definition, ICollection`1 parameters)
at Telerik.ReportViewer.WebForms.ParametersPage.get_ParamsManager()
at Telerik.ReportViewer.WebForms.ParametersPage.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at Telerik.ReportViewer.WebForms.ParametersPage.OnPreLoad(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

If I repeatedly click a button to run the report it sometimes will eventually render after about 15 or 20 attempts, sometimes not. I occasionally will see a "Report is unavailable or session has expired." message as well. Also if the report does eventually appear none of the images in the report will show unless I right-click them and select "Show Image". In trying to troubleshoot this problem I have stripped down the report until it contained nothing but a single text box, no parameters, no data access, no code in the report at all and I still get the error.

I'm using Reporting version 6.1.12.611 and IE8. The pages use radTabStrip, radMultiPage and radPageView components, but I removed these to see if they might be the cause of the problem to no avail.

I'm calling the report using code like this,
Telerik.Reporting.InstanceReportSource instanceReport = new Telerik.Reporting.InstanceReportSource();
instanceReport.ReportDocument = new Civil.CivilReports.CivilCourtWorksheet();
rvCourtSchedule.ReportSource = instanceReport;

Any idea the cause of this error and how to avoid it?

Thank you,
John
Stef
Telerik team
 answered on 24 Feb 2014
5 answers
376 views
i create  telerik table programmatically ,, i need to access specified cell ,, e.g  cel[row][col] and get it's value  ,, and how to make Style for this cell 

Stef
Telerik team
 answered on 21 Feb 2014
3 answers
160 views
I'd like to add the results from a report to a map.  I am unsure how to expose a collection of items that relate to either the Report or the reportviewer that I can gain access to.  I am able to loop through all of the data from the report's datasource, however, none of the user's filters are applied.  I suppose I could replicate the filters on the data source before binding to the report but surely there's a better way.  Am I missing something obvious?

VB.net 2013, latest telerik reporting (2013 Q3)

Eric
Stef
Telerik team
 answered on 21 Feb 2014
1 answer
401 views
When I pass a parameter through, for use in the Select statement of a SQL Datasource, it gets passed as Null, even though it appears correctly when I set the parameter to visible (for testing).

The parameter is a Guid which I convert to a string before passing and then convert back to a Guid in the Select statement.

If I remove the Where clause in the Select statement, its fine.

I am using version 7.2.1.4.127 and have run the upgrade wizard. I have tried putting single quotes around the Guid.

I pass the parameter as follows:

Model
        public TypeReportSource ReportSource
        {
            get
            {
                TypeReportSource reportSource = new TypeReportSource { TypeName = "AcumenSynergy.Reporting.PurchaseOrderLinesOutstanding, AcumenSynergy.Reporting"};
                reportSource.Parameters.Add("ProjectID", this.SelectedProjectID.ToString());
                return reportSource;
            }


View
<div id="projectIDSelector">
    @Html.LabelFor(model => model.SelectedProjectID)
    @Html.DropDownListFor(model => model.SelectedProjectID, Model.ProjectItems, new { id = "projectID", title = "Select the Project" })
</div>


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

<script>
$('#projectID').change(function () {
    var viewer = $("#reportViewer1").data("telerik_ReportViewer");
    viewer.reportSource({
        report: viewer.reportSource().report,
        parameters: { ProjectID: $(this).val() }
    });
    console.log($(this).val());
    viewer.refreshReport();
});
</script>


Select Statement in SQL Data Source
Select * from dbo.Projects  where ProjectID = (SELECT Convert(uniqueidentifier,@ProjectID)) 




Stef
Telerik team
 answered on 21 Feb 2014
3 answers
1.1K+ views

Requirements

RadControls version

Q2 2009
.NET version

2.0
Visual Studio version

2005/2008
programming language C#
browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
This is just a little methode wich exports a report to a file programmatically. So it is possible to export a report without using the ReportViewer.

C#

void ExportToFile(Telerik.Reporting.Report reportToExport, string exportFormat, string exportPath)
{
     ReportProcessor reportProcessor = new ReportProcessor();
     RenderingResult result = reportProcessor.RenderReport(exportFormat, reportToExport, null);

     string fileName = result.DocumentName + "." + exportFormat.ToLower();

     File.WriteAllBytes(exportPath + fileName, result.DocumentBytes);
}

Nasko
Telerik team
 answered on 21 Feb 2014
18 answers
1.0K+ views
Hello,

I have 2 questions about Telerik.Reporting.Table control.

1. Does anyone know how to create table from code level? I mean row with Headers and rows with values below?
2. How to find proper table cell on existing table?

Regards,
Michal.
KS
Top achievements
Rank 1
 answered on 21 Feb 2014
5 answers
570 views
Hello,

I am trying to create a report that filters anything BUT the list of values. I can create one that includes list of values as this:

=Fields.USER_LOCATION In =Split("|", "BH-0019|BH-0030|BH-0019")

But how can not create a filter that filters anything BUT the list of values?

Any help is appreciated.

Thanks!
Shoji Kaburagi
Top achievements
Rank 1
 answered on 20 Feb 2014
12 answers
832 views
Recently we upgraded our version of Telerik Reporting.  In a few of our reports, the way we were accessing the report param selected values in the code behind broke, but we made the necessary corrections to access the parameter values.

However, we still have a scenario where I can't seem to access the values of the report parameters...

We have a aspx page that contains a telerik ReportViewer.  Also on the page, we have a save button - that allows them to save the parameters they have selected in the report that is displayed in the ReportViewer.   So in the code we get the ReportSource of the ReportViewer, and then pull the values of the parameters, and save them to the database.  When we upgraded (to Q1 2013), this stopped working. (the values for the parameters are always null (or the default))

We were accessing the parameter like this:
Telerik.Reporting.IReportDocument document =
   ((Telerik.Reporting.InstanceReportSource)this.ReportViewer1.ReportSource).ReportDocument;
 
foreach (Telerik.Reporting.ReportParameter p in document.ReportParameters)
{
  object value = p.Value;
}   

 

Is there a way of getting the parameter values?


Nasko
Telerik team
 answered on 20 Feb 2014
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Missing User
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?