Telerik Forums
Reporting Forum
9 answers
110 views
Hi,

I've got a problem with the quality of the output when printing from the Silverlight ReportViewer.
If I print from the designer's preview or set the UseNativePrinting property of the ReportViewer to false everything is sharp.

But using the native silverlight printing in the ReportViewer makes the output of barcodes and Telerik.Reporting.Shape types like ellipse very blurry on paper, regular text is still sharp though.


Tomas
Tomas
Top achievements
Rank 1
 answered on 08 Mar 2013
4 answers
77 views
Hi

Firstly I wanna thanks Telerik for it's excellent Reporting tool :)

My question:
I have developped a program for printing labels. Now I saw that it prints labels from top->bottom then column 2 etc.
Now I want it to print from left to right, then row 2, 3 etc.
I don't know how to do it? Is it possible? It's of great importance to me!

Thank you in advance

Marnik
VB developper
Peter
Telerik team
 answered on 08 Mar 2013
1 answer
66 views
Hi,

I am not sure this is the right place to post improvement suggestions but i will drop it here anyway:

while editing an existing binding expression in the "edit binding" dialog by double clicking the expression ( i.e. without invoking the "edit expression" using the dropdown) using the arrow keyboard keys causes the focus to change to the property path. This behavior is not intuitive and mildly annoying.


Peter
Telerik team
 answered on 08 Mar 2013
1 answer
199 views
Hi,

In Visual Studio 2010 I added a data source to sql server 2008 r2 . In Configure DataSource Command screen I added a store procedure, I gave the parameters, I press the button Execute query, it shows nice the results but when I click Finish, no fields are shown in Data Explorer.
I did some tests and I discover when I have a stored procedure that internal use temporary tables, and the last select is from temporary table, it not shows the fields in data explorer.
Example
-------------------this doesn't show the field department in data explorer -------------
create procedure TEst_Department
as
BEGIN
SET NOCOUNT ON


select 'D1' as Department into #temp1

select * from #temp1

 END

 --------------this shows the data in data explorer

create procedure TEst_Department
as
BEGIN
SET NOCOUNT ON

select 'D1' as Department into #temp1

DECLARE @dept TABLE
(
    department NVARCHAR(10)
)


insert into @dept (department)
Select Department from #temp1

select * from @dept

 END

----------------------------------------------------------------


I have a pretty complicated stored procedure with a lot of temporary tables and at the end I have to add a Table variable and I have to insert the results in this table variable in order to work with your reports

Any thoughts ?

Regards,

Hans

Stef
Telerik team
 answered on 07 Mar 2013
1 answer
132 views
Hello,
Will TRDX defined reports load  faster  then traditional report load times? I am hoping to prebuild reports that the user will need to page through very quickly, with minimal delay between pages. Will TRDX reports help by speeding up the initial load time for the initial and each subsequent report.

Does the Document Map allow only the first page to display and not pre-build/compile the other pages until they are clicked on? Or does the report Book allow this. What I am trying to accomplish is to load the first page and each subsequent page in the quickest possible way. My report is a simple layout without too much data but there can be upto 50-100 pages.

Thanks!
Elian
Telerik team
 answered on 07 Mar 2013
17 answers
977 views
I am writing this for 2 reasons.

Firstly to help out anyone that like me, has spent hours on Report Databinding issues.
Secondly, to put this down on paper (virtual?) to help me remember what I learned.
The problem I was having is related to binding a SQLDatasource to a report.
I was having a hell of a time trying to figure out why the filtered datasource was not getting reflected in the web report viewer.

Heres the setup I was using:

- A Telerik  Report with 1 table and 1 crosstab in a class library (as recommended by Telerik)
- The report had the report datasource, the table and crosstab datasources pointing to the reports SQLdatasource object.
-The report had no filters and no parameters and displayed all the data in the query (via stored proc) - good so far
-The report worked fine in the designer preview -also good
- A web page with a reportviewer
- Code behind setting the reportviewer report to the report described above (The working Code shown at the end of this article)

Now here is what was happening,

When I designed the report, and viewed it in the preview tab in the report designer, the report displayed fine and showed all the data in the query as it should.
When I viewed the report in the web page using the report viewer, I used code behind to get the data from a query, set a filter and bind the datasource of the report to that. The problem I was having was that the report was displaying all the data and not the filtered data.

I tried several things to troubleshoot this over several hours...
Some of the things I noticed were:
1. I could not get the NeedDatasource in the web report code behind to fire
2. If I put a Datagrid on the page bound to the same data, it showed the filtered data just fine but the report did not.
3. Weird- if I changed the filter to return no data (ID=9999), no data displayed in the report but if I used any valid filter (ID=1), all the data displayed
4. If I set the datasource in the report to nothing it displayed nothing even though getting set in code behind

After messing with this for several hours I got it to work properly and here's what I needed to do, and what I learned in the process:

The main problem I was having was that in my report, the main report was pointing to the report SQLdatasource, as were the 2 bound objects on the report, a table and a crosstab. All of the messing around I was doing was never setting the datasource of the 2 objects properly. Setting the main report datasource did not change the 2 bound objects in the report.

To fix this I did a few things:
1. Set the 2 objects datasources to point to the main report datasource using the NeedDataSource event (IN THE REPORT)
Private Sub Table1_NeedDataSource(sender As Object, e As System.EventArgs) Handles Table1.NeedDataSource
sender.DataSource = Report.DataSource
End Sub
  
Private Sub Crosstab1_NeedDataSource(sender As Object, e As System.EventArgs) Handles Crosstab1.NeedDataSource
sender.DataSource = Report.DataSource
End Sub

