0

I am a DBA of a local SQL Server. One table includes sales data - each line includes a customer number.

I am using different types to publish the data (mostly MS PowerBI). Most of these are directly focused on visualization. Sometimes I grant access to some data through a view and configure an Excel file for colleagues with Power Query, so these colleagues can refresh the tables by themselves.

However, now I have a "specific" demand.

In my mind I have the following scenario: a customer service user within an organization wants to download a csv/txt including sales data of a specific customer. The customer service employee does not know at all any SQL-commands, s/he just wants to type in a customer number and a start/end-date into an (Web)-Application. The output should be the csv/txt with the requested information. The employee should be able to fetch only data of maximum one year.

My question is what is the easiest way to implement such a solution?

I thought about an intranet (Web-) App coded in Angular and ASP.NET. However, before I invest much time in these topics, I want to be sure whether this is the appropriate way to solve such demand.

PowerBI is not the appropriate solution since I would have to store all sales data into the PowerBI Service. I rather would like to have the calculation on the server that provides just the requested data.

If you have any experiences in providing csv/txt data from a SQL Server with restrictions, please let me know.

Best Marl

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Marl
  • 103
  • 1
  • 11

1 Answers1

1

Don't go SPA. This is an intranet application with no specific non postback needs. Check here for a comparison between the SPAs (angular, react etc) and multiple page apps: https://medium.com/@NeotericEU/single-page-application-vs-multiple-page-application-2591588efe58

So my suggestion is to go full Mvc

  1. You won't have to learn 2 frameworks at once
  2. You won't need to solve the intricacies involved with SPAs

For the part of your second question. Your MVC controller will filter the database data and create the txt or csv file.

Create csv file: Writing data into CSV file in C#

Return file result: https://learn.microsoft.com/en-us/dotnet/api/system.web.mvc.fileresult?view=aspnet-mvc-5.2

Athanasios Kataras
  • 25,191
  • 4
  • 32
  • 61