Telerik Forums
Reporting Forum
2 answers
143 views
I have been trying to get a basic report to show up on a test page using the Telerik Reports (Trial) product, but am unable to be successful.  I have retrieved the data (in various scenarios) and bound it to the ReportViewer, but nothing shows up (not even my columns).  Am I missing something?  Code Below:


01.protected void Page_Load(object sender, EventArgs e)
02.{
03.    if(!Page.IsPostBack)
04.    {
05.        string strFakeToken = "0x00C1F7F02751764B9E03D36DC1F10C2E010000004D5FE0DA32126BFFD53944A657C59323ED483AA729D6C109632DBD0A56662191094CD17AA16E5BFAFB30C557E4F7F133";
06.         
07.        System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
08.        byte[] myByteRep = encoding.GetBytes(strFakeToken);
09. 
10.        Telerik.Reporting.SqlDataSource sdr = new Telerik.Reporting.SqlDataSource();
11.        sdr.ProviderName = "System.Data.SqlClient";
12.        sdr.ConnectionString = ConfigurationManager.ConnectionStrings["MyDBName"].ConnectionString;
13.        sdr.Parameters.Add("@settingID", System.Data.DbType.Int16, 1);
14.        sdr.Parameters.Add("@workSpaceID", System.Data.DbType.Int16, 1);
15. 
16.        sdr.Parameters.Add("@securityToken", System.Data.DbType.VarNumeric, myByteRep);
17. 
18.        sdr.SelectCommandType = Telerik.Reporting.SqlDataSourceCommandType.StoredProcedure;
19.        sdr.SelectCommand = "[SOMENAME].[ItemMasterReport]";
20. 
21. 
22.         
23.         
24.        // Access the Service to pull the Data Reader in the line below
25.        IItemMasterReportService imr = new ServiceProxy.ServiceProxy.ItemMasterReportServiceProxy();
26.        // Create Data Reader (for use below)
27.        IDataReader idr = imr.GetItemMasterReportDataReader(IdentityHelper.CurrentUser.RecentWorkspaceID,1);
28.         
29.        // Create the Data Table (to be used in the Data Source below)
30.        DataTable dt = new DataTable();
31.        dt.Load(idr);
32.        //dt.TableName = "ItemMasterReport";
33.        dt.TableName = "Budget";
34.        //dt.TableName = "Capacity";
35. 
36.        // Create the Data Source (to be used in the Report below)
37.        Telerik.Reporting.ObjectDataSource ods = new Telerik.Reporting.ObjectDataSource();
38.        ods.DataSource = dt.Rows;
39.        //ods.DataMember = dt.TableName;
40.        //ods.DataMember = "Budget";
41.        //ods.DataMember = "Capacity";
42. 
43.        // Create the Data Set (not used ??? )
44.        DataSet ds = new DataSet();
45.        ds.Load(idr,LoadOption.OverwriteChanges,string.Empty);
46. 
47.        // Build the Report (to be used in the Report Source below)
48.        Telerik.Reporting.Report report = new Telerik.Reporting.Report();
49.        //report.DataSource = ods;
50.        report.DataSource = sdr;
51. 
52.        Telerik.Reporting.InstanceReportSource irs = new Telerik.Reporting.InstanceReportSource();
53.        irs.ReportDocument = report;
54.         
55.        // Set some basic stuff for UI for diagnostic purposes
56.        usertoken.InnerText = IdentityHelper.CurrentUser.Token.ToString();
57.        workspaceID.InnerText = IdentityHelper.CurrentUser.RecentWorkspaceID.ToString();
58.        settingID.InnerText = "1";
59. 
60.        rptvwJaredTest.ReportSource = irs;
61.        rptvwJaredTest.RefreshReport(); // now that all the sub-work is done, render the report in the report viewer in the UI
62.    }
63.}
Jared
Top achievements
Rank 2
 answered on 02 Jun 2014
1 answer
141 views
Hi. I want to create a table with group rows in the second column in Designer. I made group in the first column, but cant do this in the second column. How can I do this?
Stef
Telerik team
 answered on 02 Jun 2014
1 answer
141 views
How I can create multi-level reports using telerik

Reports structure will like this

Subject 1
Sub-subject 1.1
Comment 1
Comments 2

Sub-subject 1.2
Comment 1
Comments 2


Subject 2
Sub-subject 2.1
Comment 1
Comments 2

Sub-subject 2.2
Comment 1
Comments 2

Please provide me any sample link and source code.




Stef
Telerik team
 answered on 02 Jun 2014
1 answer
100 views
we are using telerik reports for creating reports.While exporting a report to excel (from report viewer)
its row heading are merged into several ones.Please refer the attachments for more details.


