Showing posts with label net. Show all posts
Showing posts with label net. 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, March 12, 2012

Matrix Dynamic Column problem HELP!

Ill start off by saying that I am an ASP.NET developer and I am self-taught in using SSRS2005. (quite poorly I might add) That being said I am having a problem with a report im building. This report has 10-12 different metrics I am reporting on and I have each of them displayed in their own matrix. The first matrix was created by the report wizard that launches when you add a new report.

To give you an overview of how I am setting up these reports I will describe the structure I am using on nearly all of the matrices. I am reporting on classes that are managed by my company and held at 3rd party locations. My matrix has the 3rd party location in the rows and the quarter the class was held is the column. Matrix setup looks like this:

__|_Quarter
|MetricA|MetricB|MetricC|etc...
LocationA|
LocationB|
LocationC|

The problem Im having is this. All matrices that weren't created by the wizard don't grow dynamically. Say I have 2 quarters of data I am reporting on, Instead of having a column for quarter1 and quarter 2, the report generates separate matrices for each quarter. This is true for each matrix that I created using a matrix control from the toolbox. The matrix that was created by the wizard however, has dynamic columns that grow to the right as expected.

I am populating my datasets using Stored Procedures and the matrix that behaves normally uses a different dataset than the 4 others I have completed thus far which share a dataset.

I have looked everywhere I can think of for a checkbox or a property I need to adjust and I cant find one. Anyone have any ideas?
Well it appears that I had each Matrix in its own List and I assume that there was some configuration of the list that I missed because when I took it out of the list the matrix rendered as I had intended it to. So I guess I better go read up on lists! Smile

Wednesday, March 7, 2012

matrix

hey there

Can anyone direct me to explicit examples of a matrix.

eg I would like to see the layout view // then preview

I am using Visual Studio.net 2003 and Reporting Services

thanks

jewel

You can install the AdventureWorks sample reports during the setup installation of Reporting Services. The "Company Sales" sample report provides a matrix layout.

You can also take a look at this article: http://www.gotreportviewer.com/matrices/index.html
While that how-to article is targeted at the ReportViewer controls shipped in VS 2005, most of it still applies for Reporting Services 2000 / Report designer in VS 2003.

Also RS Books Online contains information about matrix reports, e.g.: http://msdn2.microsoft.com/en-us/library/ms157334.aspx

-- Robert