Telerik Forums
Reporting Forum
2 answers
115 views
Hi.. 
Again Suriya..,

           Thanks about the clarification about the retrivng the parameter value in the report....

Now i have doubt in displaying "No Records Found" in the web form
 when the reportviewer is empty in the run time..


              By
S.Suriya
Suriya
Top achievements
Rank 1
 answered on 11 Mar 2009
1 answer
89 views
Dear Sir,

I have a problem to acces values on my main report in order to send it to my sub-report.
I have a main report where i display list of colors.
And i have a generic sub-report to display for comments for each color.

So the only problem that i'm facing is to acces the value of "Color Id" and send it to the sub-report.
I tried to access the textbox called "txtColorId" in order to get the value of the actual printed "Color Id" but i didn't succeed.

Is there any way to solve this issue ?
Thank you,

Regards
Pierre


The output of my report should looks like the following:

REPORT TITLE

Color Id        Color Code                Description        
1                    BLUE                           Blue description

        Comments    
        1.    This is a first line of comments for color Blue
        2.    This is a second line of comments for color Blue
        3.    This is a third line of comments for color Blue


2                    GREEN                        Green description

        Comments    
        1.    These are my only comments for color Green


3                    YELLOW                      Yellow description

        Comments    
        not available



Here's my code for the Main report (Color):

namespace

 

Production_Specs_Report.Public

 

{

 

using System;

 

 

using System.ComponentModel;

 

 

using System.Drawing;

 

 

using System.Windows.Forms;

 

 

using Telerik.Reporting;

 

 

using Telerik.Reporting.Drawing;

 

 

using System.Data;

 

 

/// <summary>

 

 

/// Summary description for Report1.

 

 

/// </summary>

 

 

public partial class rptSpecsColor : Telerik.Reporting.Report

 

{

 

private int _SpecsHeaderId;

 

 

private int _RevisionNumber;

 

 

private bool _PrintComment;

 

 

private bool _PrintUdfValue;

 

 

public int SpecsHeaderId

 

{

 

get

 

{

 

return _SpecsHeaderId;

 

}

 

set

 

{

_SpecsHeaderId =

value;

 

}

}

 

public int RevisionNumber

 

{

 

get

 

{

 

return _RevisionNumber;

 

}

 

set

 

{

_RevisionNumber =

value;

 

}

}

 

public bool PrintComment

 

{

 

get

 

{

 

return _PrintComment;

 

}

 

set

 

{

_PrintComment =

value;

 

}

}

 

public bool PrintUdfValue

 

{

 

get

 

{

 

return _PrintUdfValue;

 

}

 

set

 

{

_PrintUdfValue =

value;

 

}

}

 

public void ExecuteReport()

 

{

 

// -----------------------------------------------------------------------------------

 

 

// Get all Colors

 

 

// -----------------------------------------------------------------------------------

 

 

DataSet ds = new DataSet();

 

Production_Specs_WS.

Service v_service = new Production_Specs_WS.Service();

 

ds = v_service.GetSpecsColor(

this.SpecsHeaderId, this.RevisionNumber);

 

 

this.DataSource = ds;

 

 

 

// -----------------------------------------------------------------------------------

 

 

// Call to my subreport: Comments

 

 

// -----------------------------------------------------------------------------------

 

 

// If the user specify to print Comments for Specs Color

 

 

if (this.PrintComment == true)

 

{

Production_Specs_Report.Public.

rptSpecsComment v_rpt2 = new Production_Specs_Report.Public.rptSpecsComment();

 

v_rpt2.ReportTitle =

"Comments title";

 

v_rpt2.InformationType =

"101";

 

v_rpt2.RevisionNumber =

this.RevisionNumber;

 

v_rpt2.SpecsHeaderId = Convert.ToInt32(txtColorId.Value)

-------------------------->  Here i'm getting a problem 
v_rpt2.ExecuteReport();

 

 

if (v_rpt2.DisplayReportIfNoData == true)

 

{

subReportSpecsComment.ReportSource = v_rpt2;

}

 

else

 

{

subReportSpecsComment.Visible =

false;

 

}

v_rpt2 =

null;

 

}

 

else

 

{

subReportSpecsComment.Visible =

false;

 

}

 

}

 

public rptSpecsColor()

 

{

 

/// <summary>

 

 

/// Required for telerik Reporting designer support

 

 

/// </summary>

 

InitializeComponent();

 

//

 

 

// TODO: Add any constructor code after InitializeComponent call

 

 

//

 

 

// Only for test

 

 

this.PrintComment = true;

 

 

this.RevisionNumber = -1;

 

 

this.SpecsHeaderId = 2;

 

 

this.ExecuteReport();

 

}

 

}

}


