Telerik Forums
Reporting Forum
1 answer
318 views

Hello,

I'm trying to create a table programmatically. I have been rather succesful in doing so but I can not find a way to set the size for the columns and rows (width for columns and height for rows).

When you create a report using the designer you can do so by using the mouse. Also if you click on the columns the property editor shows an item with the name TableColumnX or TableRowX where X is the number of the column. However I was unable to locate these items in the code-behind of the report.

Any ideas?

Svetoslav
Telerik team
 answered on 01 Jun 2009
1 answer
295 views
Development Environment:  VS Studio 2005, ASP.NET, VB.NET, Telerik Reporting v3.0.9.430

Problem: Trying to hide empty space of a subreport which resides within a subreport.

Attempts so far:  Tried setting height of the detail section of both sub reports to 0.01 within the constructor.  Have all text boxes property CanShrink set to True.

Report Design Look:

Main Report:
-------------------------------------------------
Report Header Section
-------------------------------------------------
Detail Section with Text Boxes
SubReport1
-------------------------------------------------

SubReport1 (w/Header/Footer Visible=False):
-------------------------------------------------
Detail Section with Text Boxes
          SubReport2
-------------------------------------------------

SubReport2 (w/Header/Footer Visible=False):
-------------------------------------------------
Detail Section with only one Text Box (CanShrink=True)
-------------------------------------------------


Code for both SubReport1 and SubReport2:
Public Sub New()  
    InitializeComponent()  
    Me.DetailSection1.Height = Unit.Inch(0.01)  
    Me.DataSource = Nothing 
End Sub 


Report Output:
By setting the border for the detail section of SubReport1 and SubReport2 I can see that SubReport2 is hidden yet SubReport1's detail section is still expanded for the content of SubReport2.  This report has mutliple rows returned and only a few rows will contain data within SubReport2.  SubReport1 always has data

Here is an example of what it should look like:

                              Example Report 1
Patients for: Dr. Bob Burns
Name                  DOB                   Age                   Gender
Bob Smith           01/01/1974        35                      Male
Nancy Apple       05/01/1976        33                      Female
          Here are some notes for Nancy Apple
Joe Johnson       03/25/1978        31                      Male


Here is what is really produced by the report:

                              Example Report 1
Patients for: Dr. Bob Burns
Name                  DOB                   Age                   Gender
Bob Smith           01/01/1974        35                      Male

Nancy Apple       05/01/1976        33                      Female
          Here are some notes for Nancy Apple
Joe Johnson       03/25/1978        31                      Male


Any help is greatly appreciated.

Warren
Steve
Telerik team
 answered on 29 May 2009
16 answers
443 views
I posted a couple of weeks ago about a "No Parameterless constructor" error I was getting:

http://www.telerik.com/community/forums/reporting/telerik-reporting/no-parameterless-constructor.aspx

I was referred to a thread:

http://www.telerik.com/community/forums/reporting/telerik-reporting/binding-to-an-arraylist.aspx

On searching, I found a couple more:

http://www.telerik.com/community/forums/reporting/telerik-reporting/error-messages.aspx

http://www.telerik.com/community/forums/reporting/telerik-reporting/instance-variables-are-lost-when-using-stateserver-as-session-state-provider.aspx

http://www.telerik.com/community/forums/reporting/telerik-reporting/instance-variables-are-lost-when-using-stateserver-as-session-state-provider.aspx

The core of the problem is that when sessionState mode='StateServer' or mode='SqlServer' or mode='Custom', the Telerik reporting engine serializes the report, and then deserializes it using the derived class's parameterless constructor.

Now for us, using mode='inProc' is not an option.  I've got no great objection to passing the parameters to the derived report class in some other way.  But I'm at a loss as to what other way we can use.

We have a button click event on the page.  In it, we construct an instance of the derived report class, passing parameters to the constructor, and assign that object to ReportViewer.Report.  It does it's business, and the next time I'm in my own code is in the parameterless constructor of the derived report class.  But how do I access the parameters I used when I called the other constructor? 

I can't save them in member variables, because they aren't being saved and restored during serialization.

I'm not in a Page, so I have no access to Session.  (I thought for a moment that I might be able to access the page, through Report.Container, but it's null.)

So next, I thought that adding them to Report.ReportParameters.  But they're not being restored, either.

So where do I store them, so that I can restore them at the appropriate time?
Steve
Telerik team
 answered on 29 May 2009
1 answer
212 views
I have a report that has picture boxes. If the path specified doesn't exist, the picture box renders as a huge error message that pushes other information off the report and causes blank pages to render. I would like the picture box to render either blank or stay within its defined size(not get unexpectedly large to display the error). I cannot assume that all pictures needed exist, but the picture information is not that critical. However the information the picture box error obscures is critcal.

Is there any way around this?

Steve
Telerik team
 answered on 29 May 2009
