Telerik Forums
Reporting Forum
1 answer
75 views
Hi All,

I have a reporting page with a crosstab on it. Toggle Visibility action has been assigned to the Category field to drillthrough the Subcategory fields. Everything works well at this point. However, the report refreshes everytime the Category toggle mark is clicked.
I would like to ask if there is any option to store all retreived data by the first report generation to prevent the report being refreshed everytime the toggle mark is clicked.  

Thank you.
Steve
Telerik team
 answered on 30 Nov 2012
0 answers
124 views
I created a POC report in the designer and it is working properly.  I am now trying to implement this in a WPF application and have the report opening, just showing no data.  (I am up to date using the Q3 2012) assemblies.

The ReportContent is being retrieved from a database.  I am replacing the ConnectionString at runtime and have verified that it is being updated appropriately.  At runtime ConnectionString="" is being updated to a valid connection string.

Also, I am not sure why, but if I do not remove "xmlns="http://schemas.telerik.com/reporting/2012/2" from the XML it will not even display the report and tell me that I have an invalid connection.  Simply removing this at least allows the report to display, just with no data.

Here is a sample of the XML being pulled from the database:
<?xml version="1.0" encoding="utf-8"?>
<Report DataSourceName="TestConn" Width="6.45833333333333in" Name="Parent">
  <DataSources>
    <SqlDataSource ConnectionString="" SelectCommand="SELECT ID, CreateDate FROM tblTest WHERE ID= 1234" Name="TestConn" />
  </DataSources>
  <Items>
    <PageHeaderSection Height="0.28125in" Name="pageHeader">
      <Items>
        <TextBox Value="Parent" Size="6.41666666666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="reportNameTextBox" StyleName="PageInfo" />
      </Items>
    </PageHeaderSection>
    <PageFooterSection Height="0.28125in" Name="pageFooter">
      <Items>
        <TextBox Value="=NOW()" Size="3.19791666666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="currentTimeTextBox" StyleName="PageInfo" />
        <TextBox Value="=PageNumber" Size="3.19791666666667in, 0.200000027815501in" Location="3.23958333333333in, 0.0208333333333333in" Name="pageInfoTextBox" StyleName="PageInfo">
          <Style TextAlign="Right" />
        </TextBox>
      </Items>
    </PageFooterSection>
    <ReportHeaderSection Height="1.0290683110555in" Name="reportHeader">
      <Items>
        <TextBox Value="Parent" Size="6.45833333333333in, 0.787401596705119in" Location="0in, 0in" Name="titleTextBox" StyleName="Title" />
        <TextBox Value="Create Date:" CanGrow="True" Size="3.19791666666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.808234930038452in" Name="createDateCaptionTextBox1" StyleName="Caption">
          <Style TextAlign="Right" />
        </TextBox>
        <TextBox Value="=Fields.CreateDate" CanGrow="True" Size="3.19791666666667in, 0.200000027815501in" Location="3.23958333333333in, 0.808234930038452in" Name="createDateDataTextBox" StyleName="Data" />
      </Items>
    </ReportHeaderSection>
    <ReportFooterSection Height="0.28125in" Name="reportFooter" />
    <DetailSection Height="0.28125in" Name="detail">
      <Items>
        <TextBox Value="=Fields.CreateDate" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="createDateDataTextBox1" StyleName="Data" />
        <TextBox Value="=Fields.ID" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="1.63020833333333in, 0.0208333333333333in" Name="iDDataTextBox" StyleName="Data" />
      </Items>
    </DetailSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style Color="28, 58, 112">
        <Font Name="Tahoma" Size="18pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="Title" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style BackgroundColor="28, 58, 112" Color="White" VerticalAlign="Middle">
        <Font Name="Tahoma" Size="10pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="Caption" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style Color="Black" VerticalAlign="Middle">
        <Font Name="Tahoma" Size="9pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="Data" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style Color="Black" VerticalAlign="Middle">
        <Font Name="Tahoma" Size="8pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="PageInfo" />
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter">
      <Margins>
        <MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" />
      </Margins>
    </PageSettings>
  </PageSettings>
  <Groups>
    <Group Name="labelsGroup">
      <GroupHeader>
        <GroupHeaderSection PrintOnEveryPage="True" Height="0.28125in" Name="labelsGroupHeader">
          <Items>
            <TextBox Value="Create Date" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="createDateCaptionTextBox" StyleName="Caption" />
            <TextBox Value="ID" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="1.63020833333333in, 0.0208333333333333in" Name="createIDCaptionTextBox" StyleName="Caption" />
          </Items>
        </GroupHeaderSection>
      </GroupHeader>
      <GroupFooter>
        <GroupFooterSection Height="0.28125in" Name="labelsGroupFooter">
          <Style Visible="False" />
        </GroupFooterSection>
      </GroupFooter>
    </Group>
  </Groups>
