Splitting a Table over multiple pages in SSRS - sql-server

I'm using SQL Server Reporting Services 2008 to produce an invoice. The layout of this invoice is fairly standard - a page header/footer, then some address details at the top, followed by a single table for the invoice lines, and a set of rectangles for the totals below the table.
This report worked absolutely fine in SSRS 2005, but since moving to SSRS 2008 I've found a problem with invoices of a certain length. The problematic length is when there are too many rows to display on page 1, and enough to display the entire table on page 2 (i.e. without the address details being displayed at the top). This means that page 1 contains ONLY the address information, whereas it used to also contain the start of the table.
Screenshot of working report (SSRS 2005):
Working Report http://img225.imageshack.us/img225/1439/invoicessrs2005.png
Screenshot of broken report (SSRS 2008):
Broken Report http://img225.imageshack.us/img225/69/invoicessrs2008.png
I've played with the KeepTogether property of the table (which was set to False anyway), with no effect.
Does anyone have any suggestions how I can make this work?

Richard,
I ran into this incredibly annoying issue before when I was placing graphs on a report that I redid as well. I got so fed up with it and couldn't find anything that explained why it was happening so I just shrunk down the actual size of the table (squished it to the left a bit) until it printed correctly in the preview. It was meant to serve as a temporary solution until I found out why this happened but it is still used like that and it's been about 6 months now.

I recently upgraded to SQL Server 2008 R2, and decided to revisit this problem. It seems to have gone away now with the R2 update :)

Related

Crystal Reports: only field headers showing up. No data

