Telerik Forums
Reporting Forum
1 answer
294 views

Hi,

How do I accomplish a rowcount from code-behind? I have a report with two datasources, one is holding header info and the other one is holding detail rows.

I need, in code behind, count the number of rows in the detail datasource. Both datasources are SqlDataSource using SqlClient to connect to MS Sql server.

 

I have tried put a hidden TextBox in the report and set it's value to Count(Fields.[a field in details]). This gives me the error "An error has occurred while processing Report 'reportname': The expression contains object 'fieldname' that is not defined in the current context" Of course I've doublechecked and 'fieldname' is correct spelled... The field belongs to the details Datasource.

 

Ideas?

Stef
Telerik team
 answered on 07 Feb 2017
1 answer
163 views

I've faced a problem in the reporting. Sometime the telerik report not showing the it's navigation bar. So, I can't download the report file and can't zoom the report. I've marked the navigation bar for better understanding. Sometime the marked area gone disappear.

Now, I want to know how to solved this problem.

Thanks in advance.

Stef
Telerik team
 answered on 07 Feb 2017
1 answer
23 views

In the bellow chart I have data for FebW1 (February week 1 ) , but the line chart does not show any line or point to show data on chart. you can see in table given, that data is available for FebW1.

 

 

Stef
Telerik team
 answered on 06 Feb 2017
1 answer
84 views

In my line chart, the data for FebW1 ( X axis Label value ) is not visible,even the  data is present for the same week of Feb month.you can see data for the same in table attached, so if the data is available for particular week of month then the line chart should show a line or dot for that data. Is there any solution to solve this problem

FYI I am using Telerik designer R3 2016 version .

Stef
Telerik team
 answered on 06 Feb 2017
1 answer
90 views

Hello,

 

I currently have a cross tab as shown in the attachment. I would like to have something with the date as the column heading but Duty Hours, Duty Start Duty end as rows ie:

                    01 Jan      02 Jan    03 Jan

Duty Hours 5.58              6.33       5.00

Duty Start 07:30            06:00      07:00

Duty End 13:05             12:20       12:00

 

is this possible?

Stef
Telerik team
 answered on 06 Feb 2017
6 answers
91 views

I have a report that needs modifying. The last two columns (Transaction Type & Transaction Amount) need to be changed to separate Transaction Amounts by Transaction Type.

This is what the report currently displays:

Transaction Type       Transaction Amount

ABCDE                       500.00

FGHIJ                        1500.00

ABCDE-CR                2000.00

etc.

So, I need to figure out a way to, within the same report, separate all transactions that end in "-CR" in to another column. 

So, something like this:

Transaction Type        Credit Amounts          Non-Credit Amounts

ABCDE                                                          500.00

FGHIJ                                                            1500.00

ABCDE-CR                 2000.00

 

I would greatly appreciate any suggestion. Also, keep in mind that I am not a programmer when responding.

 

Thanks!!

Katia
Telerik team
 answered on 06 Feb 2017
2 answers
223 views

Hi,

i am facing a problem setting the ReportSource of a Sub - Sub Report.

At the end a PDF should be generatet complete programmatically. (That ist working fine, but without detailed Data)

I am trying it like this....

using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(reportingPath + report_Name, settings))
{
    Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
    ExportReport = (Telerik.Reporting.Report) xmlSerializer.Deserialize(xmlReader);
    if ((ExportReport != null))
    {
        ExportReport.ReportParameters["Id"].Value = Id;
 
        // Subreport for Column1
        if ((ExportReport.Items.Find("SubReport_Column1", true)).Count() == 1)
        {
            Telerik.Reporting.SubReport SubReport_Column1 = (Telerik.Reporting.SubReport) ExportReport.Items.Find("SubReport_Column1", true)[0];
            ((Telerik.Reporting.UriReportSource) (SubReport_Column1.ReportSource)).Uri = reportingPath + SubReport_Colum1_Name;
                         
            if ((SubReport_Column1.Items.Find("SubReport_Column1_Details", true)).Count() == 1)
            {
                Telerik.Reporting.SubReport Report_SubReport_Column1_Details = (Telerik.Reporting.SubReport) SubReport_Column1_Details.Items.Find("Column1_Details", true)[0];
                ((Telerik.Reporting.UriReportSource) (Report_SubReport_Column1_Details .ReportSource)).Uri = reportingPath + report_Column1_Details;
            }
        }
         
        ...

 

the SubReport_Column1.Items.Find does not find anything.

What am i doing wrong? Could anybody help me out?

KR

Lars

 

 

 

Katia
Telerik team
 answered on 06 Feb 2017
2 answers
720 views

Hello, I noted that InstanceReportSource is now deprecated, what is wrong with instance report source?

Anyway, how can I replace this code that does not know anything about report parameters?

Looks like the TypeReportSource does not fills the parameters set, so that code should get parameters informations elsewhere?

string ReportLibrary = oRepLib.ToString();
string ReportName = oRepName.ToString();
 
Telerik.Reporting.Report report = WorkerWrapper.getTelerikReporting(ReportLibrary, ReportName);
foreach (var p in report.ReportParameters)
{
    object oParam ;
    if(!spoolRequest.TryGetParameter(p.Name, out oParam))
    {
        if(p.AllowNull == false)
            throw new InvalidOperationException("The parameter " +  p.Name + " is not optional on report " + ReportLibrary + "." + ReportName);                   
    }
 
    p.Value = oParam;
}
 
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
 
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
 
Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
 
             
reportSource.ReportDocument = report;           
 
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
Andrea
Top achievements
Rank 1
 answered on 04 Feb 2017
1 answer
142 views

Telerik Reports, spanning data across columns in a grid

 

I have a telerik report (using Telerik.Reporting plugin Q1 2013 SP1) based on the following sql
select productId from products

How would I get the system to populate all of the columns with ProductIds, so each column is a ProductId, so we have 3 products on one line. It seems simple yet im struggling to see a simple solution
Here it is in simple tabular form, this is how I want the report to look:-

Katia
Telerik team
 answered on 03 Feb 2017
1 answer
159 views
Hi! Is there anyway to use a multivalue parameter as data source of a list or table?
Katia
Telerik team
 answered on 03 Feb 2017
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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?