Telerik Forums
Reporting Forum
3 answers
1.3K+ views
I have a report bound to an ObjectDataSource, which is bound to a strongly-typed table adapter as suggested by "choose business object" dialog. (When I choose "data components only," the dialog suggests my table adapter--which makes sense.) The table adapter works--I see the data I expect when previewing the data in the DataSet designer.

But my report is not seeing the available fields. I drop a text box on the report, go to its Value property and invoke the builder. The Fields node is empty. This happened in both my old version 4.x of Telerik Reporting and also the latest trial version I downloaded just now to see if it worked better.

Am I missing something? I have done this successfully in the past with a SqlDataSource--that is get the fields come up to select. But the ObjectDataSource is not showing me any fields, so I'm stumped.
Chandan Dey
Top achievements
Rank 1
 answered on 30 Jul 2014
2 answers
414 views
When using the Line Graph, how can I avoid bunching of labels on the X-Axis. I looked for Step and Scale, but I can't seem to avoid what is happening in the attached image.

I used this example in the document as a starting point, and the XAxis is a CategoryScale version 2014-Q1.
http://www.telerik.com/help/reporting/graphhowtocreatelinechart.html 


Thank you
NerdBrick
Top achievements
Rank 1
 answered on 29 Jul 2014
1 answer
739 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
354 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
130 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
705 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
242 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
453 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
104 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
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?