extRS is a .NET assembly, available as a Nuget package here, which is a utility for getting data out of SSRS, FedEx, UPS, USPS, financial markets, among several other useful functionalities.
extRS was initially designed as a set of helper functions to access things in RS, but it evolved to contain a lot more..
Here are a couple examples of some of the useful things you can do with extRS:
Create, Get and Delete an SSRS Report Subscription
[TestMethod]
public async Task CreateGetDeleteSubscriptionSucceeds()
{
string json = @"{
""@odata.context"": ""https://localhost/reports/api/v2.0/$metadata#Subscriptions/$entity"",
""Owner"": """ + Resources.User + @""",
""IsDataDriven"": false,
""Description"": ""string..."",
""Report"": ""/Reports/USPolls"",
""IsActive"": true,
""EventType"": ""TimedSubscription"",
""ScheduleDescription"": ""string..."",
""LastRunTime"": ""2023-04-13T15:51:04Z"",
""LastStatus"": ""string..."",
""DeliveryExtension"": ""Report Server Email"",
""LocalizedDeliveryExtensionName"": ""Email"",
""ModifiedBy"": """ + Resources.User + @""",
""ModifiedDate"": ""2023-04-13T15:51:04Z"",
""Schedule"": {
""ScheduleID"": null,
""Definition"": {
""StartDateTime"": ""2021-01-01T02:00:00-07:00"",
""EndDate"": ""0001-01-01T00:00:00Z"",
""EndDateSpecified"": false,
""Recurrence"": {
""MinuteRecurrence"": null,
""DailyRecurrence"": null,
""WeeklyRecurrence"": null,
""MonthlyRecurrence"": null,
""MonthlyDOWRecurrence"": null
}
}
},
""DataQuery"": null,
""ExtensionSettings"": {
""Extension"": ""DeliveryExtension"",
""ParameterValues"": [
{
""Name"": ""TO"",
""Value"": ""colin@sonrai.io"",
""IsValueFieldReference"": false
},
{
""Name"": ""IncludeReport"",
""Value"": ""true"",
""IsValueFieldReference"": false
},
{
""Name"": ""Subject"",
""Value"": ""true"",
""IsValueFieldReference"": false
},
{
""Name"": ""RenderFormat"",
""Value"": ""PDF"",
""IsValueFieldReference"": false
}
]
},
""ParameterValues"": []
}";
Subscription subscription = await ssrs.SaveSubscription(JsonConvert.DeserializeObject<Subscription>(json)!);
Assert.IsTrue(subscription.DeliveryExtension != null);
var getResponse = await ssrs.GetSubscription(subscription.Id.ToString()!);
Assert.IsTrue(getResponse.Id != null);
var delResp = await ssrs.DeleteSubscription(subscription.Id.ToString()!);
Assert.IsTrue(delResp);
}
Getting FedEx/USPS/UPS Shipping Rates
"A meaningful and useful abstraction that is able to withstand the test of time is very difficult to design. The main difficulty is getting the right set of members—no more and no fewer. If an abstraction has too many members, it becomes difficult or even impossible to implement. If it has too few members for the promised functionality, it becomes useless in many interesting scenarios." -https://www.informit.com/articles/article.aspx?p=3089304
No comments:
Post a Comment