synchronize textbox heights
In my web app I instantiate a localreport object, build five Collections.Generic.List(s), and assign as data sources. Each data source has a different type info for the report. On the report a textbox is printed for each followed by a table bound to the data source. This works really well, except I want to get rid of section names having empty tables. I could hide these, but page space is still used. Instead of the page having blank spots I want to bring other items up on the page. What I did was use one data source tied to a list and in the data source include a field saying what type of row with five options: 0=blank row, 1=section name, 2=row containing one column, 3=row containing two columns, 4=row containing three columns. The data source then has six fields. For a row with one column the first field contains info. For a row with two columns the next two fields contain info. For a row with three columns the next three fields contain info. Six text boxes are added to the report on top of each other, bound to corresponding fields, and hidden depending on the value of the row type field. I almost got this working, but I also want borders around the text boxes, and the text boxes may grow. The report prints, but on a row the text boxes may have different lengths if some grow and others don't. There is no option to set height to an expression. Height of lines cannot be set dynamically, either. So I thought I would use a text box, show only the left border, and vary the padding or line height attribute as an expression. Then I found out I have no way to read the height of any of the text boxes. There is no control!textbox.height property or anything like that. If there was I could use iif and set the padding or lineheight property of the fake text box. Anyway, I really would like to make this work and hate to give up on anything. Ideas would be appreciated. Stuff I've tried so far has been limited to contents of the RPT file. I did not see any functionality I could trap on the Microsoft.Reporting.WebForms.LocalReport, and the only event provided is SubreportProcessing, which I am using, but I can't get to any of the text boxes through it. Thanks
March 14th, 2011 7:48pm

I changed the style of the reports to not use borders around text. Looks real good.
Free Windows Admin Tool Kit Click here and download it now
March 29th, 2011 2:15pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics