Telerik Forums
Reporting Forum
8 answers
709 views
I have a pop-up web page that shows Product information and have added a print button to the page that allows the user to print this info.  I do not want a report viewer to show when the user clicks this Print button, just open the print dialog, user makes choices and then prints the report.
I have the report viewer on the same page that shows the Product Information in a hidden <div> tag, like this:
    <div style="display:none;">  
        <telerik:ReportViewer ID="ReportViewer1" runat="server">  
        </telerik:ReportViewer> 
    </div> 

All default properties have been taken for the ReportViewer, nothing has been changed.  The report datasource is set in the code-behind (see code below).

When the user clicks on the Print button this is the code that is executed:
    Protected Sub btnPrint_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles btnPrint.Click  
        Try 
            Me.ReportViewer1.Report = New ShowPartInfoRpt  
            Me.ReportViewer1.Report.DataSource = Me._ProductInfo  
            Dim printScript = String.Format("{0}.PrintReport();"Me.ReportViewer1.ClientID)  
            Me.ClientScript.RegisterStartupScript(Me.GetType(), "ReportPrint", printScript, True)  
        Catch ex As Exception  
           'Generic error handling routine here, not shown  
        End Try 
    End Sub 

So I am setting the report viewer source to the report, then set the datasource for the report to a datatable. This datatable has 1 row in it.  I have stopped the code in debug mode and see the values in the datatable.  When the print dialog appears, the adobe preview window shows nothing, and printing the report prints a blank report.

What am I missing?

Thanks!
Steve
Telerik team
 answered on 15 Dec 2008
2 answers
228 views
Hi,

I have a simple business object:

class Obj
{
    public string Label {get; set; }
    public int Data {get; set; }
}

Now I need to display a collection of such objects in a pie chart so when I handle my NeedDataSource event of that chart I have the following:

Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart;
chart.DataSource = this.dataSource;


where this.dataSource is a List<Obj>, everything works perfectly with the exception that the labels of the slices keep showing the Obj.Data value, instead I want it to show Obj.Label value, what do I need to do?

I hope this is a trivial question, but I can't seem to get it. I tried setting PlotArea.XAxis.DataLabelsColumn and Series.DataXColumn but nothing seems to work...

Thank you
Rodion

 

Rodion
Top achievements
Rank 1
 answered on 12 Dec 2008
6 answers
243 views
Hi,

I am using BusinessObject datasource biding and I have designed my report, now here is the challenge. I need to be able to modify my object collection every time they press a refresh.

I have highly complex statistical report which generates objects based on parameteres (report.ReportParameters[]) and every new set of parameters may imply a completely new set of objects in my collection

Hence, I need some sort of event or function override (I was expecting to use NeedDataSource event on report level) which gets fired every time new data is required. I cannot pre cache all data in constructor (as it is suggested in example) because my data is dependant on parameters that I don't know.

Your help is very much appreciated.

Rodion Pronin
Chavdar
Telerik team
 answered on 12 Dec 2008
1 answer
155 views
Hi

Here I am working on reports with searching criteria.
can give me any example with passing parameters from browser into report.

I have quary like "Select firtsname,lastname from employee where firstname like '%'+@para1+'%'"
para1 parameter i need to pass from web browser.

plz let me know if know any one have answer
thx
Steve
Telerik team
 answered on 11 Dec 2008
1 answer
90 views

I have problem with retreiving  data source columns defined for  my report by clicking data explorer option in telerik reporting menu .

I have a class library project and inside it I create a new telerik reporting class . then I cancel  it's wizard and I put a sql data adapter into my report and  set my connection string and  after that select my desire stored procedure in sql data adapter wizard  from the list and then finisih. After doing all of the mentioned steps I select my report and then set it's data source to sql data adapter / datasource1 , but when I refer to data explorer option and select it report designer say :  procedure or function sp_GetDailyOrders expected parameters @cmp_Id which was not supplied and then no data source column will retreive for me .

If go to select command property of my sql data adapter and then select it's sub property parameters and the assign a default value for my @cmp_Id then data explorer will retreive my data source columns .

