Telerik Forums
Reporting Forum
6 answers
135 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
107 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
430 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
5 answers
472 views
Hello,

I try build a simple report and get the user the ability to print it. The
report is displayed nice contains above the toolbar But the Print button in
toolbar doesn't work as I expected. I need the ability to direct print the
displayed report by click on the print button.

I see in documentation a section of direct print:

But it is impossible for
me to do this long procedure for each end user. My web site doesn't contain any
installation procedure and I don't want that our using in Telerik reporting
tool will be the trigger for start such procedure.

Is there any other
solution for directly and simple print the report in client side?
Thanks,  



Stef
Telerik team
 answered on 31 May 2014
1 answer
250 views
I have implemented a sample report and can show the report using the HTML5 report viewer.  I would like to include the viewer within my own page which has other HTML elements included.  The attached screen shot shows the 'Loading...' div within my own page.  When the report is loaded in the viewer, the viewer takes the full screen and therefore my other page elements are no longer shown.

What is needed so that the HTML5 report viewer only takes up the area of the containing div such that the rest of the page is still available to the user?

Product: DevCraft Complete Q1 2014
Report Viewer : 8.0.14.507
Kendo UI: 2014.1.416


Joseph
Stef
Telerik team
 answered on 31 May 2014
1 answer
131 views
I am working on a Demo to give to client for approval of using telerik report in MVC4 web site. I am facing an issue in passing parameter and refresh report.
Requirement as per client in all reports that on page load report will be loading with default values for filter and after that user can select any values in any filter criteria and click on button in that case report needs to be updated on the basis of filter criteria. Currently i am using Reportviwer with html helper Please help me your earliest i have to give this Demo to client on Thursday evening.

@{
   var typeReportSource = new TypeReportSource() { TypeName = "ClientTrackingReport" };
    typeReportSource.Parameters.Add("X", Model.X);
    typeReportSource.Parameters.Add("Y", Model.Y);
    typeReportSource.Parameters.Add("Z", Model.Z);
    typeReportSource.Parameters.Add("A", Model.A);
    typeReportSource.Parameters.Add("Datefrom", Model.From);
    typeReportSource.Parameters.Add("DateTo", Model.To);   
}
 @(Html.TelerikReporting().ReportViewer()
       .Id("reportViewer1")
       .ServiceUrl("/api/reports/")
       .TemplateUrl("../ReportViewer/templates/telerikReportViewerTemplate.html")
       .ReportSource(typeReportSource)
       .ViewMode(ViewModes.INTERACTIVE)
       .ScaleMode(ScaleModes.SPECIFIC)       
       .Scale(1.0)
       .PersistSession(true)
)



Stef
Telerik team
 answered on 30 May 2014
4 answers
353 views
I am using Q1 2014 telerik controls and  i am having a problem in exporting my report to CSV format.
As my exporting language is 'Thai' but after exporting it is giving me garbage values. Please find the attachment to have a clear look.
Previouslly I wasnt having this issue. As i was using the telerik reports but with previous version.

any help would be Appreciated.


Best Regards,
Nauman Usmani
Nauman
Top achievements
Rank 1
 answered on 30 May 2014
3 answers
221 views
I have a report parameter that as its available values has a stored proc, which returns a set of (ID, Name) records.
The is a multi value parameter, so the user selects 1 or more of the items in the list.
So far so good.
The selected IDs are then passed to a Stored Proc when the report is rendered, and all is well and good.
However...In the header of each page, I want to show the parameters that were used, but not the IDs, the Names.
You can only really use parameters in the header.
So basically I want a second parameter to get the concatenated list of Names selected from the first parameter.

For instance, if the data set is

17 Oslo
22 Stockholm
31 Copenhagen

And the user selects Oslo and Stockhom, then the report sp is passed 17, 22, but I want the header to show "Oslo, Stockholm", not "17, 22".... And as an additional constraint this is for a TRDX with no C# coding.



John
Top achievements
Rank 1
 answered on 29 May 2014
5 answers
637 views
HI All,

I have created a telerik report, In that report i have a table. If the table cell Contains more data then it is rendering to the next page and also it is rendering table header in one page and data in another page. I have tried KeepTogether=false property also but still the problem exist. Please refer the attached screen shot. Please help me.

