Telerik Forums
Reporting Forum
2 answers
377 views

Hello,

We are trying to generate the report viewer report in javascript but are having a difficult time trying to figure out what the javascript logic should be.

When we set the report source on the control tag it works flawlessly. 

For example 

<telerik:ReportViewer ID="ReportViewer" runat="server" Width="1240" Height="700" ParameterEditors-SingleSelectEditor="createSingleSelectEditor" >
        <ReportSource Identifier="Reports.Organization_Summary, Reports" IdentifierType="TypeReportSource">
            <Parameters>
                <telerik:Parameter Name="userName" Value="matt" />
            </Parameters>           
        </ReportSource>       
    </telerik:ReportViewer>

 

When we try to set the report source in javascript nothing happens.

Example

<telerik:ReportViewer ID="ReportViewer" runat="server" Width="1240" Height="700" ParameterEditors-SingleSelectEditor="createSingleSelectEditor" />

 

function displayReport()
        {
            var reportViewer = $("ReportViewer").data("telerik_ReportViewer");
            reportViewer.reportSource({
                report: "Reports.Organization_Summary, Reports",
                parameters: { "userName": "matt" },
            });
            reportViewer.refreshReport();
        }

What are we missing for the report to run when the report source is set on the client?

Matt
Top achievements
Rank 1
 answered on 07 Nov 2017
3 answers
959 views

I have an expression like reportProcessor.RenderReport("XLS", ...) which always throws an exception with message "XLS rendering format is not available" when running in Edge.js via an Electron app, but never throws when running "normally" via a WinForms app. Same assembly, same code, but different behavior.

Stack trace for the exception:

   at Telerik.Reporting.Processing.ReportProcessor.GetExtensionInfo(String format)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo)
   at [my code]

Other details about the environment:

Telerik.Reporting.dll, version 9.2.15.930

Windows 10

Excel 2016

 

What kind of conditions would cause XLS rendering to be unavailable?

It's probably important to note that this same body of code has an expression like reportProcessor.RenderReport("PDF", ...) which works totally correctly with both the Edge.js-based Electron app and the WinForms app. This expression executes a few statements before the one for XLS that fails.

I checked that the app domains of both apps are running with full trust because I suspected there might be a lack of unmanaged code permissions, but that's apparently not the problem. Both domains have full trust.

Katia
Telerik team
 answered on 06 Nov 2017
8 answers
529 views

I have failed to setup a project as instructed here:

https://docs.telerik.com/reporting/html5-report-viewer-asp-net-core-2

I have been over the instructions 10 times, the error message I receive is.

Error registering the viewer with the service.

An error has occurred.
The type initializer for 'Lock' threw an exception.

Project found here:

https://www.dropbox.com/s/8rl4hhanj5gbfc9/WebApplication2.zip?dl=0

Reafidy
Top achievements
Rank 2
Iron
 answered on 06 Nov 2017
0 answers
67 views

Hi,

 

I'm using telerik report viewer in my web application with angular2.I'm able to get the report fine in developing mode but when i try to compile angular2 code using AOT compilation i'm getting following error as attached in screen shot.can any one help me to resolve the issue

 

Thanks&Rds,

Raghu S

victor
Top achievements
Rank 1
 asked on 06 Nov 2017
3 answers
147 views
Hello.  Under IE 11 everything works great.  But on EDGE when I use dropdown list for filter it's difficult to see the list (see attachment).  Any idea?
Louis
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 05 Nov 2017
0 answers
77 views

I am looking for advise as to how to capture if a report was actually printed?

This would then be stored in a SQL database as a true/false.

Which event should I be using? Has anyone done this or have sample code?

Brian
Top achievements
Rank 1
 asked on 03 Nov 2017
0 answers
55 views

I want to display a table with width of details section. I am generating this table from code. It looks like this:

