How to separate values in different rows in the same cell in Visual Studio Report 2019? - visual-studio-2019

I'm currently working in a Visual Studio Report and one of the cell fields, affiliation_data, displays several values word wrapped and separated by commas.
Alumnus/Alumna,Employee,Gr
aduate Alumna/us,Parent -
Current,Staff - Current,Student
However, I need to be able to separate each value in different rows in the same cell by the commas, such that affiliation_data now can look like:
Alumnus/Alumna,Employee,
Graduate Alumna/us,
Parent - Current,
Staff - Current,
Student
I tried using the Split Function like these
=Split("Fields!affiliation_data.Value", ",")
but it separates the values into different cells which is something that I am not looking for. Is there something to do with what I'm looking for?

Related

How to merge fields and vertical lines in details section

I am working on web based application using Visual Studio 2019 Preview with SAP Crystal Reports 2016 Support Pack 7.
The report consists of 20 columns in single row. There is a requirement to show two fix headings in details section.
Report Design:
What I want is to set the first heading in first row then list records from database then set other heading and print rest of the records by merging the fields and lines of first and second heading in details sections (similar to excel “Merge Cells Function”). Heading value is set in first column but since the width of first column is too short it is not visible and looks ugly.
Current Output:
Desired Output:
The number of records between first and second heading are not fixed and fetch from database.
In addition, since there are too many columns in single row not all columns are visible in printing. Could anyone advice how to fix them while printing?
Thanks
Group the report based on the logic of how you wish to separate the 2 groups of records.
Then, use a Group Header section to present the information you need at the top of each group.
note: if you are not familiar with Crystal, you Group by using
Insert, Group
or Report, Group Expert

Creating Dynamic Sheet Cell Reference List for pulling numbers to SUM

I've been working on building a data analysis sheet, which is quite verbose at the moment and a bit more complicated than it should be as I've been trying to figure this out. Please note, I work doing student data in a school.
Basically, I have two sets of input data:
Data imported from a CSV file that includes test data and codes for Common Core Standards and the questions tied to those standards as a whole class summary
Data imported from a CSV file that includes individual scores by question
I am looking to construct 2 views:
A view that collates and displays data of individual standards per student that includes a dropdown to change the standard allowing a teacher to see class performance by standard in a broad view. The drop-down is populated dynamically from the input data (so staff could eventually dump data and go directly to reports)
A view that collates and displays data of individual students broken down by performance on each standard allowing a teachers to see the broader spectrum for each student. The student drop-down is populated from Source list 2.
I have been able to build the first view, but am struggling with the second. I've been able to separate the question codes and develop strings of cell references to the scoring data, including a dynamic reference to the row the selected student's score data appears on in the second source set from above.
I tried to pass through an indirect() formula into a sum() so as to process for a mean evaluation, and have encountered errors. I think SUM() doesn't process comma-separated cell reference lists from Indirect() [or in general] or there is something that I am missing to help parse it. Here is the formula I have tried:
=Sum(vlookup(D7,CCCodeManip!$A:$C,3,false))
CCCodeManip!C:C includes the created text (based on the dynamic standards and question codes, etc), here's an example of what would be found there:
'M-ADI'!M17, 'M-ADI'!N17, 'M-ADI'!O17, 'M-ADI'!P17, 'M-ADI'!Q17, 'M-ADI'!R17, 'M-ADI'!J17
I need these to be dynamic so that teachers can input different sets of standards, question, and student data and the sheet automatically collates and reports it in uniform ways (with an upward bound of 20 standards as I currently have it built)
Here is a link to the sheet I built, with names and ID anonymized. There's a CRAP TON of sub-tabs, and that's really just being able to split apart and re-combine data neatly without things error-ing out due to data overlapping, aside from a few different attempts and different approaches to parse the cell reference strings.
The first two tabs are the current status of the data views. I plan to hide a bunch of the functional stuff that is there to help pull data accurately.
The 3rd and 4th tab are the source data sets. 5th is a modified version of source data that allows me to reference things better, and I've tried to arrange the sheets most relevant towards the front of the set.
https://docs.google.com/spreadsheets/d/1fR_2n60lenxkvjZSzp2VDGyTUO6l-3wzwaV4P-IQ_5Y/edit?usp=sharing
Some have a different approach? I am aware that I might be as far as I cn go with this and perhaps should consider scripts - my coding experience is a bit out of date and my strength is more with the formulas, but I can dig into things with some direction, if anyone can help.
Ok so I noticed something.
It seems the failure is in the indirect reference:
=indirect(CCCodeManip!C3)
The string I am trying to parse via indirect is going to be generated into something like this, dynamic from reference to other data:
'M-ADI'!M17, 'M-ADI'!N17, 'M-ADI'!O17, 'M-ADI'!P17, 'M-ADI'!Q17, 'M-ADI'!R17, 'M-ADI'!J17
The indirect returns the error that the above string is not a cell reference with the #REF code.
Can someone give me a clue as to what is causing this? I am going to dig into the docs on Indirect() from google and will post anything that I find.
Perhaps it is that indirect() can't handle lists, but only specific references and arrays, which may require me a to build a sheet to do the SUM formula on for each question set (?)
So I think I figured it out, but i Ended up parsing the data differently, basically doing the sum based on individual cell references and a separate sum formula, bypassing the need to do it all at once, it jsut makes my sheets a lot dirtier! I am eventually going to see if code could do it better if I need to, but this is closed for now.
Basically, I did individual cell references to recall scores in a row, then used a separate SUM formula, and created references / structures to be able to pull those sum() results. Achieves the same end, but with extra crap on the sheet.

