Converting VBA to .Net & Queries into Views
Budget: $250 – $750 USD
I'm trying to create a report that has a lot of fields. I need a little help figuring out these queries though. I can't use zoom, TeamViewer or Skype but I can use google Meets with Google Chrome Remote Desktop.
*Step1
Each field on this report is calling a different function. So there may be many different queries for this report. Also you may have to convert Ken's VBA to C# to get some of the totals. So on the report the first field calls a function GetTotalCalls(). You can get to the code by clicking View Code in the upper right.
*Step2
Next you need to find this in the code. You will need to figure out how to get mlTotalCalls
*Step3
If you look at the code, the query that is used is qryOVSReportsCallsInDateRange. You'll have to figure this stuff out for every field
*Step4
I would like these queries made into views. So the easiest way to get the query is select the SQL View.
When you're creating the queries that are made into views the where clause will not be included. For example for the query above for the View you would only need:
SELECT tblCrisisCall.*, tblCallerType.Description AS CallerType
FROM tblCrisisCall LEFT JOIN tblCallerType ON tblCrisisCall.CallerTypeID = tblCallerType.CallerTypeID
Then in your code you would have something like:
var UniquePrimaryClientId = (from r in db.VwUnitedWayClinicalUniqueClientIDsPrimaries
.Where(x (equal/or greater) than x.TherapyDate (greater than or equal to) startDate && x.TherapyDate (less than or equal to) endDate && x.ClientId != null)
select r).AsQueryable();
*Step1
Each field on this report is calling a different function. So there may be many different queries for this report. Also you may have to convert Ken's VBA to C# to get some of the totals. So on the report the first field calls a function GetTotalCalls(). You can get to the code by clicking View Code in the upper right.
*Step2
Next you need to find this in the code. You will need to figure out how to get mlTotalCalls
*Step3
If you look at the code, the query that is used is qryOVSReportsCallsInDateRange. You'll have to figure this stuff out for every field
*Step4
I would like these queries made into views. So the easiest way to get the query is select the SQL View.
When you're creating the queries that are made into views the where clause will not be included. For example for the query above for the View you would only need:
SELECT tblCrisisCall.*, tblCallerType.Description AS CallerType
FROM tblCrisisCall LEFT JOIN tblCallerType ON tblCrisisCall.CallerTypeID = tblCallerType.CallerTypeID
Then in your code you would have something like:
var UniquePrimaryClientId = (from r in db.VwUnitedWayClinicalUniqueClientIDsPrimaries
.Where(x (equal/or greater) than x.TherapyDate (greater than or equal to) startDate && x.TherapyDate (less than or equal to) endDate && x.ClientId != null)
select r).AsQueryable();