<Table DataSourceName="EquipmentListSource" Width="18.9997994280509cm" Height="1.5cm" Left="0.00010012308478036cm" Top="0.299999848604206cm" Anchoring="Left, Right" Name="table1" StyleName="Normal.TableNormal">
  <Body>
    <Cells>
      <TableCell RowIndex="0" ColumnIndex="0" RowSpan="1" ColumnSpan="1">
        <ReportItem>
          <TextBox Width="2.57666584246297cm" Height="0.499999970197678cm" Left="0cm" Top="0cm" Value="= Equipment.Name" Format="null" CanGrow="True" CanShrink="True" Name="textBox1" StyleName="Normal.TableBody" />
        </ReportItem>
      </TableCell>
      <TableCell RowIndex="0" ColumnIndex="1" RowSpan="1" ColumnSpan="1">
        <ReportItem>
          <TextBox Width="1.01970437696535cm" Height="0.499999970197678cm" Left="0cm" Top="0cm" Value="= Equipment.InventoryNumber" Format="null" CanGrow="True" CanShrink="True" Name="textBox2" StyleName="Normal.TableBody" />
        </ReportItem>
      </TableCell>
    </Cells>
    <Columns>
      <Column Width="2.57666555934389cm" />
      <Column Width="1.01970430618558cm" />
    </Columns>
    <Rows>
      <Row Height="0.499999970197678cm" />
    </Rows>
  </Body>
  <Corner />
  <RowGroups>
    <TableGroup Name="Detail">
      <Groupings>
        <Grouping />
      </Groupings>
    </TableGroup>
  </RowGroups>
  <ColumnGroups>
    <TableGroup>
      <ReportItem>
        <TextBox Width="2.57666584246297cm" Height="0.999999940395355cm" Left="0cm" Top="0cm" Value="Nazwa" Name="textBox12" StyleName="Normal.TableHeader" />
      </ReportItem>
    </TableGroup>
    <TableGroup>
      <ReportItem>
        <TextBox Width="1.01970437696535cm" Height="0.999999940395355cm" Left="0cm" Top="0cm" Value="Nr inw." Name="textBox13" StyleName="Normal.TableHeader" />
      </ReportItem>
    </TableGroup>
  </ColumnGroups>
</Table>

 

My real table has 13 columns and their initial width is computed based on initial table width.

When I generate my report as "Portait" table fills all available width. 

When I change page settings to "Landscape" cell width grows to accommodate content and table fills all available width.

But when I change page settings back to "Portait" then cell contents is not shrunk back and my table spans to three pages.

What can I do be able to switch from Portait to Landscape and back without this effect?

 

Lukasz
Top achievements
Rank 1
 asked on 03 Nov 2017
5 answers
279 views

Hi. I need to add some functionality to my application which needs to be triggered on print or export of a report(created in the standalone report designer). I've seen a page in the Telerik documentation stating the following:

"Additionally events can't be used with Standalone Report Designer report documents, because the custom code from events is not serialized in reports."

I've also noticed this behaviour through my own testing.

 

I'm wondering if there is any way that I can capture when a report is printed or exported from the Telerik Winforms Report Viewer without having to reimplement Windows print/export dialogs.

 

Thanks.

James
Top achievements
Rank 1
 answered on 03 Nov 2017
0 answers
386 views

Hi all
I am using the Report Designer for the first time. I have created a report and it is not allowing me to fetch the data from server. I am using local database credentials to get the data and display in the report and it is working fine. I want this report to work with the application other developers have created because the designer in the Visual Studio does not provide the options and is not that well organized as Report Designer is. 
Is this all possible or I am just wasting my time over this issue ?

Thank you 

Muhammad
Top achievements
Rank 1
 asked on 03 Nov 2017
1 answer
92 views

Hi,
I can`t achieve display the data from an Complex Object with a property List of subObjects, in the way I would like to Display. This Way is Grouping  the Field ‘Question’ by  â€˜QuestionGroup’

Complex Object:
    public class QuestionnaireReportData
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public string DeviceID { get; set; }
        public string SerialNumber { get; set; }
        public string Location { get; set; }
        public string City { get; set; }
        public DateTime Date { get; set; }
        public string Client { get; set; }
        public string Modelo { get; set; }
        public string Manufacturer { get; set; }
        public IEnumerable<QuestionResponseReportData> QuestionResponses { get; set;      }
    }

    public class QuestionResponseReportData
    {
        public string Question { get; set; }
        public string Answer { get; set; }
        public AnswerDataType AnswerDataType { get; set; }
        public string QuestionGroup { get; set; }
    }
I achieve to binding the sourceData of Table, List,etc to the List Property IEnumerable<QuestionResponseReportData>) and show Correct Data, But I don’t achieve to Grouping correctly by the Field QuestionGroup as I want.

This is what I would like to display (Good display attached image)

This is what I display actually (bad display attached image)

What I’m doing wrong? Thanks in advance!
Best Regards,

Raul
Top achievements
Rank 1
 answered on 03 Nov 2017
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?