</Report>
Matthew
Top achievements
Rank 1
 asked on 30 Nov 2012
6 answers
96 views
Hello I have a problem with the Area chart. When i use that type of chart my result is not correct. I mean that the plot not match x-axis values. When i use Stacked Area type the values are correct. I use the same datasource and all settings, i am only changing the type.

I tried to grapchically show my problem, can you tell me how to add attachement?.
This is my grapchic interpretation, i hope someone will understand me.
http://i50.tinypic.com/2qk4046.png

I really appreciate any ideas why this situation is happening.

Regards, Paul.
Steve
Telerik team
 answered on 30 Nov 2012
22 answers
615 views
Does Telerik have any plans to add Qr-codes to the list of available bar codes? They seem to be gaining a lot of popularity (especially for scanning with phones) and are included in some of the competitors products. 

http://en.wikipedia.org/wiki/QR_Code
Vasssek
Top achievements
Rank 1
 answered on 30 Nov 2012
2 answers
325 views
I have an expression that uses division but it always returns zero. Here some examples of what I have tried:

=RunningValue('group1',Count(Fields.[Short Description])) / Exec('Report1', Count(Fields.[Short Description]))
Returns 0

=RunningValue('group1',Count(Fields.[Short Description])) / 64
Returns 0

=Count(Fields.[Short Description]) / Exec('DuplicateCARs', Count(Fields.[Short Description]))
Returns 0

=(3 /15)
Returns 0

The cell is formatted as a number with 2 decimal places assigned.

The running value does in fact return an int every time, I have tested it. So, why does this expression always return a zero? All other math opperators work fine; addition, multiplication and subtraction.
David
Top achievements
Rank 2
 answered on 30 Nov 2012
0 answers
102 views
Hiya,

I been running through the Telerik RadGrid forum several times trying to find a scenario similar to no avail, therefore I'm hoping to seek some wisdom here. In my situation I'm using Telerik ASP.NET AJAX Q2 and Telerik Reporting Q3. I've created a test report class (Test.cs) which I intended to be used as report template for my RadGrid. The problem arises when I've finshed my Grid and my Reporting Class. I've yet to find a way to make RadGrid to pass over the data into the Reporting Class which should appear as PDF embedded in ReportViewer inside browser.

Basically I would like the grid to send the primary key value of the selected row to the reporting class library when a user clicked the ClientGridSelectColumn and clicked a "Print Selected" asp:LinkButton. I've gon through a couple of forum posts here such as here:
http://www.telerik.com/community/forums/reporting/telerik-reporting/radgrid-telerikreporting-interaction.aspx
and
http://www.telerik.com/help/aspnet-ajax/grid-retrieve-primary-key-field-values-for-items.html  they did solve part of the problem however due to my lack of in depth understanding of telerik products the solution provided were not working as expected.

I hope someone could shed a little light to accomplish this task. Thanks in advance.

Bernard
Top achievements
Rank 2
 asked on 30 Nov 2012
1 answer
184 views
Im trying to open print dialog box on client and server side without using Reportviewer..It works for IE,Chrome and Safari but it doesn't work in Firefox..

Thanks..