Here's my code for Subreport (Comments):

namespace

 

Production_Specs_Report.Public

 

{

 

using System;

 

 

using System.ComponentModel;

 

 

using System.Drawing;

 

 

using System.Windows.Forms;

 

 

using Telerik.Reporting;

 

 

using Telerik.Reporting.Drawing;

 

 

using System.Data;

 

 

/// <summary>

 

 

/// Summary description for Report1.

 

 

/// </summary>

 

 

public partial class rptSpecsComment : Telerik.Reporting.Report

 

{

 

private int _SpecsHeaderId;

 

 

private int _RevisionNumber;

 

 

private string _InformationType;

 

 

private string _ReportTitle;

 

 

private bool _DisplayReportIfNoData;

 

 

public int SpecsHeaderId

 

{

 

get

 

{

 

return _SpecsHeaderId;

 

}

 

set

 

{

_SpecsHeaderId =

value;

 

}

}

 

public int RevisionNumber

 

{

 

get

 

{

 

return _RevisionNumber;

 

}

 

set

 

{

_RevisionNumber =

value;

 

}

}

 

public string InformationType

 

{

 

get

 

{

 

return _InformationType;

 

}

 

set

 

{

_InformationType =

value;

 

}

}

 

public string ReportTitle

 

{

 

get

 

{

 

return _ReportTitle;

 

}

 

set

 

{

_ReportTitle =

value;

 

}

}

 

public bool DisplayReportIfNoData

 

{

 

get

 

{

 

return _DisplayReportIfNoData;

 

}

 

set

 

{

_DisplayReportIfNoData =

value;

 

}

}

 

public void ExecuteReport()

 

{

 

// -----------------------------------------------------------------------------------

 

 

// Specs Comment

 

 

// -----------------------------------------------------------------------------------

 

 

DataSet ds = new DataSet();

 

Production_Specs_WS.

Service v_service = new Production_Specs_WS.Service();

 

ds = v_service.GetSpecsComment(

this.SpecsHeaderId, this.RevisionNumber, this.InformationType);

 

 

if (ds.Tables[0].Rows.Count > 0)

 

{

 

this.DataSource = ds;

 

 

if (!string.IsNullOrEmpty(this.ReportTitle))

 

{

 

this.txtReportTitle.Value = this.ReportTitle.ToString();

 

}

 

this.DisplayReportIfNoData = true;

 

}

 

else

 

{

 

this.DisplayReportIfNoData = false;

 

}

}

 

public rptSpecsComment()

 

{

 

/// <summary>

 

 

/// Required for telerik Reporting designer support

 

 

/// </summary>

 

InitializeComponent();

}

 

}

}




Steve
Telerik team
 answered on 11 Mar 2009
1 answer
79 views
I've created a user function in the report class in an attempt to calculate a page number that breaks by group (according to details found in a MSDN post referred to by an earlier thread here).  In short, I pass into my function the field upon whihc my group is based (clientID) and the global value for page number, and sue these values to calculate a new page number.

I then use this function as the expression on a text box in the page footer.

When I view the report I get an error stating that the clientID is not available in that context.

Any ideas on how I can approach this issue?  I'm thinkin that pehaps I can attach to an event on the group and capture the current clientID in a variable that the function would ahve access to?

Any ideas or direction would be helpful.

Thanks
David C
Steve
Telerik team
 answered on 10 Mar 2009
2 answers
133 views
<Edit: Sorry, can't change the thread name after the fact. I meant 'ReportViewer'>

We have a customer using an older version of the ReportViewer. We are attempting to implement an SSL offload solution, and the following code is generated on their page:

