What is the best way for creating reports in MVC? - model-view-controller

I've been reading online about either using RDLC or RDL reports however, I'm not sure if this is correct/best path for creating reports.
Any other recommendations are very much appreciated it.

MVC is a style of web development that doesn't really have anything to do with reporting. Your options are basically (1) create "reports" as web pages that dump data to the screen, or (2) use a report engine like SSRS (which uses .rdl) or BIRT. The first option is terrible if anyone ever wants to save or print the report. It's difficult to get it to page correctly or even group and sort things they way you want. Reporting engines handle all of that for you, so it knows how much data will fit onto a page given the paper size and margins you've set, and they have built-in methods for exporting the data to PDF/Word/Excel, etc. They also make it easy to add headers, footers, page x of y, etc.
For SSRS you'll need a SQL database with SSRS installed, and it serves reports up via its own version of IIS. This usually means that you'll need a hyperlink on your MVC app that points to the report's URL on the report server. You can either use ReportBuilder or Visual Studio with the appropriate settings (see SQL Server Data Tools). If the reports need to be served up to the public as opposed to within your company, you also need to be careful with both security settings and licensing on the SQL server.
BIRT is the best-known open source version of a reporting engine, but I've never used it so I have to leave that up to you to research. There are probably others.

Related

OBIEE 12C changing default font size

I'm currently on a project using OBIEE 12C and the customer wants to change the default font size, but we don't know how to do this. We've found this link: https://biskills.wordpress.com/2013/04/27/increasing-the-font-size-of-the-dashboard-pagetab-in-obiee/ but we have multiple items of the file they are talking about. What is the solution to this?
What you need to do is deploy a custom skin, that you can customise. The authoritative instruction for this is in the application documentation, under Customizing the Oracle BI Web User Interface.
The approach in the page you have linked to of changing the skins in-place is not recommended as future patches may overwrite your changes – especially with 12c moving to EAR based skins. Off the top of my head the location of those files doesn't look right either, but I may be wrong.

How to keep Sitecore database consistent?

We have 5 environments - Development, UAT, Staging, Live and DR.
Having more than 100 content editors, makes the Live Sitecore database content grow faster.
So almost every fortnight the content tree is out of sync with Development and UAT environment. When we try to develop new things, it is out dated content and sometimes new functionality breaks the live environment.
Please can anyone suggest an ideal way of keeping all the Sitecore databases in sync apart from creating packages and updating regularly so that we can follow a proper CI?
RAZL is not a solution that you should rely on for Continuous Integration, it's merely a database comparison tool.
Setting up proper CI for Sitecore is exactly what I'm doing for my current project and this is what we came up with:
TDS:
If you are willing to spend money, then take a look at TDS (Team Development for Sitecore).
It integrates with Visual Studio and provides you with tools for serialization of Sitecore items which you can then store in your source control.
A build server would then be able to pick up any changes in those serialized files and deploy them to your Test, Staging and even Production environment.
Alternative:
A free alternative to this is to use a combination of three open source modules:
Unicorn (for automatic serialization of your changes to Sitecore
items)
Courier (for package generation based on serialized items)
Sitecore Ship (for automated deployment of Sitecore packages)
I'm working with the free alternative myself at the moment and it works great.
Have you come across RAZL, it is a Sitecore Database Comparison Tool.
This is what they say about Razl:
Razl allows developers to have a complete side by side comparison between two Sitecore databases; highlighting features that are missing or not up to date. Razl allows you to find that one missing template, move it to the correct database.
It is quite incorrect to call Razl 'merely a database comparison tool' - from the first release, you could copy subtrees from one Sitecore database to another.
The initial drawback was that it could not be automated, but with Razl 3.0 (I think it started with Razl 2.4), Razl scripting was added, so you can easily automate Sitecore database syncing between environments.
To see how others use it, see Sean Holmesby's comments:
https://community.sitecore.net/developers/f/8/t/1767
and Nikola Gotsev's comments:
https://sitecorecorner.com/2014/10/27/the-amazing-world-of-razl-part-1/
It is very inexpensive, and with v3.0, it is much more powerful than the initial release, which required manual manipulation via the GUI interface.

