Telerik Forums
Reporting Forum
11 answers
337 views
Is it possible to capture a click event in a cell of a report Telerik?
Peter
Telerik team
 answered on 16 Jan 2015
1 answer
159 views
We have an application that uses both telerik winforms controls (Q2 2011) and telerik reporting (Q1 2011) that is deployed using ILMerge to create a single exe.  The application works fine in debug, release, and deployed VIA a setup program.  However, the exe created by ILMerge generates the following error when I try to render a report or display the report in the winforms report viewer:

System.ArgumentException: Extension of type 'Telerik.ReportConverter.ActiveReports.ActiveReportsConverter' does not have name specified.
   at Telerik.Reporting.Processing.ExtensionInfo.AssertValidName()

There doesn't seem to be any other issues as I have added "Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True" when the first form is initialized.

Does telerik reporting (any version) support ILMerge distribution? 

If so, I have added Telerik.ReportViewer.Winforms.dll and Telerik.Reporting.dll to our ILMerge script but are there any other dependent files for telerik reporting?
Nasko
Telerik team
 answered on 15 Jan 2015
3 answers
1.6K+ views
Hi,

I have a tabular report. I have two tables inside the report. one displays summary and another displays details. Both tables are poiting to different datasources.

Now I want to display one db field value from one of the dataset into header part. I have added new textbox but I am not able to see any fields to be added into textbox in the expression window.

I have identified that when we set report datasource property, we can see the datasource fields in the textbox expression but if I add that it messes up my report as I have two tables and both have different datasets.

Please advise how to get db field value in textbox without setting datasource property of the report. I have two datasets added to the report and both are set to different table.

Thanks,
Hardik
Candice
Top achievements
Rank 1
 answered on 15 Jan 2015
1 answer
177 views
-My project is asp.NET MVC 4 web application.
-My project use VS integrated designer with report templates being .cs files.
-My project still use old ASPX report viewer.

I want to set specific fonts and other 'Style' properties for each localized culture. (for example, I want to use Font_A as default, Font_B for en-US and Font_C for en-GB.)

I tried localizing them the normal way like how I localized the texts. (Starting from changing 'Localizable' property to True and switch 'Language' property to put the localized text in, which in this case, set a font specific for that culture)

The problem is, the designer didn't count changing 'Style' properties as a part of localization and didn't store the data in .resx files.

Any solution or work-around?

PS. I don't want to change into new version.
Hinata
Top achievements
Rank 1
 answered on 14 Jan 2015
3 answers
123 views
Hi,

we have the following use case: we want to render reports (made by the standalone report designer, that means TRDX files) as RTF or DOCX files and display these output files in a browser embedded texteditor. So that the user can change the content of the report as he/she likes. In the main use case the reports would be predefined letters (in which the user is able to change the content).

My questions are:

1. Is it possible to export metadata into the output RTF or DOCX file? Examples for metadata would be: information about the data source (what data is displayed), used aggregate functions, inserted sub reports etc. This metadata we would like to show in the texteditor at the respective site (e.g. somehow highlighted or in a tooltip).

2. Is it possible to use the Telerik HTML Editor for this purpose?

Thanks,
Felix
Nasko
Telerik team
 answered on 14 Jan 2015
4 answers
414 views
I have a tabular report. Report has below casecading parameters.

Country
City

City parameters fills the value based on the country selection. both are database driven.

When I changed the default value of any of these parameters, it gives me below error and filter is not working properly.

"Collection was modified, enumeration operation may not execute"

Please advise. I am new to telerik reporting.

Thanks in advance.
Hardik
Top achievements
Rank 1
 answered on 14 Jan 2015
1 answer
107 views
Hello.

We have created a custom ADO.Net provider that accesses web service and returns a DataTable object. I have successfully inorporated into the Report Designer and everything works fine except when we have a parameterized SQL statement. When you create a data source with SqlClient Data Provider and it has a parameterized SQL statement a Data Source Parameters dialog box shows up where you can specify data types and default values. 

The command class is inherited from DbCommand and adds parameters when CommandText was changed:
public class AbstractCommand : DbCommand
{
        private string commandText;
        private AbstractParameterCollection parameters;

...
        public override string CommandText
        {
            get
            {
                return this.commandText; 
            }
            set
            {
                this.commandText = value;
                this.CreateParameters();
            }
        }

        protected override DbParameterCollection DbParameterCollection
        {
            get 
            {
                if (this.parameters == null)
                {
                    this.parameters = new AbstractParameterCollection();
                }

                return this.parameters;
            }
        }

        private void CreateParameters()
        {
            this.Parameters.Clear();
            if (this.commandText == null)
            {
                return;
            }

            string[] lines = this.commandText.Split(new char[] { '@' });
            for (int i = 1; i < lines.Length; i++)
            {
                string line = lines[i];
                string[] split = line.Split(new char[] { ' ', '\t' });
                if (split.Length == 0)
                {
                    continue;
                }
                split = split[0].Split(Environment.NewLine.ToArray());
                if (split.Length == 0)
                {
                    continue;
                }
                this.Parameters.Add(
                    new AbstractDataParameter()
                    {
                        ParameterName = "@" + split[0],
                    });
            }
        }
}

I have comfired that the parameters are populated correctly and the dialog box still don't how.