Ok, may you please tell me what is the problem ! I don't want to set default value for my paremters .

Please help me .

Steve
Telerik team
 answered on 10 Dec 2008
1 answer
124 views

I am having trouble using an exported StyleSheet in from Telerik Reporting in a WinForms application.  I created a report using the wizard that utilized one of the standard styles.  Then I customized the styled to match a theme and exported the style for reuse.  I created all the reports I needed, now I am having trouble importing the exported style and have it applied to the existing reports (I used the same StyleNames for the selectors as I used the same default theme each time, with the assumption I would be able to apply the custom stylesheet later).

 

·          I clicked on StyleSheet (there were 4 StyleRules defined)

·          Selected the 4 styles then clicked export to save the .xml file

·          Then I imported the .xml file as an Existing Item to the project and changed the Build Action to “Embedded Resource” and Copy To Output Directory to “Copy Always”

·          When I add the External Stylesheet to the report object as a relative object none of the styles are being inherited by the rendered reports.

 

 

Is there something I’m missing?

 

I used http://www.telerik.com/help/reporting/styleexportingandreusingstylesheets.html as a reference.

Rossen Hristov
Telerik team
 answered on 10 Dec 2008
3 answers
258 views

I am trying to create a parameterized report using the following data source:

SELECT SITE, COUNT(SITE) AS #EVENTS, SUM(WORKTIME) AS WORKTIME, SUM(TOTALEVENTTIME) AS EVENTTIME
FROM EDB_RECORDS

WHERE RECEIVEDDATE BETWEEN '2008-10-01' AND '2008-10-31'

GROUP BY SITE

ORDER BY SITE

I can get the report to display with the WHERE statement as written, but I need to change the WHERE statement to: WHERE RECEIVEDDATE BETWEEN @BDATE AND @EDATE. The intent is to have the user enter the beginning date and the ending date.

I set up a web page to pass the values to the report, but was having trouble putting in the code to check for the parameters using an example I found in the forums.

Any assistance will be greatly appreciated.

I’m using VS2008 using VB, MS SQL Server 2005 and .NET 3.5

Thanks,

Doug

Doug Arneson
Top achievements
Rank 1
 answered on 10 Dec 2008
1 answer
112 views
I have problem with retreiving  data source columns defined for  my report by clicking data explorer option in telerik reporting menu .

I have a class library project and inside it I create a new telerik reporting class . then I cancel  it's wizard and I put a sql data adapter into my report and  set my connection string and  after that select my desire stored procedure in sql data adapter wizard  from the list and then finisih. After doing all of the mentioned steps I select my report and then set it's data source to sql data adapter / datasource1 , but when I refer to data explorer option and select it report designer say :  procedure or function sp_GetDailyOrders expected parameters @cmp_Id which was not supplied and then no data source column will retreive for me .

If go to select command property of my sql data adapter and then select it's sub property parameters and the assign a default value for my @cmp_Id then data explorer will retreive my data source columns .

Ok, may you please tell me what is the problem ! I don't want to set default value for my paremters .

Please help me .

Steve
Telerik team
 answered on 10 Dec 2008
3 answers
449 views
Hello,

maybe I'm missing something but I have a problem with retrieving fieldnames from the data explorer. I use the quickstart example for creating a report. I set up the datasource and  I can see the fieldnames in the data explorer but when I want to drag a field on to my report it becomes a 'regular' textbox. Then connection with the field from the data explorer gets broken.
Or maybe I'm doing something wrong but I can't find posts with a simular problem.

Thank you.

Geert
Steve
Telerik team
 answered on 10 Dec 2008
7 answers
86 views
Hello Telerik,

I just upgraded to Telerik Reporting Q3 and I get messages from users that there's something wrong with the layout. Indeed there's someting different and that is that printed items are moving away from each other. For an example of what I mean: http://80.69.83.12:81/downloads/downloads/IncreasingLineSpace.png At the top everything is normal but the next items show increasing white spaces between items. I tried several things already, also colored some items to figure out what the problem can be. Can you give me an solution for this behaviour?

Thanks!

Geert
Geejay
Top achievements
Rank 1
 answered on 10 Dec 2008
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?