How to transpose rows into columns of contact details without mixing them up? (Google Sheets)

I have a data set of contact details where the emails and their names are scattered in rows, I would like to list them in 2 nice columns. I've tried using "paste special" and use this code below, but none of them worked.
This is how it looks like:
I've tried this code, but it only applies to one row, whereas I want to apply it to all rows and columns.
=transpose(A2:R2)
and
=transpose (A2:R300)
Both don't work. I hope somebody can help me with this, I'd really appreciate it. Thanks in advance!
It looks that you are using the wrong terms so you are using the wrong functions.
Apparently you have a cell with data separated by spaces and break lines and you want to have each email and name on it's own cell, having emails on one column and names on the next column.
One way to achieve that, first replace the separating spaces by using a character like | and the break lines by another different character like $.
Note: Some people use Unicode characters that are very unlikely to appear like ♦, ❤.
To do the above for break lines you could use FIND and REPLACE (Ctrl + H) or function formulas like REGEXREPLACE, SUBSTITUTE, and maybe others. As there are spaces used both as word separators and values separators, FIND and REPLACE can't be used easily. For a single cell, maybe the easier way is to insert the name/email separator manually.
Then separate the cell data. To do this you could use a formula function like SPLIT or Data > Separate values into columns.
Another way is by using Google Apps Script and JavaScript string handling methods but basically the algorithm is the same.
Related
How to split this complex string into 3 columns and 50 rows using Google sheet script
Google Apps Script: Create new rows for cells that contain commas
Google Sheets: string to columns and rows

Qlikview selection to work on multiple fields

I have three different tables that contain a similar field ('Department') meaning the possible values in each of them are exactly the same. I have a sheet that shows different objects let's say charts, line graphs, straight table etc based on table 1, 2 or 3. Now because the tables are not directly connected, I can't just have a listbox that selects works on all of them for that column. I want to have a single selection like a listbox based on one of them but a selection is made is like show me all possible values where
Field A = Field B = Field C and on deselect i want to have the same behaviour
Probably I will have to use macros but I am not finding any good guidance.
For this case you can use the set analysis p() function.
For example if your fields are named Department and Department1. Then you have have your listbox based on Department field and in the charts where is needed Department1 selection you can write expression like this:
sum( {< Department1 = p( Department ) >} Value)
This will show sum( Value ) where selected/possible values in Department are equal to Department1
As of the macros - they should be your really, really final solution and try to avoid them. They dont work on 100% when the document is published on the server and they are single threaded, which can lead to performance issues with your app.

Looping through rows

I have an app that displays a number of rows of products. Right now it's hardcoded to use three html rows. I really want to build a template for one row, and loop through and populate as many as I need to show up. I was thinking this is a job for Web UI loops (think fruitsearch example). Or do I want to build the template and make it a web component and pass my data to that? I'm really not sure what the best structure is here. This is a bit of an open-ended question, but what's the ideal structure for populating multiple rows of data?
Use Web Components when you need re-usability, or if your rows have complex logic or layout associated with them.
Given your description of "rows of products" I would use a Web Component for each product row and possibly another Web Component to keep track of all the product rows. For instance, if this is a product search result page, the SearchResultComponent could have a title, a list of ProductRowComponents and the number of results found, and each ProductRowComponent could have a name, a price and an image.
This would make it easier to handle the complexity involved as well as allow re-usability (i.e. using multiple ProductRowComponents).

Resources