RDLC Detail pairs - reportviewer

in and RDLC, on a table each row of info is displayed as two RDLC details rows.
ie
Bob 1234 bobo st 512-512-5122
Jones Austin Tx, 78660 512-512-5133
but when paginating the report, the data pairs get split, with "bob" on one page and "Jones" on another.
Is there any way to force the RDLC Generator to keep these pairs on the same page?
Thanks,
Eric-

Go to Tablix properties
select General
select Page break option
Mark Keep together on one page if possible

Related

SRSS - Double GROUPS from same SQL request in two columns

I'm completly stuck as Im new to SSRS.
I have a set of data formed like this :
A "Selection" of rights concerns several "Companies"
A "Company" contains several "Conductors"
A "Selection" is accessible by several "Accessors"
My SQL results look like this :
SELECTION_NAME
COMPANY_NAME
CONDUCTORS_NAME
ACCESSORS_NAME
SELECT_A
COMPANY_A
John
Maggie
SELECT_A
COMPANY_A
John
Lucy
SELECT_A
COMPANY_A
John
Veronica
SELECT_A
COMPANY_A
Bob
Maggie
SELECT_A
COMPANY_A
Bob
Lucy
SELECT_A
COMPANY_A
Bob
Veronica
SELECT_A
COMPANY_AA
Luke
Maggie
SELECT_A
COMPANY_AA
Luke
Lucy
SELECT_A
COMPANY_AA
Luke
Veronica
as you can see, conductors are repeated as many time as there are accessors to the relative Selection.
I would like to have, in my SSRS report, a relatively same structure BUT I want that conductors, and associated accessors, listed each ONCE.
And, grouping by Selection > Company.
It could be something like this :
SELECTION_NAME
COMPANY_NAME
CONDUCTORS_NAME
ACCESSORS_NAME
SELECT_A
COMPANY_A
John
Maggie
Bob
Lucy
Veronica
COMPANY_AA
Luke
Maggie
Lucy
Veronica
I tried to create 2 datasets and use LOOKUP but if it list conductors only once, at each line, I got the first accessor repeated, no more lines, no other accessors names..
How can I display conductors in 3rd column, regardless number of accessors, grouping by SELECTION > Company AND only SELECTION accessors in the 4th one regardless conductors and also grouping by SELECTION > Company (even if accessors will be repeated on each companies lines of the same Selection) ?
Is this possible with SSRS ?
I'm using Microsoft Visual Studio 2010.
Thank you
You do not need to do anything complicated.
Create a dataset that gives you the table you showed at the start of your question.
Then add a tablix (table) to your report.
There are several ways to create the design but if you start by dragging accessor onto the detail row. Now, under the main design windows you will see a section with Row Groups listed, you will only have one called "Detailed", now you can either drag the Conductor just above the detail row group, or you can right-click the detail row group and add a parent group and select Conductor. Repeat to add row groups for the other two columns.
The SSRS documentation explains this process in more detail
https://learn.microsoft.com/en-us/sql/reporting-services/lesson-6-adding-grouping-and-totals-reporting-services?view=sql-server-ver15
He's quick GIF using your data to show you the basic steps. Notice that I drag the field names just above the existing row group name so that a blue line appears, then I release the mouse button.
I didn't find any ways to do it with only groups..
I created a subreport with accessors (linked to Selection > Company > Accessors).
I added it in a new column in the main report which only displays "Conductors" (Selection > Company > Conductors).
The only negative point is that it's really long charging report.. :/

Merge two CSV and collate data

