This is a migrated thread and some comments may be shown as answers.

Telerik Reporting Doubt: Tables

4 Answers 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marcus
Top achievements
Rank 1
Marcus asked on 04 Jun 2012, 05:26 PM
Hello,


I'm new to the forum, but not new to Telerik. I work for a educational institute that been using telerik reporting for some months.
I have done a few Telerik Reports, but now i face a new problem. I have some Telerik Rad Grids over a Web Page, filled with some datas (Columns and Rows), and i need that information to be put in the Report.
What i did was to creat the same design as the grids on the Reporting, using HtmlTextBox and a Panel. For the grid header i used HtmlTextBox with a fixed Text value, one for each column. For the the data itself, the body from the grid, i used HtmlTextBox with {0} text value, one for each Column, and them, what i do is to put concatenated strings into that field. The Problem is that this gives me so much problem, and so many cases i have to deal with. I'm having to do all treatments on the strings using html, and its not working right.

What i would like to know, is if i can use a Table or Other element, that i can do programmatically a way to add each element on a Row and doesn't matter the text size or word size, the Report will fit it right, and then jump into another Row......

Can you help me out ?

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Jun 2012, 08:49 AM
Hello Marcus,

When you have to create a tabular layout in Telerik Reports, we recommend using the Table item, which is meant exactly for this purpose. You can find more information about it in the child articles of the referred section. Note that you should set a valid expression pointing to the database field for each textbox or other item you use in the table, as the Table would not autogenerate columns.

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Marcus
Top achievements
Rank 1
answered on 05 Jun 2012, 12:11 PM
I nearly did it with a table...

I set up a DataSet into my project, with the fields i wanted. Them i imported that DataSet into the Table, in the Telerik Reporting.
After that,  i used the table's dataSource in the code, to receive an object with strings, the strings were shown in the report correctly. But now i face i new problem.
I need somehow to put more than one strings into the in each field. I tryed to pass the object to the dataSource containing List of strings, but it wont show.....

What i'm suposed to do ?
0
Elian
Telerik team
answered on 08 Jun 2012, 10:27 AM
Hello Marcus,

If you want to display 2 fields in the same textbox then simply using the expression:
=Fields.Field1 + Fields.Field2

If the object you receive is a List, then you have to use some item that supports data-binding (Table, Crosstab, List, SubReport). By using Bindings you can bind the DataSource property to the current DataObject (DataSource    =ReportItem.DataObject.FieldName) and then display the list as you would normally do. 
 
All the best,
Elian
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Nomesh
Top achievements
Rank 1
answered on 20 Dec 2017, 09:49 AM

Hi,

I am using RadGrid in telerik popup window. radgrid not allowing filtering in the telerik popup window. Please help me out.

my sample code:

Page_Load(object sender, EventArgs e)

{

grdAddressDetails.DataSource = (List<DeliveryAddressDto>)Session["DeliveryAddressPopup"];
                grdAddressDetails.DataBind();
                if (grdAddressDetails.MasterTableView.Items.Count > 0)
                    grdAddressDetails.MasterTableView.Items[0].Selected = true;

}

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" Modal="true" Height="500" Width="800">
                <ContentTemplate>

                    <div class="demo-container" id="demo-container2">
                        <div class="gridPositioning">
                            <div>
                                <telerik:RadGrid RenderMode="Lightweight" ID="grdAddressDetails" runat="server" AllowPaging="True" AllowSorting="True"
                                    AllowFilteringByColumn="True" FilterMenu-RenderMode="Lightweight" CellSpacing="0" GridLines="None" Skin="Office2007" EnableEmbeddedSkins="false" Height="380"
                                    OnNeedDataSource="grdAddressDetails_NeedDataSource">
                                    <GroupingSettings CaseSensitive="false" />
                                    <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed" Width="100%">
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="CodeSap" HeaderText="Code Sap" UniqueName="CodeSap" FilterControlWidth="60px" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                                                <HeaderStyle Width="115px" />
                                                <ItemStyle Width="115px" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Type" HeaderText="Type" UniqueName="Type" FilterControlWidth="55px" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                                                <HeaderStyle Width="110px" />
                                                <ItemStyle Width="110px" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Address" HeaderText="Address" UniqueName="Address" FilterControlWidth="55px" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                                                <HeaderStyle Width="110px" />
                                                <ItemStyle Width="110px" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City" FilterControlWidth="55px" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                                                <HeaderStyle Width="110px" />
                                                <ItemStyle Width="110px" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridNumericColumn DataField="ZipCode" HeaderText="ZipCode" UniqueName="ZipCode" FilterControlWidth="55px" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="true">
                                                <HeaderStyle Width="110px" />
                                                <ItemStyle Width="110px" />
                                            </telerik:GridNumericColumn>
                                            <telerik:GridBoundColumn DataField="BomStockPerId" HeaderText="BomStockPerId" UniqueName="BomStockPerId" FilterControlWidth="55px" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                                                <HeaderStyle Width="110px" />
                                                <ItemStyle Width="110px" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridNumericColumn DataField="Id" HeaderText="Id" UniqueName="Id">
                                                <HeaderStyle Width="0px" />
                                            </telerik:GridNumericColumn>
                                        </Columns>
                                        <PagerStyle PageSizes="10,20" PageSizeLabelText="Addresses per page:" />
                                    </MasterTableView>
                                    <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                                        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                                        <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="" />
                                    </ClientSettings>
                                </telerik:RadGrid>
                            </div>
                        </div>
                    </div>
                    <br />
                    <div style="float: right;">
                        <telerik:RadButton runat="server" Text="Add" ID="RadButton3" AutoPostBack="true" OnClick="btnAdd1_Click"></telerik:RadButton>
                        &nbsp;&nbsp;
                        <telerik:RadButton runat="server" Text="Cancel" ID="RadButton4" AutoPostBack="false" OnClientClicked="OnClientClicked"></telerik:RadButton>
                    </div>
                </ContentTemplate>
            </telerik:RadWindow>

        </Windows>
    </telerik:RadWindowManager>

    <asp:HiddenField ID="RandomList" runat="server" />

    <telerik:RadCodeBlock ID="rcb" runat="server">
        <script type="text/javascript">
            function openwin2(id) {
                var elements = document.getElementById(id);
                var cellValue = elements.parentElement.parentElement.parentElement.cells[0].innerText;
                document.getElementById('<%=RandomList.ClientID%>').value = cellValue;

                window.radopen(null, "RadWindow1");
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
            }

            function OnClientClicked(sender, args) {
                var window = $find('<%=RadWindow1.ClientID %>');
                window.close();
            }
        </script>
    </telerik:RadCodeBlock>

Tags
General Discussions
Asked by
Marcus
Top achievements
Rank 1
Answers by
Steve
Telerik team
Marcus
Top achievements
Rank 1
Elian
Telerik team
Nomesh
Top achievements
Rank 1
Share this question
or