Stef
Telerik team
 answered on 02 Jun 2014
3 answers
155 views
Hi to all,
I've this problem, I created a CubdeDataSource, my MDX query replay me 4 columns:
  1. Activities
  2. All
  3. Customer
  4. Contact

The first is a dimension that aggregate the visit of salesperson by a particular tipology called Activities (a simple category),
moreover the other dimension is "Type" that has 2 values: Customer and Contact, that aggregates the visits of salespersone based if is customer or contact.
And then the level "All" of dimension "Type" but I'm not interessed.

Now on telerik report I put a char, set a CubeDataSource and specify 2 Series that link to Customer and Contact. Ok!

But now I would show label using Actitivites column. What can I do?

PS: I've attached: result set of MDX query, and chart (evidence in blue)
Stef
Telerik team
 answered on 02 Jun 2014
1 answer
76 views
Hello,

we have a problem with image rendering in the top of report. If we run a application on server side, it works correct. If we publish the page to Internet, the logo was not displayed.

Part of the configuration file


<system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
    <services>
      <service
              name="Telerik.Reporting.Service.ReportService"
              behaviorConfiguration="ReportServiceBehavior">
        <endpoint
               address=""
               binding="basicHttpBinding"
               contract="Telerik.Reporting.Service.IReportService">
        </endpoint>
        <endpoint
                address="resources"
                binding="webHttpBinding"
                behaviorConfiguration="WebBehavior"
                contract="Telerik.Reporting.Service.IResourceService"/>
        <endpoint
                address="mex"
                binding="mexHttpBinding"
                contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ReportServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="WebBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>

Part of data service class:

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class WebClientService : IWebClientService
    {
...
}

Version of components: Q1 2014 8.0.14.311

Obtain Image data using SQL query.

Did I miss anything?

Thanks, Michal
Stef
Telerik team
 answered on 02 Jun 2014
1 answer
111 views
Hi.

I have a project, not written by me.
Using telerik first time.
Export button does not shown in run-time, but i see it in design.
What has happened, how can I return button?
Stef
Telerik team
 answered on 02 Jun 2014
6 answers
115 views
Hi All,

I'm new to Reporting. Just wondering how to call a Sub Procedure from Report Textbox Action to use Ajax?
Here's the scenario:
- Parent Aspx Page With the sub procedure to be called.
    - Asp: Placeholder added to Parent Page
      - User Control (with Report viewer) Added to Placeholder
        - Report with Textbox that has action to call Parent Sub Procedure to change the user control on Asp: Placeholder?
Condition: It will be done using Ajax, when changing user control based on field.value. Is this possible? (My preferred solution)

(Optional)
If I'll be using navigateurl it will do postback and also we don't want to add some info to url (querystring) which is the field.value.
We prefer updating session ids with the field value that is why I need to pass the field.value to a procedure to update session ids first before calling the correct user control to be loaded based on updated session ids.

Any info will be greatly appreciated.

Thanks in advance,
RJ
RJ
Top achievements
Rank 1
 answered on 02 Jun 2014
4 answers
63 views
Greetings 

I have a very strange behavior with the HTML5 Report Viewer. The report display in proper size in any other Report Viewer. However, when it comes to displaying the chart (and only chart)objects or elements that are full in size along with the page, the reportviewer is cutting the chart height and width and is not displaying the chart completely.

When it comes to export,  the application even export in the proper size as it displays in other report viewers. However, it is just display wrong.

Please see the below example.


In my scenario the page settings are 
Landscape - Left 0.5, Right 0.5
and the Chart object Display is given the following sizing 
Telerik.Reporting.Drawing.Unit Height = new Telerik.Reporting.Drawing.Unit(15, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm)));
            Telerik.Reporting.Drawing.Unit Width = new Telerik.Reporting.Drawing.Unit(25, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm)));
 
_chart.Size = new Telerik.Reporting.Drawing.SizeU(Width, Height);
            _chart.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.32, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))), new Telerik.Reporting.Drawing.Unit(1.8, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))));

And again, the report display perfectly in any other reportviewer and at export time

Please any insight, idea, clue or guidance will be fully appreciate it.

Thanks

Stef
Telerik team
 answered on 31 May 2014
2 answers
398 views
Hello!
I want to display a Objet List on Telerik report, but I cant.
I try to use Subreport, but dont resulted.
How I do?

Objet:
    Public Property W As New List(Of WW)
    Public Property X As New List(Of XX)

    Public Class XX
        Public Property NomeEscola As String
    End Class

    Public Class WW
        Public Property NomeLingua As String
    End Class




Stef
Telerik team
 answered on 31 May 2014
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?