SSRS - group by on top of page - service

in Reporting Services when we group by one column we get the group in the left of the detail. Is it possible to make that group by in the top, just like in Crystal Reports?
Page 1:
Invoice A - name A (on top of page)
Detail 1
Detail 2
Page 2:
Invoice B - name B (on top of page)
Detail 1
Detail 2
I can only get
Invoice A - name A - Detail 1
Invoice A - name A - Detail 2
Invoice B - name B - Detail 1
Invoice B - name B - Detail 2

I've gotten this to work, but it's a pain.
First, make sure that your table is set to page break after every group.
Click on the box in the table that has the info you want to move to the top of the field (the name, the invoice, whatever) and get its name.
Wherever you want that data (i.e. in the page header), add a textbox whose value is =First(ReportItems![name].Value).
Unfortunately, that will leave you with the group heading still also present in the table. That's not necessarily a bad thing.
If you want to completely do away with that:
Stick your whole page in a List control, also set to page break after this element.
Set the List to group by invoice/name/whatever
Do the same as in the first option for the header
Put the table inside the list, with all grouping turned off. I can't remember right now whether you have to manually tell it to use the List's dataset; try the default first and see if it works.

Related

How to get a page per register stored in DDBB in jasperreports?

I have a report with the following structure:
PAGE HEADER
DETAIL BAND (12 of those)
SUMMARY BAND
The detail bands show depending on expressions I specified. Also, the content of the detail bands are subReports, one per detail band (don't know if that is relevant or not here).
What I'm trying to achieve is to execute the report without any filter as the ID or any other field of the table. Instead, I want to extract the information of all the registers of one specific table (let's name the table USER).
What I'm expecting to find when I execute the report is something like the following:
PAGE HEADER
detail sections (shown depending on the expressions )
SUMMARY
What I'm getting looks similar to the following:
PAGE HEADER
DETAIL 1 (for user1)
DETAIL 2 (for user1)
DETAIL 1 (for user2)
DETAIL 4 (for user3)
and never the summary band (just at the end of the report)
As you can see, all the users are getting mixed while what I want to do is to start a new page for each one of them.
QUESTIONS:
How can I get the report to show each one of the users from the table
in separate pages?
Is there some property I missed that allows me to
do that?
Thanks!
I think I found a way to solve this challenge. I just made a group (Group1) based on the ID's of the users and put the content of my Page Header inside the Group Header just created. Did the same with the Summary band, put all it contents inside the Group Footer.
Then, selecting the Group Header (or the Group Footer) I checked the Keep Together and the Start New Page checkboxs from the Appearance tab.
Furthermore, for each one of the detail bands, selected the Group1 just created for the Group Changes selection combo in the Appearance tab.
I didn't do much testing yet but it seems like it's working as I wanted it to. If I find any other (better) solution I'll update the answer. Still open to hear advices though.

Group by options in a cross tab report

I have a cross tab report in Crystal 2008 (ver 12). First column has a name and second as a phone number.
If there are two individuals with the same name, the report seems to combine the two cells and only show the name once (its like two rows have been merged into one such as in Excel). Both numbers however are shown correctly in two separate rows.
How can I show the name twice and not have it merged or group together?
[]
Your Cross Tab works fine because it's the same name (and cross tab put's it in one group row/column). To separate it, you have to make your column/row by some id_column of that person, but display name instead of that id_column.
For example you put your field in row/columns (id of person, not name),
and then press Group Options and set the name to be displayed
And that should do it.
Hope it helps

Split page details in crystal report to contain many data

I'm using crystal report XI release 2 to make a report from SQL Server views
View 1 : OrderDetails
View 2 : SalesMen
OrderDetails contains only one record but SalesMen contains 5 records
i want to add both data in one page but i don't know how because when i add data from SalesMen it also repeat all data from OrderDetails and when choose Suppressed If Duplicated on all field in OrderDetails it's leave a blank area for unrepeated data which make very large spaces
Check the following images for more description
This how i want it to be like
and this is how it looks like
Note : And what if i have 2-3 views that contains several records and i want to show them in the same page?
Okay i've got what i was looking for
the solution is very simple, Create an sections inside details then create a sub reports and add it inside the section like the following steps
1 - Right click report body then select Section Expert
2 - From section tab click on details then insert sections as much as you want to add separate sections then press ok
3 - From crystal report main window click insert then click subreport
4 - name your sub report and add what you want
5 - insert the sub report inside the section you made
you can add it horizontal or vertical it's up to you.