2 answers
114 views
I have a stored procedure which gives me two different tables. One having the details of the loans and the other having calculated averages of the numbers of these loans. I have two sections of the report which are to be binded respectively with these two tables.
My problem is how can I handle a dataset with the procedure giving me two result sets?

Any help would be appreciated. Thanks


Sony Telkar
Top achievements
Rank 1
 answered on 29 May 2009
3 answers
184 views
I've following xml file. Each room is a position on a invoice and each room may include multiple optional packages (sub positions). I know I can use the xml to create a dataset and bind it to the control, but how can I define which part of the data to use for the different sections and textboxes? Is there an expression to define table and column or binding a table to a subreport?

<MyOrders>
  <room>
    <roomname>Zimmer</roomname>
    <nr>1</nr>
    <confnumbername>Ihre Reservierungsnummer</confnumbername>
    <confnumber>PL238035928P1<confnumber>
    <selectedroom>Executive Suite</selectedroom>
    <selectedrate>Katalogpreis</selectedrate>
    <ratedes>My rate description</ratedes>
    <details>Anzahl Erwachsener: 2</details>
    <price>480,00</price>
    <curr>EUR</curr>
    <packageinfotxt>Zusätzlich gebuchte Pakete</packageinfotxt>
    <packages>
      <package>
        <packagename>Dünen Beauty</packagename>
        <packagecount>1</packagecount>
        <packageprice>290,00</packageprice>
        <curr>EUR</curr>
      </package>
      <package>
        <packagename>Beauty Arrangement</packagename>
        <packagecount>2</packagecount>
        <packageprice>348,00</packageprice>
        <curr>EUR</curr>
      </package>
    </packages>
  </room>
  <room>
    <roomname>Zimmer</roomname>
    <nr>2</nr>
    <confnumbername>Ihre Reservierungsnummer</confnumbername>
    <confnumber>PL238035928P1<confnumber>
    <selectedroom>Executive Suite</selectedroom>
    <selectedrate>Katalogpreis</selectedrate>
    <ratedes>My rate description</ratedes>
    <details>Anzahl Erwachsener: 2</details>
    <price>480,00</price>
    <curr>EUR</curr>
    <packageinfotxt>Zusätzlich gebuchte Pakete</packageinfotxt>
    <packages>
      <package>
        <packagename>Dünen Beauty</packagename>
        <packagecount>1</packagecount>
        <packageprice>290,00</packageprice>
        <curr>EUR</curr>
      </package>
      <package>
        <packagename>Beauty Arrangement</packagename>
        <packagecount>2</packagecount>
        <packageprice>348,00</packageprice>
        <curr>EUR</curr>
      </package>
    </packages>
  </room>
  <booker>Frau erzet</booker>
  <hotel></hotel>
  <total>1.118,00</total>
</MyOrders>
Steve
Telerik team
 answered on 28 May 2009
12 answers
292 views
Hi, I have added to a solution a Telerik Report.
When start the wizard I have select "BusinessObject" in datasource option, when I click "Next >" VisualStudio freeze....:-(

Thank for any suggestion
Giorgio
Steve
Telerik team
 answered on 28 May 2009
1 answer
247 views
Hello
I have table structure with headers of columns in my web  reports.After extracting the  report to pdf ,I see table headers (column names ) in my first pdf page ..However if tables shrinks down to the other pages  , table headers is not vsible on second ,third...pages .
I need to show table header /column names on this pages as well.How can I program it ?

Thanks a lot in advance
Regards
Steve
Telerik team
 answered on 28 May 2009
1 answer
96 views
Hi,

I want to create sub reports, I can able to create normal reports but haven't used creating sub-reports.

is there any video creating sub reports or documentation in detail.

Thanks.
Steve
Telerik team
 answered on 28 May 2009
4 answers
438 views
Hi,

I place few textboxes in the details section which i am displaying data through programmatically. And i am doing conditional formatting with few of the textboxes with changing the background colors and everything works. But Few textboxes contains lot of text which shows increasing height and few of them are small but does increase the height. I did conditional formatting to change the background colors of these small textboxes which does not increase in height as the other textboxes so that the height is equally to details section.

Even i try in code but does not effect anything for small textboxes.

Public Sub New()
        InitializeComponent()
        DisplayData()
        M1.Height = Me.detail.Height
        M2.Height = Me.detail.Height
        M3.Height = Me.detail.Height
        M4.Height = Me.detail.Height
        M5.Height = Me.detail.Height
        M6.Height = Me.detail.Height
        M7.Height = Me.detail.Height
        M8.Height = Me.detail.Height
        M9.Height = Me.detail.Height
End Sub



Pleae tell me how to increase the height of the textboxes dynamically what ever height of details section.

Thanks.

Regards
Syed Arshad
Steve
Telerik team
 answered on 28 May 2009
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?