I'm new to CR (this is my first experience in fact). I'm trying to create a report based on a stored procedure I created in SQL Server 2012.
The SP is relatively simple and it runs just fine within SQL Server: all the data is right there in the results.
However, when I created a new standard report in Crystal Reports (2013), I'm able to access my server and database, select the SP, and the fields I want to use. It goes smoothly until I select "Finish". When the report loads, there's only the field headers from the SP.
I'm lost. I've tried it many times and continue to have no data. When I right-click to check the connection, it confirms connection. When I right-click on a field in the field explorer (I believe it's called) to view the data, there's nothing there.
The strange thing is, I created a view in SQL Server with the same query and when I added that view to CR, it worked fine. All my data was right there.
I also tried using a few other SPs in the database and I had the same issue —headers with no data, so I'm pretty confident it's not the SP itself.
Note: after selecting my SP and field when starting a new CR, I'm presented a window to choose the data range (which I assume is based on a date time parameter I have built into the SP). I didn't choose a date range because the end user will be selecting the range they need, so I checked the null boxes. I doubt if this plays any part, but I figured I'd mention it.
There must be something simple I'm missing here. I just don't get it. Any ideas? Thanks for taking the time to help.
put your code and SP so that i can identify

Sharepoint Integrated SSRS report excel export fails

When trying to export a report to excel, the web site loads for some time and I am getting "This page can’t be displayed. Make sure the web address is correct" error.
Here are some platform details:
SQL Server 2012 with SP2
Sharepoint 2013
SS Reporting Services with Sharepoint Integrated Mode
Windows Server 2012 R2
The report itself has 4-5 parameters, calling some views and one procedure, and displays 120K rows with 30 columns max. The whole report without filtering can execute in about 7 seconds in SSMS. SP website can display the results of rdl just fine, report displays fine and fast enough. I can also export the results to csv, xml, all 120K rows of it. But when it comes to exporting to excel, it gets stuck.
Now this is where it gets funny.
When called with some parameters or date filtering, the report comes out nice and easy and can be exported to excel without delay. I have tested with increasing number of rows and excel export works fine up to some 50K rows. The exported xlsx file is around 9MB. But when I increase the date range, excel export is timing out.
Now on to the things I tried.
Exporting to other formats work fine. Just EXCELOPENXML is not working.
Increasing the values of ProcessTimeout, ProcessTimeoutGcExtension and even adding DatabaseQueryTimeout keys in rsreportserver.config did not help.
Increase the values of executionTimeout and maxRequestLength keys in web.config also had no effect.
I restarted Reporting Server services after config changes.
I suspected the 10MB excel export bug in SQL 2012 but that should be resolved with SP2 which is applied in this system.
Also related, few minutes before displaying the error message, web site asks for a re-login to sharepoint site. That happens after a couple of minutes of hitting the excel export. I want to make sure everything is what is supposed to be in sql side before making any IIS config changes.
Any ideas?
A few days of trial and error later, I've found the cause of this issue.
The problem was in a column with an action property of "Go to URL" and the url was set by string concatenation expression, taking 4 parameters from the report fields. Apparently SSRS processes all few hundred K's of data all over again while exporting to excel.
The reason why csv and xml formats were able to process the same report, but excel throwing the timeout remains a mystery to me. All I can speculate is that excel renderer requires more process time to format the cells.
Another way to solve the issue might have been enabling the report snapshot, so report data would be consumed from the cache but I'm not sure excel export would still re-process the report or not.
I solved the issue by adding another column with the same data, but adding the expression below to column visibility property:
=(Globals!RenderFormat.Name="EXCELOPENXML")
So now, the string operations with the parameters are successfully processed to form the URL format in web view, but are not processed in excel renderer.
Hope this helps someone.

crystal reports "show sql query" - how accurate is it?

The business is wanting new crystal reports to be built within designer only and less database objects, like procedures and views. The aim being for future transparent maintenance. But this is making tasks more difficult for me. I am wondering as to the accuracy of Show SQL Query? I have little control over the actual sql query being run on the server and feel like I am flying blind.
Obviously it makes more sense to build as much of the logic server-side but trying to keep client happy. My latest foray highlights some glaring issues with Show SQL Query:
Multiple table hits not showing! eg: 3 different tables needing to
hit the same base table. I have linked up the base table multiple
times and changed the naming to suit. But the query as shown by
Show SQL Query only mentions one of the 3 tables! Even though the
report is working off all 3 repeated tables just fine.
Nested logic is promlematic. I have to copy and paste into a
text editor, do a bit of formatting to make the sql readable and even
then it just doesn't look right logic wise.
Is there another way to keep everyone happy?

Dynamic Data website only displays rows that it inserted to DB

I'm pretty new to creating dynamic data websites - I created one a year ago that is working fine but now I'm trying a 2nd one and having a strange problem.
I'm using VS2010, VB.net & followed MS's waltkthrough for creating a web site using Linq to SQL. Things seem to be working with one MAJOR exception. I've pointed it to a SQL server in my domain but it won't display rows from the DB that were not created through the website. Records that I manually enter through SSMS do not show in the DD List for the table, but rows I inserted thru the website do appear.
I have cleared the table and refreshed the list view and all rows disappear. Then if I add rows via SSMS they do NOT show up but website added ones do. This is important because I'm going to be importing data from an old (non SQL) DB that I'm converting.
I really don't know where to look to resolve this - Does anyone have any ideas?
Thanks!
The records I entered thru ssms had bad values for a foreign key and evidently DD is doing inner joins instead of left outer. I don't know if that is a bug or a feature.

SQL Server intellisense for columns not working for some tables in SQL Server 2008 R2

I am having some troubles with intellisense in SQL Server 2008 R2.
Intellisense for all tables works fine, but the column intellisense only seems to work for some tables.
For example, this query pulls up a list of all the functions and navigates to the items starting with "sta":
select *
from tbl_cash_stats
where sta
This query doesn't pull up anything after the where clause regardless of if I type any characters or not
select *
from tbl_assignment
where
Furthermore, if I join a table that is working properly with one that is not, no column-level intellisense works:
select *
from tbl_cash_stats
join tbl_assignment
on
I have refreshed local cache several times with no success. There appears to be no specific reason why certain tables work perfectly and others do not, and only about 15% of the tables are affected.
Does anyone have an idea of how to fix this? It has become extremely annoying because it is affecting some of the tables I use most often.
EDIT: After looking into the tables that were affected more closely, it appears that it is only tables with an identity column that do not work with intellisense, but I still cannot figure out why.
Out of sheer luck I stumbled on the answer to this question.
On Friday, I installed Visual Studio 2010 SP1. After the install, I noticed that intellisense for SQL server stopped working completely. Apparently, this is a known issue and can be fixed by installing Cumulative Update 9
Much to my suprise, this update also resolved the issue of intellisense not working on tables that had identity columns.
I hope this saves others from having to deal with this rather obscure issue in the future.

Resources