Telerik Forums
Reporting Forum
1 answer
726 views
Following the instructions on this page:

http://www.telerik.com/help/reporting/mvc-report-viewer-extension-embedding.html

I am unable to add the reportviewer to a view.  Here is the code and the error:

@(Html.TelerikReporting().ReportViewer()
       .Id("reportViewer1")
       .ServiceUrl("/api/reports/")
       .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.htmll")
       .ReportSource(new UriReportSource() { Uri = "Product Catalog.trdx" })
       .ViewMode(ViewModes.INTERACTIVE)
       .ScaleMode(ScaleModes.SPECIFIC)
       .Scale(1.0)
       .PersistSession(false)
       )

Error 1 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'TelerikReporting' and no extension method 'TelerikReporting' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?) c:\VS2012Apps\FastTrack2\FastTrack.MVC\Views\Reports\Index.cshtml 26 8 FastTrack.MVC

I have verified that the references have been added and the namespaces have been added to the web.config file.  This is a trial version of reporting version Q2 2014 8.1.14.618.  The project is MVC 4, .net framework 4.5.  I have cleaned/rebuilt/deleted obj directories, but nothing eliminates that error as well as these additional errors (which I'm sure are related:

Error 2 The type or namespace name 'UriReportSource' could not be found (are you missing a using directive or an assembly reference?) c:\VS2012Apps\FastTrack2\FastTrack.MVC\Views\Reports\Index.cshtml 30 26 FastTrack.MVC

Error 3 The name 'ViewModes' does not exist in the current context c:\VS2012Apps\FastTrack2\FastTrack.MVC\Views\Reports\Index.cshtml 31 18 FastTrack.MVC

Error 4 The name 'ScaleModes' does not exist in the current context c:\VS2012Apps\FastTrack2\FastTrack.MVC\Views\Reports\Index.cshtml 32 19 FastTrack.MVC


Any help would be appreciated.
Bob
Top achievements
Rank 1
 answered on 29 Jul 2014
5 answers
1.3K+ views
Hi!

I am creating dynamic report based on this example.
Create Dynamic Textbox

It works fine except the column alignment problem.

Do you have any property that set the column width automatically?
i.e. It takes the maximum item text length and aligns the columns automatically.

I am trying to set the size of each text based on the text size but columns are still not aligned properly.

Do you have any example i can follow for this?

Thanks for you support

Regards,

Vaibhav



Stef
Telerik team
 answered on 29 Jul 2014
1 answer
351 views
i followed this link (http://www.telerik.com/help/reporting/mvc-report-viewer-extension-embedding.html) to integrated the telerik reporting Q2 2014 in my mvc application. In my homecontroller index view to design the html telerik reportviewer. I create a blank report and set the report to reportviewer reportsource. In the report i get the result to use web api service and  bind the collection of result to datasource in the NeedDataSource event, the event also fire and the datasource also accept the values but the problem is the result is not showing in my report viewer yet
Stef
Telerik team
 answered on 28 Jul 2014
3 answers
123 views
Hi,

I have trouble to export currency value to excel.

in a Table Cell, I data bind a double value to a text box, and set format as {0:C2}

It works OK when it's displayed in report viewer, and it looks OK when it is exported to Excel, but if I check the "cell format" in excel, the format is defined as "Custom", the Type is: [$-1010409]$#,##0.00;($#,##0.00)

Our client wants this cell to be exported to the "Currency" type in excel. 

Could you give me some hint on what I can try?

I appreciated any help from you.

Thank you very much.
Nasko
Telerik team
 answered on 28 Jul 2014
5 answers
683 views
Hello,

I created a basic sample of the Telerik ReportViewer with the following tutorial: http://www.telerik.com/help/reporting/mvc-report-viewer-extension-embedding.html

I get the sample running under Chrome/Firefox/ IE10-11.

When I try to run the sample in IE8 I get errors:

first error: JavaScript critical error at line 2329, column 22 in http://localhost:58165/ReportViewer/js/ReportViewer-8.0.14.225.js\n\nSCRIPT1010: Expected identifier

second error: Unhandled exception at line 76, column 21 in http://localhost:58165/  0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'telerik_ReportViewer'

Any ideas how to fix this?

I also added screenshots of the errors.

Regards


Stef
Telerik team
 answered on 28 Jul 2014
1 answer
240 views
Hi

I am using the standalone report designer to create a report having an Object Data Source. I am trying to extend the designer to include my own class library. My class library is strongly named (i.e. signed). I installed my class library to the GAC and modified the designer's config file runtime section as follows:

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            
      <dependentAssembly>
        <!-- Required for interoperability with older versions of Telerik Reporting -->
        <assemblyIdentity name="Telerik.Reporting" culture="neutral" publicKeyToken="a9d7983dfcc261be"/>
        <bindingRedirect oldVersion="0.0.0.0-8.1.14.618" newVersion="8.1.14.618"/>   
      </dependentAssembly> 

       <dependentAssembly>
                <assemblyIdentity name="MyCustomClassLibrary" culture="neutral" publicKeyToken="b56355033593b42e"/>
      </dependentAssembly>  

    </assemblyBinding>
  </runtime>

Also added the assembly reference as below:

<Telerik.Reporting>
<AssemblyReferences>
<add name="MyCustomClassLibrary" version="1.0.0.0" />
</AssemblyReferences>
</Telerik.Reporting>

The problem is that the library is not being loaded in the object data source list screen. I only managed to make it work for UNSIGNED class libraries located within the standalone designer's folder.
How can I make my strongly-named library installed in the GAC to load please?
Stef
Telerik team
 answered on 28 Jul 2014
7 answers
443 views
Hi, telerik,

I have 1 parent business object which has 4 child list objects which should be printed in subreport.
So I created 1 report with 4 seperate subreport, but spend quite lot of time how to bind witrh business object.
I've read your document and read multiple threads here and tried as followings showed in another thread
but still have no success. When hitting static method to get reportsource,souce is always null.
 
// i'm using needdatasource event to fetch data with report parms
void RptSaleDailyView_NeedDataSource(object sender, EventArgs e)
     {
         Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
         .
         .
        // fetch data into business objects.
         var list = MyBizObject.GetReportData();
 
         // i'm sure my bisiness object has records for various child objects.
         this.objectDataSource1.DataSource = list;
 
         report.DataSource = this.objectDataSource1;
 
         //// sub report binding
         this.subMainPart.Bindings.Add(new Telerik.Reporting.Binding("ReportSource", "= GetSaleMainPartReportSource(ReportItem.DataObject.DayReportList)"));
    }
 
     public static ReportSource GetSaleMainPartReportSource(object source)
     {
         var report = new RptDailyMainPartView();
         report.DataSource = source;      
        return new InstanceReportSource { ReportDocument = report };
     }

So, I read another thread to set subreport's constructor as follows;

    public RptDailyMainPartView()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            this.Bindings.Add(new Telerik.Reporting.Binding("DataSource", "=ReportItem.Parent.DataObject.DayReportList"));


But this touches parent so early before fetching data.
I completly lost a way how to do it. Pls advise me.

Thank you in advance.

Kang







Charles
Top achievements
Rank 1
 answered on 27 Jul 2014
2 answers
89 views
So my project is using the HTML5 report viewer to display reports that were created in the standalone report designer. I noticed that when the request is sent to view the report, that it first does a POST to get the report parameters, and than it does another POST with those report parameters to get the instance of the report. I have a report parameter that I'd rather not be exposed like this, and I was wondering if it's possible to stop it from being displayed. I'll give a short example of what ideally I'd like to be able to do and for simplicity sake, I'll just name my parameters X, Y and Z. 

I make a request for the report, and get back the clientId, then a request goes out for the report parameters and only Y and Z are returned since they're the only visible parameters as far as the client is concerned. When the request for the report instances hits the server with the default values of Y and Z, I preform server logic to figure out what the default value of X is and put it with the other parameters inside the pipeline and an instanceId is returned just like normal. Is this possible? 

The only other way I can think of doing this is to make a report that doesn't take X as a parameter and introduce it into the reportResolver that I have.
Randy
Top achievements
Rank 1
 answered on 25 Jul 2014
2 answers
446 views
I have both the Q1 and Q2 version of the report designer and I noticed a change that you guys made that I'm curious about. In the Q1 version, while you're going through the new report wizard there is an option to change the page settings, which allows you to change the page from portrait to landscape. In the Q2 version however, this option seems to have been removed, and there isn't a great way to change a report that has 'Adjust report items to fit available space' enabled to then take up the new space that switching it to landscape provides. I'd really like to see this feature added back in as it made the process much more simple before to take up all available space.

If however you guys aren't going to put that back in, I'd like to know what the simplest way of doing it after the report wizard. I know how to switch it to landscape in the properties, and I know about the increase horizontal spacing button that sometimes can make it easier to take up the aditional space, but it doesn't always work quite right and fixing each box to take up +/- .1 in is really annoying.
Randy
Top achievements
Rank 1
 answered on 25 Jul 2014
1 answer
92 views
Hi

I'm using Visual Studio 2012 and Telerik Reporting Q1 - 2013. I'm using this version because of the support for framework 3.5

Anyway, I created a class library, I added a Telerik report, I added a datasource, I created a table with a couple of columns. Everything worked just fine.
Later, when I added more columns, they are not shown in the preview, or HTMl preview. If I publish the report , they are shown on the production server.

If I restart the computer, the columns are shown in the preview, but if I add new columns, they are not shown in preview. Only if I restart the computer.
It seems there is a cache somewhere .

How can I fix this problem ?

Regards
Hans
Stef
Telerik team
 answered on 25 Jul 2014
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?