<script type="text/javascript">
                var ReportViewer1 = new ReportViewer('ReportViewer1','ReportViewer1_ReportToolbar','ReportViewer1_ctl00','ReportViewer1_ctl01_ReportFrame','ReportViewer1_ctl01_PreviewFrame','ReportViewer1_CP', 'http://192.168.1.1:80/Telerik.ReportViewer.axd?instanceid=ca040209b9c8etc&amp;optype=Report', 'http://192.168.1.1:80/Telerik.ReportViewer.axd?instanceid=ca040209b9c8etc&amp;optype=Export', 'http://192.168.1.1:80/Telerik.ReportViewer.axd?instanceid=ca040209b9c8etc&amp;optype=Print', 'Percent', '100', '');
</script>

The traffic has been decrypted on the outside, and sent to the server on port 80. Everything else is using relative links, so the majority of traffic returns as https://192.168.1.1/foo.aspx

These specific resources cause the browser to attempt to connect on port 80, and triggers a popup "This page contains both secure and non-secure items."

They are using version 2.0.0.0.

Ideally, I'd like to present one of two options:

1. They upgrade to the latest version of the ReportViewer, with an assurance that this behavior will not take place. I don't want to put them through the pain of changing their code if it won't fix the problem.

2. There is a workaround within their version that does not write the absolute path on the page.

If there are any other solutions, I'd be happy to hear them. I'm assuming this must have been a common problem for anyone who has tried to convert their sites to SSL.

Thanks.


Chris
Top achievements
Rank 1
 answered on 09 Mar 2009
3 answers
273 views
Hi,
I want to use Telerik reporting in one of my current projects but have run into a slight problem.

The data which will be used to populate reports is stored as HTML fragments in the database as we need to store formatted text. This does not present a particular problem since the web report viewer will be used and here, all the HTML tagged text is displayed correctly. However, when I export the report to PDF, none of the HTML is properly displayed and instead all the actual HTML tags are included in the PDF. This is also the case if the Windows forms viewer is used.

So for example, the web report viewer would display bold text but the PDF file would show <strong>bold text</strong>.

Is there any work around to this?

Regards,
Jonathan
Steve
Telerik team
 answered on 09 Mar 2009
1 answer
92 views
I have a report that has a group by 2 fields, the name of the person and a league. as a simple example, the first column is the name and the second the league. how can i suppress the name on lines 2 thru x so it does not repeat. it currently looks like:

susan pelzel        t-ball
susan pelzel        U6
susan pelzel        U8
mike pelzel           t-ball
mike pelzel          U6
mike pelzel          U8


Where i would like it to look like:
susan pelzel        t-ball
                            U6
                            U8
mike pelzel           t-ball
                            U6
                            U8

thanks so much!
susan
Steve
Telerik team
 answered on 09 Mar 2009
1 answer
48 views
I created a report then added a report viewer to access it, what I would like to do is pass 2 variables to my report, Is this possible ?
or does the reports only access data files ?

I am very new at this, I did not find anything in the documation about passing variables
if someone could toss me in the correct direction if this can be done or not

thanks
Pete
Steve
Telerik team
 answered on 07 Mar 2009
1 answer
311 views
Hi.,
     Here i am facing one problem while generating report.Some times report viewer showing the message 
        'Report processing was cancelled'.it is confused to the user.Needs to ur solution to detactive this message.


Thanks and Regards,
Suresh
Steve
Telerik team
 answered on 07 Mar 2009
1 answer
100 views
Hello,

I have a Reportviewer and i want to set my report programatically in the code-behind, as i have 1 report viewer and more reports.
When in design mode i can select a report, but how can i do that in C# code behind?

Thanks.

Peter
Steve
Telerik team
 answered on 07 Mar 2009
3 answers
95 views
 I have a textbox that grows so the text within it would need to stretch across two pages when exported to RTF.  However instead of sretching across two pages it moves the entire text box to the next page which results in a large blank space at the bottom of one page.  Is there a way to have the textbox span across two pages?
Thomas Salt
Top achievements
Rank 1
 answered on 06 Mar 2009
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?