how to put two records same page

I have a page with exactly same pre-format data in the left side than in the right and i need that my result query data that gives me example 10 records i need to show in the left side first record, in the right side second record on first page and then do the same with all records Now i make a first report wich calls another one, first report gives me data but i can only show one record per page in second report, i need 2 records per page, one in left side and another in another side of the page...
Assuming that each of your records will take up more than half a page, this should be as simple as changing the report to have 2 columns.
In iReport, select the report itself (top element) in the report inspector, then change the Columns property to 2. Alternatively, in the JRXML, add/change the attribute columnCount on the jasperReport element to 2.
If your records occupy less than half the page height each, you will end up with multiple records per column. To get around this, create a group with the expression $V{REPORT_COUNT} and check the "Start on a new column" property (set the isStartNewColumn attribute in JRXML). This will create a new column for each record.

Erroneous duplicate rows in BIRT report

I have a problem with a BIRT report I'm working on where I have a nested table in the report. The outer table contains data to do with an item on an invoice, while the inner table contains stuff to do with price banding for labor charges. I've written a separate DataSet which gets the inner data, bound by parameters to data in the outer table. Now, when I preview the inner DataSet in BIRT using the defaults I've given it, it returns two rows of data for that bill number & item number - a normal rate & an overtime rate if you like. When I run the report in full over the same data, the outer table stuff is fine, but the inner table just repeats the same row over twice - it's just the first row repeating.
This is sorta what the table looks like in layout view:
Item Description Rate Quantity Item total
[item] [desc] [rate] [quantity] [total]
...where the price & quantity are in the inner table.
I'd have expected to see something like:
Item Description Rate Quantity Item Total
1 Callout $40 1 $40
2 Labor $30 4.5 $185
$50 1
but instead I get more like:
Item Description Rate Quantity Item Total
1 Callout $40 1 $40
2 Labor $30 4.5 $185
$30 4.5
...even though querying the database & previewing the inner data set based on the same input criteria show the expected result.
Has anyone else had experience like this? I have a hunch it's to do with bindings, but not sure what.
One way to get this behavior is by accidentally replacing a table-level binding with a column-level binding.
For example, define a table by dragging a data set into the report. Select the entire table (use the outline view, or select something in the table and then click on the "Table" button that pops up just below the grid.) Then go to the Binding tab. Note that the data set and column bindings are all filled in.
Now select just one field in the Detail row. On the Binding tab, note that the Data Set is blank, and no column binding is shown. Someone who is confused by this (as I was) might then edit the column's binding and specify the same Data Set that was used to create the table. If you do this you will only see a single value repeated in that column when you run the report. (I believe the overridden column is binding to a second instance of the data set, not the one the table is iterating over.)
Not sure your question can be answered withou looking at the data and the design. But it is important to note that the results you see in the dataset preview, and not neccisarly what you would see if the query was run fully. I have seen difference with 7 records returned. I thought as it was only 7 it would be the same on full run, but it's not. The preview is not just a top 500 query, it has some other (not sure what) filters also.
To problem solve if it is your query or your binding.
If you are using a SQL database. Run the SQL in a SSMS query and see if you get the same results you do when run in the innner table.
Altentively, create a new test report, copy over your dataset and use with a stand alone table.
I think I sorted it, & this is the most bizarre thing: On the child table I'd been deleting the header & footer row & just leaving the detail row in, in the layout view. Last thing today, just before I was going to go home, I tried again - deleted the table for about the 70th time that day, replaced it, re-did the parameter bindings all exactly as before, but this time I left the header row & footer intact. Clicked the preview tab, voila, all shows up correctly. So, since I didn't need the header or footer on the child table, I went into properties, clicked Hide this element, preview again - all good. No difference to the data bindings, no difference to mappings or anything else, no change to the data sets - the only difference was leaving the header & footer in place but hidden.
Contemplating making a bug report, tbh.