Something important to note here:
Dont use Table1.DataSource=Report.DataSource- it wont work. Make sure you refer to 'Sender'

2. In the report constructor, be sure to set the datasource to nothing (null in C#) or the NeedDataSources WILL NOT FIRE !

 

Public Sub New()
 InitializeComponent()
 Table1.DataSource =Nothing
  Crosstab1.DataSource =
Nothing
End Sub

So now in the report viewer (web page) code behind, when you run the method to load the report data, you set the main report datasource to the queried data object, whatever happens to be (Dataset, datareader, collection etc), and then since the report objects have their datasources set to nothing, the NeedDatasource events back on the report code behind fire and set the datasources for the table and crosstab to the main datasource for the report (which was set in the web page code behind).
Now- this gives us another very nice benefit, when you view the report in the report designer, it will work correctly because you leave the report and the table and the crosstab on the report bound to the SQL dataSource in the report. Some other forum posts I have seen recommended to set the datasource when building the report and then removing it when done designing.
You dont need to do that using this approach.

Here is the code for the report and web page code behind:

Report code behind (All the code)

Partial Public Class AI_Programs_Report_E
    Inherits Telerik.Reporting.Report
     
    Public Sub New()
        InitializeComponent()
        Table1.DataSource = Nothing
        Crosstab1.DataSource = Nothing
    End Sub
 
    Private Sub Table1_NeedDataSource(sender As Object, e As System.EventArgs) Handles Table1.NeedDataSource
        sender.DataSource = Report.DataSource
    End Sub
 
    Private Sub Crosstab1_NeedDataSource(sender As Object, e As System.EventArgs) Handles Crosstab1.NeedDataSource
        sender.DataSource = Report.DataSource
    End Sub
End Class
 
Web Page Code Behind (all revelant code only)

Imports Telerik.Web.UI
Imports Telerik.Reporting
=======================
    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        SetReportDataSource()
Blah Blah...
=======================
    Protected Sub btnfilterNow_Click(sender As Object, e As System.EventArgs) Handles btnfilterNow.Click
        SetReportDataSource()
    End Sub
=======================
    Sub SetReportDataSource()
         Dim sql As String = DSListing.SelectCommand ' Select blah from blah
     Dim connectionString As String = "Data Source=(local);Initial Catalog=AI_DNN;Integrated Security=True"
Dim adapter As New SqlDataAdapter(sql, connectionString)
Dim dataSet1 As New DataSet()
adapter.Fill(dataSet1)
Dim table As DataTable = dataSet1.Tables(0)
Dim foundRows() As DataRow
Dim expression As String = "ID=563" ' Or some filter string
foundRows = table.Select(expression)
ReportViewer1.Report = New Report
Dim report1 As New TelerikReports_Sarvac.AI_Programs_Report_E()
report1.DataSource = Nothing ' DSListing ' dataSet
report1.DataSource = foundRows 'dataSet
ReportViewer1.Report = report1
ReportViewer1.RefreshReport()
end sub


I hope this clears some things up for you and saves you some time and headaches.
Please drop me an email if it does at billymac@advancedinteractive.net

Cheers...


Stef
Telerik team
 answered on 07 Mar 2013
3 answers
1.0K+ views
Hi,
  I am using report viewr for reports.Reports are working fine in my local,test and QA servers.But when we deployed in production server getting error "
An error has occurred while processing Report 'PrintReport': Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
"
Napa
Top achievements
Rank 1
 answered on 07 Mar 2013
4 answers
241 views
I have a report where I have a hierarchy of data related to work schedules.. Some of the time that is tracked has an additional grouping I need to total on, others don't.. see below:

DIVISION OF LABOR
   Optional Category
     Employee 1 [time worked]
     Employee 2 [time worked]
  Optional category totals
DIVISION OF LABOR TOTALS

Some divisions of labor will have the optional category that requires totals, some will not.
ADMIN STAFF
     Employee 1 [hours worked]
     Employee 2 [hours worked]
     Employee 3 [hours worked]
ADMIN STAFF TOTALS
 
SUPERVISION
   Supervisors
     Employee 1 [hours worked]
     Employee 2 [hours worked]
   Supervisors Totals
 
   Asst. Supervisors
     Employee 1 [hours worked]
     Employee 2 [hours worked]
   Asst. Supervisors Totals
 
SUPERVISION TOTALS
 
LABOR & LOGISTICS
   Labor Foreman
     Employee 1 [hours worked]
     Employee 2 [hours worked]
   Labor Foreman Totals
 
   Laborer / Logistics
     Employee 1 [hours worked]
     Employee 2 [hours worked]
   Laborer / Logistics Totals
 
   Laborer
     Employee 1 [hours worked]
     Employee 2 [hours worked]
   Laborer Totals
 
LABOR & LOGISTICS TOTALS

In the above, Admin Staff has no sub-category or totals. Labor & Logistics does. 

So.. I need a grouping with totals for the "Optional" category but do not need that optional category for Admin staff and other divisions of labor that do not need sub-grouping categories. I have the data being captured already, I just need to know how make the report do this.

Thanks.
Matthew
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
160 views
Hi there.

I have a crosstab report. The headers are split by company region then by year. How do I split my grand total column by year, i.e. the second type of header?

Thanks
Hadib Ahmabi
Top achievements
Rank 1
 answered on 07 Mar 2013
5 answers
713 views
Hi,

I can't get the table row group headers in a report I'm designing to repeat on every page. Here's the table group structure I have

ParentGroup
Static
Static
Detail Group

I would like the two static rows to be repeated when a group spans multiple pages. I'm using Q1 2013.

Thanks,

Joe
Elian
Telerik team
 answered on 07 Mar 2013
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?