Here is my test code:
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
    <telerik:RadCodeBlock runat="server">
        <script type="text/javascript">
            ReportViewer.prototype.PrintReport = function()
            {
                this.PrintAs("Default");
            }
            function MyPrint()
            {
                <%=ReportViewer1.ClientID %>.PrintReport();
            }    
        </script>
    </telerik:RadCodeBlock>
 
    <script type="text/javascript">
        ReportViewer.OnReportLoadedOld = ReportViewer.OnReportLoaded;
         
        ReportViewer.prototype.OnReportLoaded = function () {
            this.OnReportLoadedOld();
            var printButton = document.getElementById("PrintButton");
            printButton.disabled = false;
        }
   
    </script>
</head>
<body>
    <form id="form1" runat="server">
 
        <asp:ScriptManager runat="server" />
 
        <div>
            <asp:Button ID="Button1" runat="server" Text="Print" OnClick="Button1_Click" Style="width: 41px" />
            <asp:Button ID="PrintButton" runat="server" Text="Print Dialog Server" OnClick="PrintButton_Click" />
            <asp:Button ID="PrintClient" runat="server" Text="Print Client" OnClientClick="MyPrint(); return false;" />
            <telerik:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="800px" Style="display:none"></telerik:ReportViewer>
        </div>
 
    </form>
</body>
</html>

End the server side code:
public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            instanceReportSource.ReportDocument = new Report1();
            this.ReportViewer1.ReportSource = instanceReportSource;
        }
 
        protected void Button1_Click(object sender, EventArgs e)
        {
            ExportToPDF(new Report1());
        }
        void ExportToPDF(Telerik.Reporting.Report reportToExport)
        {
            ReportProcessor reportProcessor = new ReportProcessor();
            Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            instanceReportSource.ReportDocument = reportToExport;
            Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null);
 
            string fileName = result.DocumentName + "." + result.Extension;
 
            Response.Clear();
            Response.ContentType = result.MimeType;
            Response.Cache.SetCacheability(HttpCacheability.Private);
            Response.Expires = -1;
            Response.Buffer = true;
 
            Response.AddHeader("Content-Disposition",
                               string.Format("{0};FileName=\"{1}\"",
                                             "attachment",
                                             fileName));
 
            Response.BinaryWrite(result.DocumentBytes);
            Response.End();
        }
 
        protected void PrintButton_Click(object sender, EventArgs e)
        {
            string printScript = string.Format("{0}.PrintReport();", this.ReportViewer1.ClientID);
            this.ClientScript.RegisterStartupScript(this.GetType(), "ReportPrint", printScript, true);
        }
    }
Veysel
Top achievements
Rank 1
 answered on 29 Nov 2012
2 answers
211 views
Hi!

I have a class library with my reports in it. I have another project where my entitymodel is in. In my reports project I've added a reference to the project where my entitymodel is in. I've also added the connection string to the reports project and rebuild the project. In my project I try to use an entitydatasource. I can select the connectionstring from the web.config, but if I click next, the Object Context is empty and I can't select anything.

Why is this happening and how can I fix it?

Luki
Top achievements
Rank 1
 answered on 29 Nov 2012
1 answer
249 views
Hi,

I have generated a dynamic telerik report, in that there are checkboxes and they should be checkable after exporting the report to PDF or word file.

one more requirement is i want a datepicker to be part of the report page as well as the generated pdf or word files.

need some help on how to achieve this

thanks in advance

- NeelaKrishna
Steve
Telerik team
 answered on 29 Nov 2012
2 answers
494 views
Hi. I'm currently using ActiveReports and considering switching to Telerik Reporting. One of the issues I am having is the ability to create an Excel report with multiple pages (sheets). The number of pages is unknown until the dataset is created. ActiveReports handles this, but with a restriction, when you export to XLS you cannot name the workbook sheets. Would Telerik Reporting allow me to do everything I can do already plus what I am missing?

1) Multiple reports combined inside a single export (workbook), XLS only
2) Each report has its own unique name and should be used as the sheet name

Thanks.
Brendon
Top achievements
Rank 1
 answered on 29 Nov 2012
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?