May 15, 2018 at 10:07 am
Hello,
I'm currently working on a report, but I have some problems.
I'm working on a database containing two tables :
1. a table Agency containing two fields :
NumAgency ==> ID of the agency.
NumDepartment ==> ID of the agency's departments
2. a table InfoDepartment containing three fields :
NumDepartment ==> ID of the department
NameDepartment ==> the name of the department
InfosSup ==> a test column (ignore it)
So I created my DataSource, and I also created a DataSet that displays all the information of these tables (NumAgency, NumDepartment, NameDepartment, InfosSup).
I would like to create a report in this form :
I tried to create it but I always come across the same problem.
I first created a rectangle and inserted my table containing the identifier of the department and the agency.
I have grouped the NumAgency field on NumAgency and the NumDepartment field on NumDepartment. Then I made a page break on the cells of the table. The agencies display is therefore functional (I do have one agency per page).
I did the same procedure for the departments but I have a problem, when I execute the report:
I'm getting this result :
The department is not displayed, but the agencies are displayed.
But when I shift my table of departments :
When I execute:
Everything is functional.
I noticed that the concern comes from the grouping on the cells (without them, the alignment is functional) but I don't want to remove them.
So I would like to know if it is possible to come up with a report that would allow me to align my tables vertically.
I did some unsuccessful internet research and I tested:
- Delete rectangles
- Modify the dimensions of the report, table and/or rectangles
but it still doesn't work.
Thank you for any help you can give me.
May 15, 2018 at 10:50 am
So, I think your problem might be related to using a rectangle directly instead of a List. A list will repeat the rectangle for every "group" you designate it for. Whereas a rectangle by itself is stagnant. However, I'd suggest just using a single Tablix instead and using the row grouping to achieve your format. If you need to page break you can go to the group properties and tell it to break on each member of the group. The below is a sample of achieving the beginnings of the format you're trying to achieve (minus any page breaking).
Here is the output
Test dataset I used. DECLARE @Agency table
(
NumAgency varchar(2)
,NumDepartment varchar(13)
)
INSERT INTO @Agency
VALUES
( 'A1' -- NumAgency - varchar(2)
,'D1' -- NumDepartment - varchar(13)
)
,( 'A1' -- NumAgency - varchar(2)
,'D2' -- NumDepartment - varchar(13)
)
,( 'A1' -- NumAgency - varchar(2)
,'D3' -- NumDepartment - varchar(13)
)
,( 'A2' -- NumAgency - varchar(2)
,'B1' -- NumDepartment - varchar(13)
)
,( 'A2' -- NumAgency - varchar(2)
,'D2' -- NumDepartment - varchar(13)
)
DECLARE @InfoDepartment table
(
NumDepartment varchar(3)
,NameDepartment varchar(30)
,InfosSup varchar(20)
)
INSERT INTO @InfoDepartment
(
NumDepartment
,NameDepartment
,InfosSup
)
VALUES
( 'D1' -- NumDepartment - varchar(3)
,'Test D1' -- NameDepartment - varchar(30)
,'ABC' -- InfosSup - varchar(20)
)
,( 'D2' -- NumDepartment - varchar(3)
,'Test D2' -- NameDepartment - varchar(30)
,'ABC' -- InfosSup - varchar(20)
)
,( 'D3' -- NumDepartment - varchar(3)
,'Test D3' -- NameDepartment - varchar(30)
,'ABC' -- InfosSup - varchar(20)
)
,( 'B1' -- NumDepartment - varchar(3)
,'Test B1' -- NameDepartment - varchar(30)
,'ABC' -- InfosSup - varchar(20)
)
,( 'B2' -- NumDepartment - varchar(3)
,'Test B2' -- NameDepartment - varchar(30)
,'ABC' -- InfosSup - varchar(20)
)
SELECT a.NumAgency
,a.NumDepartment
,b.NameDepartment
,b.InfosSup
FROM @Agency AS a
JOIN @InfoDepartment AS b ON a.NumDepartment = b.NumDepartment
ORDER BY 1
,2
May 15, 2018 at 10:54 am
Looks like you haven't set your groups up properly. This'll likely be easier to trouble shoot with consumable sample data and the rdl of your report (which you'll need to upload as a txt file).
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 15, 2018 at 1:42 pm
Thank you for your answers! Bad_Karma, I'll try your solution and Thom A you're probably right. Thanks Again !
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply