SSRS Report Showing The Size necessary to buffer the XML content exceeded the buffer quota - size

i am developing one ssrs report using sql server 2012. i make my store procedure and called it properly and fields show in report.
now, when i am going to apply average calculation at that time. report show me error like,
"The Size necessary to buffer the XML content exceeded the buffer quota"
my input parameter is just from date, to date and location only. both date are coming from calender and for location i used dropdown.
"my average expression : =sum(Fields![column_name].Value)/COUNT(IIF(Fields![column_name].Value>0,1,Nothing))"
with this function i ignore 0 value.
kinldy please help me to solve this.
thanks in advance.

This because your are referencing some of the fields in the tablix which are not present in your dataset. In my case I reselected all the columns in the Tablix.
Worked fine after that.

Related

SSRS Query paging

I am creating a report from a very large table. I created a very simple report that simply has one table in it. The table does seem to allow paging but every page load takes so long that it seems as if it was pulling the entire table and then paging locally.
I thought I might have to add the paging to the query myself but this doesn't work because the page variables can only be used in the header or footer
="SELECT * FROM MyTable OFFSET " & =Globals!PageNumber & " * 20 LIMIT 20"
I haven't used SSRS before so I'm not sure if there is something really obvious that I am missing.
Any help with how to do this properly would be appreciated.
If you are using any pagination related expressions, SSRS must retrieve all of the data before it display the first page.
For example, if you are trying to do "Page 1 of X" in the footer, SSRS must figure out how many pages exists (by retrieving and pre-rendering all pages) before it can display page 1.
Also, if you don't need all of the columns, don't use Select *. That will force SSRS to load every column into its cache even if they are not all used. You can cut down on the data retrieval execution time.
Finally, if you have access to the SSRS reporting database, you can take a look at the execution statistics for your report to see where the performance problem is happening. https://msdn.microsoft.com/en-us/library/ms159110.aspx
The Global PageNumber in SSRS is generated after the report is rendered. That's why you can't use it in the query.
It's unclear exactly what you mean by paging. SSRS automatically creates pages for the report once the table goes over the page size. If you wanted to just query a small chunk of the table and then click a button to get the next chunk, there's nothing like that readily available.
However, you could use the ROW_NUMBER function in your query and filter that to a particular range in the report. But you have to specify the value of the parameters/filters before you run the report because it uses those to process the dataset and then goes on to render the report.

How do I get the index of each record displayed on crystal reports?

I'm developing winform application using vb.net. I use crystal report in my application. Now i need to store the index of each record that is displaying in current report into database. Then i create another report which displays the index of all the records. My plan is to read the page number of each record and save them on database. I have a group field in the report. I don't know how to scan one by one record and get appropriate page number. I tried the following code to get the field value but did not work.
msgbox(rpt.DataDefinition.FormulaFields("name").Text)
It displayed the formula of that field.
I don't know in which order the records fetched using following.
msgbox(rpt.rows(0).item(0))
Please Help me out....
The way your question reads, it sounds like you're trying to generate an "index" for the order records appear in a report and store that index in a database for use in another report. I am not clear at all what you're trying to do with the page number.
In any case, I need to make something clear: the definition of the report (which you're accessing in your code sample) only represents where data will go when the report is formatted - it is not the actual data itself.
At the most basic level, Crystal Reports takes data out of a database and formats it nicely for you on pages. Rather than trying to take data out of a database, put it into a report, then try to read that report to put it back in a database to make another report, why not just do all your data manipulation at the database level itself before going to a report in the first place?
If you really must have that first report, the easiest option you'll have for getting at the formatted data is to export it to excel and access it programmatically through an Excel API - Crystal Reports doesn't have an API for getting at your formatted data (including things like generated page numbers, whatever you're trying to do with them).
You are trying to break few basic rules. For example a report should never change the data. The right way is to handle data processing in a stored procedure or command and to call the report in a separate process. In such way you will be able to control the data change and data visualization separately.
P.S. You probably mean "Identifier" not "Index"

Display row with condition in Pentaho Report Designer

Assume I have one data set with following fields:
Name, Amount, Time, etc
How can I display only those records with Amount > 100, for example?
Since I need this data set for other report, I can't filter these records when I prepare data set.
I searched around, but couldn't find any answer. I will really appreciate if anyone can help.
By the way, I used Pentaho Report Designer 3.9.
Thanks a lot.
Yes, you can.
You have to find your Details Band - not Details Body -, within your Report Structure, and set up the Style Attribute visible the expression:
=if([Amount]>100;true();false())
Besides, if you want your summaries to consider only the shown data, you can also add an Open Formula function field, that would say:
=if([Amount]>100;[Amount];0)
And you'd summarize it at the end of the report.
Here's the link with the full example built to your situation.

VB.NET Active Reports

I have a VB active report which has many different attributes. The report contains attributes area, balance, id and status and is currently grouped my area. What I need to do now is remove all lines from the report where the balance is equal to 0 and the status equal to deactive. The information for the active report is from my database. Thus I think the best way would be to only select records where the balance is not 0 and status not equal to deactive. Is there a way I can query my database and have the active report be based off the query results? Is there an easy way to do this? Thanks for any help.
Yes, the best way to do this is to change the query so that only the minimum records you need are actually coming into the report. The Modify Data Sources at Run Time topic from the documentation shows how to modify that SQL statement in the code dynamically at runtime.
If you can hard-code the SQL query for the report you should probably just modify the SQL at design time inside the designer. This Bind Reports to a Data Source topic shows you how to do that.
You can also programatically control the visibility of fields/textboxes based on the data using the Format event of the section containing those controls (most likely Detail_Format), but it sounds to me like modifying the SQL query is your best bet.

SSRS: display a message conditionally if the report is empty

One of my clients is concerned that a report that is returned with no records might confuse the user. She would like to have a message at the bottom of the report stating NO DATA if the report is empty.
How could I add a conditional message to the bottom of the SSRS report? Thanks in advance!
There is a 'NoRowsMessage' property for tablix. You can set this property to show a custom message when no row is returned.
NORowsMessage="No data available for current filter selection"
You can also set font size etc.
Add a message to your report with a visibity condition based on the Count of records in your dataset being 0. It should be pretty easy to find using the function button.