Thanks,
Satya
Nasko
Telerik team
 answered on 29 May 2014
2 answers
299 views
I am brand new to Telerik Reporting Q3 2011 and brand new to Visual Studio 2010, but I wanted to create a web part for SharePoint 2010 that would display a Telerik Report using a ReportViewer control. It took me a week, countless hours of reading, and some help from proffessionals but I was ultimately able to create the web part that displayed a basic report showing data from an SQL database. I thought I would share my experience with everyone here.

Disclaimer: I am a complete noob at web part developing and may have done things that are not smart or safe to do. However, I did what I did and got the results I was looking for, so follow my lead at your own risk.

Special thanks to: Robby, Moncef, Bary and Gary for helping me with this!


How to create a VisualWebPart in SharePoint 2010 that contains a Telerik ReportViewer control that displays a report. (This assumes you have installed Telerik Reporting on a machine with Visual Studio 2010 and SharePoint Server 2010)

Setting up the SharePoint 2010 server

Follow steps 1-4 in this Telerik guide: http://www.telerik.com/help/reporting/asp-net-report-viewer-deploying-web-reportviewer-in-moss.html

Look on the Details tab of the properties of the Telerik.Reporting.dll file found at (C:\Program Files (x86)\Telerik\Reporting Q3 2011\Bin\Telerik.Reporting.dll) to see what version number you will be using in steps 2 & 3.

1/ Ensure the following .dll files are installed in the Global Assembly Cache: Telerik.Reporting, and Telerik.ReportViewer.WebForms by verifying they exist at C:\Windows\Assembly\

Install them as needed using the gacutil.exe through the Visual Studios 2010 command prompt with the following syntax: gacutil /i “full path to file.dll”

2/ Add the SafeControl lines to your web.config file (mine was located at C:\inetpub\wwwroot\wss\VirtualDirectories\80) using the appropriate Version number.

3/ Register the Handlers required in your web.config file, using the appropriate Version number.

While inside the web.config file, address the note at the bottom of the Telerik guide talking about SessionState by searching ‘enableSessionState’ and ensuring it is set to ‘ <pages enableSessionState="true" …’

Next search the web.config file for ‘name=”Session” ‘ and ensure you have the following two lines of code:
<remove name="Session" />

<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="" />

Creating the VisualWebPart

In Visual Studios 2010, create a new SharePoint 2010, Visual Web Part, .NET Framework 3.5, Visual C# project

Choose your site for debugging and deploy as a farm solution then click Finish

4/ Drag a report viewer control from the toolbox to the VisualWebPart1UserControl.ascx and it will automatically add the Register line for you.

Modify the Group value property in the Elements.xml to the group you want your webpart to be in

Modify the Title and Description of your webpart as desired within the VisualWebPart1.webpart file

Click Deploy Solution under the Build menu

Add the web part to a page in SharePoint 2010

Open a webpart enabled page on your SharePoint 2010 site in your browser and click the edit button

Click the Web Part button on the Insert tab of the ribbon

Select the Group you named in the Elements.xml file and the Web Part name you used in the .webpart file then click the Add button

Click the save button to view the page normally and if everything is configured correctly you should see the ReportViewer control.

Creating the Report ClassLibrary Project

Open a second Visual Studio 2010 window by right clicking the VS icon on the task bar and selecting the option “Microsoft Visual Studio 2010”

Note: Do not add your new ClassLibrary project to your solution that contains your VisualWebPart project. I did this and started getting “The source of the report definition has not been specified” errors

Click the New > Project option within the File menu

Create a Visual C#, .Net Framework 3.5, Class Library that will hold your reports

Hit (Ctrl + Shft + A) to create a new item in the Class Library then select a Telerik Report Q3 2011 (version may vary)

Cancel out of the report wizard

Select the Page Header section of the report and then hit F4 to bring up its properties

Set the BackgroundColor property within the Style group to ‘Aqua’

Click the Preview tab to see a big cyan rectangle report with no text or data

Right click the ClassLibrary project and select properties then select the Signing tab on the left

Select the “Sign the assembly” check box, click in the drop down box “Choose a strong name key file:” and select “<New…>”

In the Create Strong Name Key dialog box, enter a Key file name like ‘ MyKey1 ‘ and uncheck the “Protect my key file with a password’ checkbox then click the OK button.