Web performance testing with datasource in vs 2012

I'm having some issues with my web performance test that I created in Visual Studio 2012. I've created a test to go through our order system, but on the first run of the test it has errors on the page where you select orders. If I run that same test again it seems to work.
Since I am using a data source containing usernames and passwords, I only have one performance test and it runs once for each user in the data source. When it runs it passes the first test, but each additional user causes errors on that page which results in an empty shopping cart. It seems like an issue with POST variables not being generated or passed for each user after the first in the test.
Does anyone know how to fix this without having to create a web performance test specifically for each user? Using one performance test with a data source is so much nicer.
Thanks!
The web performance system is intended to allow data driven tests in the style you want. Your web site probably has some parameters that Visual Studio has not detected. The mechanisms built in to Visual Studio for detecting dynamic parameters are good, but not infallible.
First step. Just read through the recorded test including form parameters looking for things that may have been missed. You learn what they are through experience.
Another step. Record two versions of the same test, as closely as possible perform identical steps. (But do not worry about think times.) Then compare the two recorded tests. Look for form post parameters and other values that differ and consider whether they should be taken from earlier responses. Find which responses the values come from and write the appropriate extraction rules to create the context parameter.
It can also be worth recording and comparing two tests that are identical expect for user name and password used.
As well as recording tests with Visual Studio and comparing the files, it can be worth recording with a program such as Fiddler.
I have found that comparing the ".webtest" files with a good text comparison program helps find the differences, then make the edits within Visual Studio. If you are confident and keep backups you might edit the XML in the ".webtest" files.
Update: Note on comparing the .webtest files. Look at where the RecordedValue="..." fields differ but the associated parameter fields are not replaced by context variables.

VSTS Load test reports

We've setup some different load tests and need to generate/send the result pr. e-mail, a link, pdf or similar. The output and metrics are saved to a database (resultstore), but I haven't been able to find too much information on how to generate a report without having visual studio. One thing that comes into mind, is creating a custom report in reporting service (any one know of existing reports I could use?).
Any thoughts?
Thanks
Ended up with creating a report myself using reporting services. If I can make generic enough, I'll post it here.

Save/Automate LINQ to SQL Adjustments in Editor

I'm generating domain model using LINQ to SQL via the VS2008 built-in editor. That works really well, too; when I adjust my database schema I simply delete everything from the editor and then pull it back in from the server explorer by selecting all tables and dragging them into the designer surface. That works great too.
Now the problem: I have properties that I manually set to autogenerated, readonly etc. using the property inspector on the right. Everything I re-create the entire schema I have to do this manually all over again.
Is there a way to persist these settings externally and/or automate them to bring it back to the state from before?
You can use something like the Huagati DBML Tools. This will allow you to update the DBML file from the VS designer.
I've also used the following process before:
Create my schema in SSMS
Create a script that uses the SQL Metal command line tool to generate the DBML file
As the DBML file is XML, you can run transformations on the file. I used this to simply change a few things like setting certain fields to be auto-generated (DateCreated, etc).
Then, either use SQL Metal or T4 to create the model files from the altered DBML file.
This process worked great - however I had complete control over the database schema. This process also allowed me to use L2S with SQL Server Compact Edition.
Hope this helps!
T4 Toolbox has a Linq to Sql Schema generator which allows you to develop your Linq to Sql applications in a model first approach. I have used it a little and it works really well, here is a blog post with details and usage info.
Your solution may appear to work when you have very few database entities / tables, but it does not scale and as you've found, syncing is less than ideal.
Do not use the Visual Studio 2008 LinqToSql O/R Designer
After looking at many alternatives to the problems you are describing with LinqToSql, I decided to abandon LinqToSql altogether as I didn't find any of the workarounds very good. Competing ORMs don't have the silly problems that LinqToSql has and they are much more mature and feature rich.
I could/should probably list some of the alternatives I ran across, but I don't want to spend the time and give you false hope, sorry.

Resources