Telerik Forums
Reporting Forum
3 answers
360 views
Hi,

I'm having some difficulty with the Report Parameters. I've been following previous posts and reviewing examples (in particular the WebReportParams) however my parameters are reset back to their default when the report is run. From my debugging it looks like the default constructor is being called when the report is processing which is overwriting the parameter values I previously set.

Here's some of my code to give you and idea of what I'm doing.

ASPX Page - in a button.click handler

Dim report As New BizportReports.PreBill(rcb_BillNo.SelectedValue)
report.ReportParameters(0).Value =
"New Text"
Me.ReportViewer1.Report = report


Report Code - two constructors

Public

Sub New()
InitializeComponent()
Try
Me.DataSetTableAdapter1.Fill(Me.DataSet1.vTable)
Catch ex As System.Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try
End Sub


Public
Sub New(ByVal p_BillID As Int16)
InitializeComponent()
Try
Me.DataSetTableAdapter1.FillWithParameters(Me.DataSet1.vTable, p_BillID)
Catch ex As System.Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try
End Sub

Lastly report parameter is accessed through;

Me

.Report.ReportParameters(0).Value

I tried removing the second constructor to make the BillID a Report Parameter as well, however the same issue occurred and the BillID was always reset.

Any ideas?
Cheers,
Karin

Milen | Product Manager @DX
Telerik team
 answered on 01 Aug 2008
1 answer
191 views
Hi..
     I couldn't move the background image to required position.i want to place background image at particular position.

Regards
 HR
Steve
Telerik team
 answered on 01 Aug 2008
3 answers
61 views
I understand that whether in Smart Part or not, Telerik works as normal like any .NET.

I have a report library like the best practice, have a report in a dll.

the sql i have programatically code in with some params supposed to be keyed in by the user. at the first time when the report is shown, there is no problem. but the moment i press a button and update the params, the whole report give me an blank report.

so i tried having a button but not do anything. pressing the button gives me the same problem. i think the moment there is a postback, the report goes blank. i have no idea what is wrong. would be very grateful if someone can help me with this.

this is my ascx.cs file.

    protected void Page_Load(object sender, EventArgs e)
    {
        ReportViewer1.Report = new LibUserReport();
    }

    protected void Button1_Click1(object sender, EventArgs e)
    {
        Label1.Text = "Datasource is null";
    }

this is my ascx file

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
    <table width="500">
        <tr>
        <td>
            <asp:Label ID="Label1" runat="server" Text="Designation"></asp:Label>
            <asp:TextBox ID="tbDesignation" runat="server"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Text="Preview" OnClick="Button1_Click1" />
        </td>
        </tr>
        <tr>
        <td>
            <telerik:ReportViewer ID="ReportViewer1" runat="server" />
           
        </td>
        </tr>
    </table>   
</ContentTemplate>
</asp:UpdatePanel>

Eugene
Top achievements
Rank 1
 answered on 01 Aug 2008
4 answers
1.1K+ views

can anyone knwos how to convert a sample date in a datafield?

for this sample
  my parameter is Start Date and End Date and i want to view it on one  datafield in header secti

Pag-Ibig Loan Remittance from “Start Date” to “End Date”

on


 

 Start Date: 01/01/2006 End Date: 01/31/2006

 Pag-Ibig Loan Remittance form 01/01/2006 to 01-31/2006


because as of now i try it and the output have time and it should be date only..


if are there any new function in telerik reporting?

such as getting the first,secong,third and fourth value in a data like a Parameter which is datatype is an integer?


sample: my parameter is : Pay Year (datatype is integer)
and input a 2006 in the parameter

the output should be shown on a 4 datafield and every filed there should be one value

like 

 

2

0

0

6





Chavdar
Telerik team
 answered on 01 Aug 2008
1 answer
158 views
Hello,

when I export my report to excel the number values are rendered as cells that are formatted as text. Even if I set the format property on the report textbox to {0:N}. How do I get the output to register as numbers in Excel?

Here's some more information about what I'm doing.

- the datasource for the report is datatable set at runtime
- the textbox values are things like "=Fields.post_po"
- I didn't use the wizard to generate this report
- very basic report with only pageheader, detail, and pagefooter sections

Thank You,
Govinda
Chavdar
Telerik team
 answered on 31 Jul 2008
2 answers
172 views
Hi,

I am using the Telerik report 2.0 (Q3 2007), but recently I wanted to use the new released barcode. So I installed the Q2 2008 without uninstall Q3 2007. Now the problem is: when I am import the the namespace Telerik.Reporting , it will give me a hightlight showing ambiguous namespace. May I know how to solve this?

Thanks in advanced.
Ivan
Telerik team
 answered on 31 Jul 2008
1 answer
138 views
Thie example does not seem to work.   I want to catch the report and find an integer value and replace it with a string.  Do you know how to do that?
I do not see many examples. 

  private void detail_ItemDataBound(object sender, System.EventArgs e)
        {
            Processing.DetailSection section = sender as Processing.DetailSection;
            Processing.ReportItemBase extraShipping = section.Items.Find("extraShippingCostTextBox", false)[0];
            DataRowView row = section.DataItem as DataRowView;
            if (null != row)
            {
                object val = row.Row["Weight"];
                if (!(val is DBNull) && ((decimal)val) > 10)
                {
                    extraShipping.Visible = true;
                }
                else
                {
                    extraShipping.Visible = false;
                }
            }
        }
Svetoslav
Telerik team
 answered on 31 Jul 2008
3 answers
61 views
I am looking at the design view of my class based report and I can't see the buttons to zoom in, align, etc.  Is there some setting that I need to enable in order to see them?
Steve
Telerik team
 answered on 30 Jul 2008
3 answers
85 views
Is there a way to use ajax with the report viewer?  I have tried but it does not seem to work.  Thanks
Steve
Telerik team
 answered on 30 Jul 2008
5 answers
199 views
Hi,

I know currently you can currently programmatically call export functions etc.

I was wondering if in future versions you were going to allow a developer to programatically modify the functions available within the built in reporting toolbar.

Regards,

Graham O'Riley
Netdocs Plc

Graham O'Riley
Top achievements
Rank 1
 answered on 30 Jul 2008
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?