Saturday, January 22, 2011

Repeater Table

Repeaters are tables in which you can insert items that are repeated when you run the report. 
For example use repeaters to create mailing labels. 
To build a repeater drop the items you want in the repeater object. Then modify the properties of 
the repeater to obtain the results you want. For example you can specify how many repeater 
frames appear per page by typing values in the Across and Down properties.

Difference between Group span & Level Span

Let us discus about Group span first.

for Example 
In List Report when you have product line product type & product name as a query item. You've product line & product type grouped Ok?
Now you want to span product line as per product type(i.e. you want product line to repeat whenever new product type is listed beside it). You can click on product line & change the Goup span property toproduct type. This gives you the proper result.
Now you want to span product line as per product name(i.e. you want product line to repeat whenever new product name is listed beside it). In this case you have to first group the product name query item then & then you can change Group span property of the product line to product name. Because Group span property lists the query items which are grouped in the list.

Lets discus about Level span now.

for Example 
In CrossTab Report when you have product line as parent node in row product type as child node of product line & product name as child node of product type.
Now you want to span product line as per product type(i.e. you want product line to repeat whenever new product type is listed beside it). You dont have Group span property in CrossTab Ok? Here you can do some trick which is called Level span. You can add one more product type as child to product type & then cut product line from CrossTab. Then select Parent product type & change Source Type property to Data Item Value & Data Item Value property to product line. Now run the report you can see the product line level repeats whenever new product type is listed beside it. This is called a Level Span.
Remember one more thing you can not do same kind of Level Span using dimensional model. You can do Level Span using relational model only...

Difference Between Style variable & Render Variable


Render Variable: - Specify a variable based on which object can be conditionally rendered. 

Style Variable: - Specify a variable based on which object can be conditionally styled. Style variable is               used to show or represent different report objects in different styles that are present in report.

Example  for Style Variable

In a report in a list if u want to display every alternate row with particular color 
in this case, go to query explorer....
1) create a data item with name running-count with function "running-count" on particular unique column
2) now create one more data item as mod  with functon "mod" on that running-count data item.
    Select List and in properties pane..select 'Properties' and select 'running-count' and 'mod' data items.
3)create a boolean varibale with expression mod=1

4)go to the page select List column Body style
5)In properties pane select Style Variable as boolean variable 
6)click on YES variable and set its Foreground color as RED 
7)click on No variable and set its Foreground color as Yellow 
now run the report 



Example  for Render Variable

if the case is like you want to see the  particular page in HTML or PDF or CSV format then 
1)Create 3 pages in your report 
2)every page conatins some specific data
3)name these pages as HTML,PDF,CSV
4)create a String vaiable with 3 values as HTML ,PDF and CSV
5)now in string variable put expression as .....
case
when ReportOutput()='HTML' then 'HTML'
when ReportOutput()='PDF' then 'PDF'
when ReportOutput()='CSV' then 'CSV'
end 

6)now go the page named HTML and select page object 
7)in properties pane click on Render Variable ,select that string variable
8)check only HTML check box value for HTML page 
9)repeat step No. 6 to step No.8 for remaining 2 pages.