FYI, the config file has this:
<system.data>
    <DbProviderFactories>
        <add name="Local Abstract Data Provider"
             invariant="LocalAbstractDataProvider" 
             description="Data Provider for Netsmart VR" 
             type="LocalAbstractDataProvider.AbstractDbProviderFactory, LocalAbstractDataProvider, Version=1.0.0.0" />
    </DbProviderFactories>
</system.data>  

Do you have any idea?


















Shoji Kaburagi
Top achievements
Rank 1
 answered on 13 Jan 2015
1 answer
234 views
Hello together

I have two nearly identical reports and in both the same problem:
I've got three subreport items side by side but even when I put them next to each other there are horizontal spaces between the three subreports.
The subreport items' sizes match the actual report sizes and I already tried making the subreport items a bit wider than the actual reports.
I even had the problem that the right margin of the 3rd subreport item didn't fit right below the line above even though in the designer they were aligned properly.
This one I was able to fix (don't know how exactly) but the spaces between the reports I wasn't able to fix.

Thanks for any help
Nasko
Telerik team
 answered on 13 Jan 2015
3 answers
276 views
Hi ,

I have a table created from a table wizard  and now i want to insert a subreport below it  based one of its fields.

CustomerId Customer Report
Sub report related  to  Each customer ID

I have done the passing of the Customer ID field to the Subreport  customer Id  filter....but   an error keeping coming saying

Exception: Invalid value of report parameter 'CustomerID'.]

Can anyone throw some light on it please?

 
Nasko
Telerik team
 answered on 13 Jan 2015
1 answer
250 views
I'm trying to add 2 sub reports programmatically on the report footer section like this

               //This is called twice with a different myString content which is a XML string
                XmlReaderSettings settings = new XmlReaderSettings();
                settings.IgnoreWhitespace = true;

                using (XmlReader xmlReader = XmlReader.Create(new StringReader(myString), settings))
                {
                    ReportXmlSerializer xmlSerializer = new ReportXmlSerializer();

                    Telerik.Reporting.Report subreport = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
                    Telerik.Reporting.InstanceReportSource source = new Telerik.Reporting.InstanceReportSource();
                    source.ReportDocument = subreport;

                    Telerik.Reporting.SubReport footerSubReport = new Telerik.Reporting.SubReport();
                    footerSubReport.ReportSource = source;
                    footerSection.Items.Add(footerSubReport);
                }
            }
        }

These 2 sub reports were created originally on the Telerik Designer with extension trdx and then changed to xml. The width of both is 15cm while on the main report, the width is 19.51cm. Enough to avoid and spread of the width.

When only 1 sub report is added everything is ok but then when I add both subreports; blank pages are added. I tried to change the background color to identify the problem. Each sub report is really narrow (15 cm) in contrast to the main report (19.51 cm) but the report footer looks bigger in width producing the blank pages.

I set property KeepTogether of my report footer to false and each sub report xml has the property PageBreak = Before.

These are my two subreports in xml format

---------------------------------
Sub Report 1 
---------------------------------

<?xml version="1.0" encoding="utf-8"?>
<Report Width="15cm" Name="SubReport1" xmlns="http://schemas.telerik.com/reporting/2012/3.5">
  <Items>
    <DetailSection PageBreak="Before" Height="1.7322834332784in" Name="detailSection1">
      <Style Visible="True" BackgroundColor="0, 128, 255" VerticalAlign="Bottom" />
      <Items>
        <TextBox Width="11.7999992370605cm" Height="2.3600001335144cm" Left="0.00010012308478013cm" Top="0.299999848604206cm" Value="Testing1" Name="textBox1">
          <Style>
            <Font Bold="True" />
          </Style>
        </TextBox>
      </Items>
    </DetailSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style>
        <Padding Left="2pt" Right="2pt" />
      </Style>
      <Selectors>
        <TypeSelector Type="TextItemBase" />
        <TypeSelector Type="HtmlTextBox" />
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter" Landscape="False">
      <Margins>
        <MarginsU Left="0cm" Right="0cm" Top="0cm" Bottom="0cm" />
      </Margins>
    </PageSettings>
  </PageSettings>
</Report>

---------------------------------
Sub Report 2 
---------------------------------

<?xml version="1.0" encoding="utf-8"?>
<Report Width="15cm" Name="SubReport2" xmlns="http://schemas.telerik.com/reporting/2012/3.5">
  <Items>
    <DetailSection PageBreak="Before" Height="1.7322834332784in" Name="detailSection1">
      <Style Visible="True" BackgroundColor="0, 128, 255" VerticalAlign="Bottom" />
      <Items>
        <TextBox Width="11.7999992370605cm" Height="2.3600001335144cm" Left="0.00010012308478013cm" Top="0.299999848604206cm" Value="Testing2" Name="textBox1">
          <Style>
            <Font Bold="True" />
          </Style>
        </TextBox>
      </Items>
    </DetailSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style>
        <Padding Left="2pt" Right="2pt" />
      </Style>
      <Selectors>
        <TypeSelector Type="TextItemBase" />
        <TypeSelector Type="HtmlTextBox" />
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter" Landscape="False">
      <Margins>
        <MarginsU Left="0cm" Right="0cm" Top="0cm" Bottom="0cm" />
      </Margins>
    </PageSettings>
  </PageSettings>
</Report>

Luis
Top achievements
Rank 1
 answered on 12 Jan 2015
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?