Showing posts with label height. Show all posts
Showing posts with label height. Show all posts

Wednesday, March 28, 2012

Max Height problem!

I have written a VB .Net application over 33 webforms which act as a "Wizard" interface by collecting data from a user on each screen - I have one backend SQL server 2000 table for each form.

When the user reaches the last form they have a "Print button" which when clicked creates a localreport, creates a dataset of all data across all tables, creates a reportdatasource based on the dataset.

It then reads a local rdlc file and performs various formatting options by dynamically changing the XML.

I then call LoadReportDefinition to load the report.

I then render the report as a PDF to a byte array and write the array to the response object:-

'Populate(Dataset)

thisdataSet = SqlHelper.ExecuteDataset(sqlConn, "spReportData", FormID)

'Create ReportDataSource

datasource = New ReportDataSource("Accountform_spReportData", thisdataSet.Tables(0))

rpt.LoadReportDefinition(GetCustomizedReportDefinition(thisdataSet, "c:\accountform\Accountformdata.rdlc"))

rpt.DataSources.Clear()

rpt.DataSources.Add(datasource)

rpt.Refresh()

bytes = rpt.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)

' ''Sent byte array to client

Response.Clear()

Response.ContentType = mimeType

Response.AddHeader("content-disposition", "attachment; filename=New Account Form.pdf")

Response.BinaryWrite(bytes)

Response.End()

Everything has been working a treat until I realised that the the report body appears to be limited to 160 inches in height. My report only ever has 1 very wide record in it and is a series of rectangles containing textboxes each rectange is set to have a page break after it. Given that each rectange is 27cm in height it appears that the maximum number of pages I will be able to render is 15 - I need it to be able to go up to 33.

Is there any way of combining 2 reports in to one when you call the render method?

Any other suggestions will be greatly appreciated.

That's an odd limitation. You may want to look at exporting two PDF files and then using a tool like abcPDF to join them.

Here's another article using itextsharp.

http://geekswithblogs.net/bsherwin/archive/2007/06/29/113566.aspx

cheers,

Andrew

Friday, March 9, 2012

Matrix Cell Height?

Is there any way to get the Reporting Server to preserve the height of a cell
in a matrix? Currently, i set CanGrow and CanShrink to false (because i've
already designed the matrix cells to fit the text). However, with these both
set to false, the height is automatically changed to about 50 pixels, and i
can't get it to not do that.
Anyone know how to do this? Please help.
--whitOn Apr 25, 9:50 am, Whitney Yiu <Whitney...@.discussions.microsoft.com>
wrote:
> Is there any way to get the Reporting Server to preserve the height of a cell
> in a matrix? Currently, i set CanGrow and CanShrink to false (because i've
> already designed the matrix cells to fit the text). However, with these both
> set to false, the height is automatically changed to about 50 pixels, and i
> can't get it to not do that.
> Anyone know how to do this? Please help.
> --whit
Check each cell of the matrix control and make sure that 'Can increase
to accommodate contents' and 'Can decrease to accommodate contents'
are not selected as part of the properties (Format tab). Hope this
helps.
Regards,
Enrique Martinez
Sr. Software Consultant