Showing posts with label drop. Show all posts
Showing posts with label drop. Show all posts

Friday, February 24, 2012

Limitations in Report Builder?

I'm using Report Builder. I have a NameAddress entity that I want to have printed on the report. There is only one "Drag and drop column fields" box on the "design report" screen. Every field I drop in there goes from left to right. Is there a way to reposition the headers/fields, so that I can have something in the following format:

First Name: xxxxxx Last Name:

Address 1

xxxxx

Address 2

xxxx

City: xxxxx State: xx Zip: xxxxx

Everything I drop in there goes from left to right. I want to position things "anywhere" on the screen, and be able to split the column headers apart from the data.

Basically, how do I get this tool to work like access report designer. Just a simple access report?

Thanks,

Michael

Background:

I have upsized an Access DB into sql server 2005.

I created a model and published it, and now I am trying to simulate a user's day to day ad-hoc report creating activities. They previously used access 2003 reports to do this.

We want to users to use Report Builder, because we don't want them in bi-dev.

Report Builder has only basic layout support in this release. Multi-row or freeform detail layout is not supported, although it is on the list for a future release.

|||

Thanks.

Limit the number of records returned in Stored procedure.

In my ASP page, when I select an option from the drop down list, it has to get the records from the database stored procedure. There are around 60,000 records to be fetched. It throws an exception when I select this option. I think the application times out due to the large number of records. Could some tell me how to limit the number of rows to be returned to avoid this problem. Thanks.

Query

SELECT @.SQLTier1Select='SELECT * FROM dbo.UDV_Tier1Accounts WHERE CUSTOMER IN (SELECT CUSTOMERNUMBER FROM dbo.UDF_GetUsersCustomers('+CAST(@.UserIDAS VARCHAR(4))+'))'+ @.Criteria+' AND (number IN (SELECT DISTINCT ph1.number FROM Collect2000.dbo.payhistory ph1 LEFT JOIN Collect2000.dbo.payhistory ph2 ON ph1.UID = ph2.ReverseOfUID WHERE (((ph1.batchtype = ''PU'') OR (ph1.batchtype = ''PC'')) AND ph2.ReverseOfUID IS NULL)) OR code IN (SELECT DISTINCT StatusID FROM tbl_APR_Statuses WHERE SearchCategoryPaidPaymentsT1 = 1))'

Select the top 100 records:

SELECT TOP 100 *

Select the top 10% of the total number of records:

SELECT TOP 10 percent *

|||

Or if you want to retrieve a limited number of records, but not necessarily the top X records, you could use the row_number() function. For example, to retrieve records 250-299 you could try

 
1SELECT*
2FROM3(
4SELECT *, row = row_number()OVER (ORDER BY id)
6FROM yourtable
7) a
8WHERE rowBETWEEN 250AND 299