Showing posts with label RDLC(SSRS). Show all posts
Showing posts with label RDLC(SSRS). Show all posts

30 May 2012

Temporary table issue in RDLC

I have just created a RDLC report using a Stored Procedure, which uses a temporary table.  I am getting error "Could not generate a list of fields for the query. Invalid object name '#Tablename'".  To fix this add below statement in Stored Procedure before creating temporary tables.
"SET FMTONLY OFF"
Make your temp table a permanent one and do the management of it yourself (deleting rows after use etc). This could be faster as well as indexable and you can add keys as needed to ensure integrity. It can also act as a cache for long running queries.


01 May 2012

Display a serial number in RDLC report

I have developed a report in reportviewer using ASP.NET. I want to display serial number in report follow the below steps. In RDLC design drag and drop a text box from the toolbox and right click on it and select Expression as shown below.


An expression containing the RowNumber function, when used in a text box within a data region, displays the row number for each instance of the text box in which the expression appears. This function can be useful to number rows in a table.
Using RowNumber(Scope) function to display the row numbers. If scope is nothing then RowNumber(Nothing) provides the running count of rows in the outermost data region.

How to Change Date Format in .RDLC reports (MM/dd/yyyy)

In my Report Design i want to show date in the format of (MM/dd/yyyy). The column has the value in dd/MM/yyyy.  The output on the webform looks like this: 05/18/2012 to do this follow the below steps.
Step1: In RDLC design right click on the column/textbox and then it will open context menu as shown below then select the Expression option from the menu.
Step 2:When click on Expression then it will open a windows as shown below. Change the Expression statement as shown and then click on OK button.


RDLC report Text box/Column value formating

In my RDLC reports i want show 2 decimal points. Decimal value like 25.5000 now i want to show it in 2 decimal point in report (25.50). To do as shown below.
Use the "Round" function on your column or Textbox.
Some thing like  =Round(FieldName,2) 
where FieldName is the name of your column or the value you want to round off and 2 is the decimal places