I have two CSV files, the first like so:
Book1:
ID,TITLE,SUBJECT
0001,BLAH,OIL
0002,BLAH,HAMSTER
0003,BLAH,HAMSTER
0004,BLAH,PLANETS
0005,BLAH,JELLO
0006,BLAH,OIL
0007,BLAH,HAMSTER
0008,BLAH,JELLO
0009,BLAH,JELLO
0010,BLAH,HAMSTER
0011,BLAH,OIL
0012,BLAH,OIL
0013,BLAH,OIL
0014,BLAH,JELLO
0015,BLAH,JELLO
0016,BLAH,HAMSTER
0017,BLAH,PLANETS
0018,BLAH,PLANETS
0019,BLAH,HAMSTER
0020,BLAH,HAMSTER
And then a second CSV with items associated with the first list, with ID being the common attribute between the two.
Book2:
ID,ITEM
0001,PURSE
0001,STEAM
0001,SEASHELL
0002,TRUMPET
0002,TRAMPOLINE
0003,PURSE
0003,DOLPHIN
0003,ENVELOPE
0004,SEASHELL
0004,SERPENT
0004,TRUMPET
0005,CAR
0005,NOODLE
0006,CANNONBALL
0006,NOODLE
0006,ORANGE
0006,SEASHELL
0007,CREAM
0007,CANNONBALL
0007,GUM
0008,SERPENT
0008,NOODLE
0008,CAR
0009,CANNONBALL
0009,SERPENT
0009,GRAPE
0010,SERPENT
0010,CAR
0010,TAPE
0011,CANNONBALL
0011,GRAPE
0012,ORANGE
0012,GUM
0012,SEASHELL
0013,NOODLE
0013,CAR
0014,STICK
0014,ORANGE
0015,GUN
0015,GRAPE
0015,STICK
0016,BASEBALL
0016,SEASHELL
0017,CANNONBALL
0017,ORANGE
0017,TRUMPET
0018,GUM
0018,STICK
0018,GRAPE
0018,CAR
0019,CANNONBALL
0019,TRUMPET
0019,ORANGE
0020,TRUMPET
0020,CHERRY
0020,ORANGE
0020,GUM
The real datasets are millions of records, so I'm sorry in advance for my simple example.
The problem I need to solve is getting the data merged and collated in a way where I can see which item groupings most commonly appear together on the same ID. (e.g. GRAPE,GUM,SEASHELL appear together 340 times, ORANGE and STICK 89 times, etc...)
Then I need to see if there is any change/deviation to the general results in common appearance when grouped by SUBJECT.
Tools I'm familiar with are Excel and SQL, but I also have PowerBI and Alteryx at my disposal.
Full disclosure: Not homework, or work, but a volunteer project, thus my unfamiliarity with this kind of data manipulation.
Thanks in advance.
An Alteryx solution:
Drag the two .csv files onto your canvas (seen as book1.csv and book2.csv in my picture; Alteryx will create "Input" tools for you.
Drag a "Join" tool on and connect the two .csv files to its inputs; select "ID" as the join field; unselect the "Right_ID" as output since it's merely a duplicate of "ID"
Drag a "Summary" tool on and connect the Join tool's output to the Summary tool's input; select all three of the outputs and add as a "group by"... then add the ID column with a "count"
Drag a browse tool on and connect the summary's output to the browse tool's input.
run the workflow
After all that, click on the browse tool and you should see what is seen in my screenshot: (which is showing just the first ten rows of output):
+1 for taking on a volunteer project - I think anyone who knows data can have a big impact in support of their favourite group or cause.
I would just pull the 2 files into Power BI as 2 separate tables (Get Data / From File). Create a relationship between the 2 tables based on ID (it might get auto-generated). It should be one to many.
Then I would add a Calculated Column to the Book1 table to Concatenate the related ITEM values, eg.
Items =
CALCULATE (
CONCATENATEX (
DISTINCT ( 'Book2'[ITEM] ),
'Book2'[ITEM],
", ",
'Book2'[ITEM], ASC
)
)
Now you can use that Items field in visuals (e.g. a Table), along with Count of ID to get the frequency.
Adding Subject to a copy of the table (e.g. to the Columns well of a Matrix) will produce your grouped scenario, or you could add a Subject Slicer.
As you will be comparing subsets of varying size, I would change Count of ID to Show value as - % of grand total.
Little different solution using Alteryx.
With this dataset, there are very few repeating 3 or 4 item groups. You can do the two item affinity analysis and get a probability of 3 or 4 item groups, or you can count the 3 and 4 item groups individually. I believe what you want is the latter as your probability of getting grapes with oranges may be altered by whether you have bananas in the cart or not.
Anyway, I did not join in the subject until after finding all of my combinations. I found all the combinations by taking the Cartesian join of two, then three, then four of the original set. I then removed all duplicates by ensuring items were always in alphabetical order in each row. I then counted occurrences of each combination. More joins can be added in the same pattern to count groups of 5,6,7...
Once you have the counts of occurrences, then I would join back with the subjects and perform this analysis on each group and compare to the overall results.
I'm supposed to disclose that I work for Alteryx.
first of all if you are using windows
just navigate to the directory which contains the CSV and write the following command:
copy pattern newfileName.csv
#example
copy *.csv merged.csv
now you created one csv file, the file is too large now you can't process it once, depending on your programming language you can use appropriate way, for python you can use generators to process line by line, or pandas you can read chunk by chunk it will be easy.
I hope this help you.

SSRS Page Break after custom # of group

I am working on a SSRS report. It is a Tablix with 1 group by city. I would like to have 4-5 records per printer page in PDF. Currently, it is printing 1 record per printed page. This is because I have set a hard page break after each group. I can remove that hard page break but I'm unsure how to get 4-5 on each printed page. I'm not that good with SSRS expressions. Any help is appreciated.
I would handle this by creating another column in your dataset which groups 4 or 5 cities. say the first 5 as 1, then the next 5 as 2 etc.. and then add a parent group to your city group using this column.. then set your page break on that group..

Trying to create an APEX Link Column that queries a report

Basically, say I have a report A and I want to add a link column to it, and I set its target to a page in the application...the page its referring to has another report (lets call it B)
Is it possible for me to somehow make it so that table A's link column opens the page with Report B with rows that have the same column value for one of their columns?
Example here:
A
Name Num1 Num2
--------------
A 5 3
B 3 3
C 4 2
B
Name Quantity Serial
--------------------
D 2 3
E 1 8
F 4 6
So if I click the link column for row A, I want it to open report B and only shows rows where its Num2 = Serial, so only row D would show since it is the only one that equals 3
Using Report Linking to Filter Other APEX Report Outputs
I had some fun with this one although. The "A" and "B" stuff was pretty dry, so I decided to create a data set that was more engaging, and perhaps clearer to understand for the rest of us... :) This is how the data-ecosystem was broken down, and the way I fulfilled the OP requirements.
The Test Schema:
Welcome to the manufacturing facilities of the "Recipe Stack" Food Works. The schema design and ERD (Entity Relation Diagram) is below, with the sample data used for this demonstration:
The data relations are as follows:
The staff at the Stack Food-Works keeps an inventory of all ingredients for the types of meals and prepared foods they manufacture. Each ingredient has a unique ID (INGREDIENT_ID) and the staff tracks the amounts of each item in their pantry.
Each ingredient can be used in multiple recipes, but they will be used exactly once for a given recipe.
The ENTREE_RECIPE table has a COMPOSITE KEY which means it is the combination of the two pieces of this composite key (ENTREE_NAME and INGREDIENT_SEQ) that should be unique.
There is a FOREIGN KEY relation between the INGREDIENT_ID values of both tables.
Report Display Requirements (APEX and SQL Design Elements)
Selecting an item from the FIRST report is used as the input and the restriction/filter criteria of the second report.
User Case #1:
User Selects a Ingredient ID from the list of available ingredients in the pantry.
Input from (1) filters output of the RECIPE REPORT. This is a list of all the recipes that have the chosen ingredient in their formula.
User Case #2:
User Selects an ENTREE_NAME from the RECIPE REPORT. The ENTREE_NAME is used to deliver a third report: the RECIPE FORMULA which is the full recipe for the entree item that was selected from the previous report.
Testing Tools
(You usually need these these for the more complex pages, so it's a good start to use or develop them for the easier ones...)
I made my own, but you can also invoke the SESSION link on the developer's tool bar at the bottom of the APEX page on your running application (when it is displayed).
Here's my idea; it's a header region that also has a button to RESET input values so that I can clear the cache and retest or try other examples. I'll show later how you can use this link to see what is going on. You can see it in the discussion of testing at the bottom of this guide.
APEX Report/Page Design and SQL Parametrization
My columnn linking scheme looks similar to the previous post such as the one from FTaveras. This is how my linking works. What's different is that I do not go to another page, I simply go BACK to the same page I came from. Redirects and Branches apparently don't care if they are simply returning to the same location.
What is different on the return trip is that page parameters that were originally null or unpopulated NOW have a value. That value now brings life to the reports on the page that were empty.
Step 1: The PANTRY REPORT
Output: Query all items from the FOOD_SUPPLIES table.
Inputs: Supply links by INGREDIENT_ID to filter the RECIPE_REPORT output.
How to do it: (hint) To accomplish this, define the report column/field value in your report layout design page as a "linked" column and assign its value as a page item. The page item will be referenced in the SQL query of the next report...
Step 2: The RECIPE REPORT
Output: Query all records from the ENTREE_RECIPE table which have the INGREDIENT_ID from Step 1 within their formula.
Input: Supply links by ENTREE_NAME to filter the RECIPE_FORMULA output.
How to do it: (hint) Include the page item defined from Step 1 within the SQL query of this report:
SELECT * FROM entree_recipe
WHERE ingredient_id = :P3_INGREDIENT_ID
Step 3: The FORMULA REPORT
Output: Query all records from the ENTREE_RECIPE table which have the ENTREE_NAME selected from Step 2.
Debug and Test Run
Most will be able to get this far without any problems. If not, here are a couple of examples of how you can debug and test your work. There may be some built-in tools and packages that already exist within Apex, so any suggestions on alternate approaches are welcome in the comments...!
Using the APEX Developer SESSION Output
After selecting the inputs for the trial run, click on the SESSION link on the developer toolbar at the bottom of the page. This is an example output:
Note that the page items that were set for that session are displayed. The inputs I used for this test were:
INGREDIENT_ID: 6432
ENTREE_NAME: peach cobbler (fresh)
Extra Credit: This one is an alternate approach. It may be useful to design something like this as an add-on to any app you design. You do not need to remove it from your app when you push it to production because there is a "conditional display/suppress" feature for page regions. (check it out)
Simply set a global parameter as a "mode" on your Apex app. Set the value to "DEBUG" or "TEST" or whatever and key all your instances of this page region to display only when the global parameter is set to it.
Wrap Up and Discussion
Hopefully, you've enjoyed your visit to the "Stack Food Works" (no tasting or sampling from the line, please).
This has been more of a holistic approach to Apex app design. It helps to have a methodology to map out each step, and a way to check your work at both the beginning and the end of your development process. Using smaller examples like this demo to apply these methods provides a chance to understand Apex development as a Software Creation PROCESS.
Yes it's possible.
On page B, add and hidden Item name for example P(#)_SERIAL where (#) is your current page number.
Modify your query and add one line like AND SERIAL=:P(#)_SERIAL.
On Page A go to "Report Attributes" tab on the report region, click edit.
On the column link section configure your link to page B and set the hidden item on page B to the value on report column of page A.
Name: Item 1 [P(#)_SERIAL] Value: #Num2#
Demo

Two Datasets one query

I am trying to create a report using two datasets.
The first has a user id which i need to link to the second one to pull the information required. The second dataset query needs the user.id before the query will work Is there anyway i am able to do this.
Thanks
Can you explain your scenario little clear. Are you trying to have a cascaded parameters in SSRS reports? Say, You need to select a Product from the dropdown (Bat, Ball, Nets etc) and depending on the selection another dropdown will be loaded with the relevant data say (For Ball - Basket ball, Volley ball, Foot ball etc)
You will need to create a subreport and from there pass the user id that is returned from the first dataset into the subreports parameter.
If you have not used subreports, here are some articles: (Assuming you are using Crystal Reports)
http://blog.niklasottosson.com/?p=1137