Save the ClassLibrary properties by hitting (Ctrl + S)

Click the Build Solution option in the Build menu

Attaching a report to the ReportViewer control

Switch to the Visual Studio 2010 window that has the VisualWebPart project open

Open the Package.package file and click the Advanced button at the bottom left

Click the Add button at the top right and select the “Add Existing Assembly…” option

Using the […] button to the right of the Source Path field, browse to the .dll created in your ClassLibrary’s Debug folder, mine was located here but your path will be different: C:\Vs2010 projects\PalmClassLibraryOfReports\PalmClassLibraryOfReports\bin\Debug\PalmClassLibraryOfReports.dll

Ensure the GlobalAssemblyCache radio button is selected for the Deployment Target and then click the OK button

Save the .package file by hitting (Ctrl + S)

Right click the References and select Add Reference

Select the ClassLibrary project by browsing to it using the Browse tab

Again, Right click the References and select Add Reference

This time Select Telerik.Reporting under the .NET tab or browse to it using the Browse tab

Open your UserControl.ascx.cs file and add the following code to the specified places

Add this to the using section:
using PalmClassLibraryOfReports; (be sure to use the name of your ClassLibrary)

Add this inside the Page_Load block:
        if (!IsPostBack)

        {

            AllTasks AllTasksReport = new AllTasks();

            ReportViewer1.Report = AllTasksReport;

            ReportViewer1.RefreshReport();

        }

(be sure to substitute the name of your report for my “AllTasks” and your ReportViewer ID for my ReportViewer1 which was the default) (you can name this instance of the report anything you want where I have called it “AllTasksReport”)

Save the UserControls.ascx.cs file

Click the Deploy Solution option in the Build Menu

Refresh the web part page to see if everything worked

Go back to the web part enabled page in your browser that contains the ReportViewer control and hit F5 to refresh.

If everything was configured correctly you will see a report generated inside the ReportViewer control with a cyan rectangle.

Connecting a report with an SQL data source to the VisualWebPart

If you would like to see a report with some actual data from an SQL database then continue reading!

 (I am using the AxioWorks SQList service which continuously copies SharePoint data into an easy to navigate SQL database.) http://www.axioworks.com/

Make sure the users that will be logged into SharePoint have security rights to read the SQL database. (I gave the Domain Users group access to my database, but had to enable using groups as logins first) http://stackoverflow.com/questions/5029014/how-to-add-active-directory-user-group-as-login-in-sql-server

 In the Visual Studio 2010 window with the ClassLibrary, hit (Ctrl + Shft + A) to add a new item then select a Telerik Report Q3 2011, name it and click the Add button.

Follow the steps in the Telerik Report Wizard: [Next >], [Next>], [Add New Data Source…], SQL Data Source [OK], [New Connection…], Server name: = localhost [Refresh], Select or enter a database name:=YourDbName [OK], [Next >],[Next>],[Query Builder…], Select Table [Add],[Close], Select a check box next to a column in the table [OK],[Next>],[Execute Query…],[Finish>>|], [Next>], [Next>], Select your table [Detail >],[Next>], [Next>], Select ‘Aspect’ for Style Sheets [Next >], [Finish >>|]

Open the App.config file and notice the connection string that was added. Mine looked like this:

    <connectionStrings>

      <add name="PalmClassLibraryOfReports.Properties.Settings.CrmReports"

connectionString="Data Source=localhost;Initial Catalog=CrmReports;Integrated Security=True" providerName="System.Data.SqlClient" />

    </connectionStrings>

Open the web.config file for your SharePoint site and search for ‘<connectionStrings>’. If you already have a this section, copy paste the line of code which adds the connection string to your database from your app.config file to your web.config file. If you do not have the ‘<connectionStrings>’ section then add it along with the actual connection string found in your app.config file.

In the Visual Studio 2010 window with the VisualWebPart project, open the UserControls.ascx.cs file

Change the name of the report from the basic one to the new one you created that displays data. Be sure to change both occurrences of the old report name.

Click the Deploy Solution option in the Build menu

Go back to your SharePoint page with the VisualWebPart and hit F5 to refresh it

If everything was configured correctly, you will see a report with some data in it.

Stef
Telerik team
 answered on 29 May 2014
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?