Showing posts with label application. Show all posts
Showing posts with label application. 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

Monday, March 26, 2012

max connections pool reached

Hi,
Can anyone tell me if he ever got this issue and how he get the solution. In my asp.net 2.0 application i close always ma connexions to sqlserver in the finally clause (the open is in the try); I open 1 ou 2 connecxions per aspx page, i close them always (in the finally clause or at the bottum of the form). Sometimes, the application is down with the message
Can not open a new connexion, max pool size is reached !!!!

I host my application on a remote server, i have no performance issues, only this great problem !!!
i cant view the status of connexion on the sqlserver, so what can i do, or how shoud i develop my connection.
thanks in advance to all of yuo who will help me.
Imed.

Please visithttp://www.15seconds.com/issue/040830.htm as it has some connection pool optimization tips.

Hope that helps.

Monday, February 20, 2012

Master..sys_datatypes_info and SysxLogins

Hello all,
Recently while testing are application agaisnt Sql 2005, I noticed that the
above tables are missing. i know that it is bad practice to code agaisnt
system tables but it is done. I need to know the equivalent tables in SQL
2005 or better still a process for retrieving literal_suffix and
literal_prefix information.
Thanks
Ronald> Recently while testing are application agaisnt Sql 2005
http://www.aspfaq.com/sql2005/show.asp?id=1

Master..sys_datatypes_info and SysxLogins

Hello all,
Recently while testing are application agaisnt Sql 2005, I noticed that the
above tables are missing. i know that it is bad practice to code agaisnt
system tables but it is done. I need to know the equivalent tables in SQL
2005 or better still a process for retrieving literal_suffix and
literal_prefix information.
Thanks
Ronald
> Recently while testing are application agaisnt Sql 2005
http://www.aspfaq.com/sql2005/show.asp?id=1