ASP.NET Zero not mapping Paid Editions - objectmapper

I have recently started using the ASP.NET Zero system and noticed that when I'm attempting to change an edition to a paid edition, it does not show it when I go to edit the edition again. In my database, I have the other values that I entered so the edition is saving correctly. When editing the edition, the radio button will still say "Free."
I noticed that the EditionAppService.cs file utilizes the ObjectMapper to map from SubscribableEditions to EditionEditDto. When the SubscribableEdition enters the mapper, it has the values for Monthly and Annual prices. When it exits the mapper as the EditionEditDto, both values are null. Somehow, the ObjectMapper isn't pulling over these values.
I have attached two pictures below. The first shows the SubscribableEdition that has the AnnualPrice and the MonthlyPrice.
When I take the next step in the second picture to see the results of the ObjectMapper, you will see that it no longer has a value for either of those fields in the EditionEditDto.
This results in the edition appearing to be Free when editing it. I thought that maybe the fact that it was a nullable Decimal was the problem. But once I removed that and converted it to a normal decimal, it filled in the prices with zeroes instead of null values. When I downloaded and completed the PhoneBook tutorial, I noticed that project also had the same issue of the Edition not saving.
I am trying to figure out why the mapper isn't mapping the values over to the EditionEditDto correctly.

It's due to a missing map in CustomDtoMapper.cs that will be added in v5.1:
- configuration.CreateMap<EditionEditDto, SubscribableEdition>();
+ configuration.CreateMap<EditionEditDto, SubscribableEdition>().ReverseMap();

Related

How do I get the asdoc output table to show both the variable labels and value labels in Stata?

I'm trying to make a table using asdoc that will include both the value labels and the variable labels in the output. When I run the following line of code in Stata
asdoc list progname progtype progterm publicprivate cohortsize grereq, label
I get this in the console (no variable labels):
But in the word doc, it comes out looking like this (has variable labels but no value labels in the table cells):
How do I get both the variable and value labels in the table?
The last update of asdoc was on April 10, 2021. I announced the following in that update.
It is now almost three years that I have been developing asdoc and constantly adding features to it. With the addition of _docx and xl() classes to Stata, it is high time to add support for native docx and xlsx output to asdoc. Also, given that there exists a significant number of LaTeX users, asdoc should be able to create LaTeX documents. It gives me immense pleasure to announce asdocx that is not only more flexible in making customized tables, but also creates documents in native docx, xlsx, html, and tex formats. If you have enjoyed and find asdoc useful, please consider buying a copy of asdocx to support its development. Details related to asdocx can be found on this page.
I am still committed to fixing bugs / issues in asdoc. However, I think it makes more sense to me to add features to asdocx than asdoc, given that asdocx supports all latest developments in Word, Excel and LaTeX.
The requested feature is already available in asdocx. See the following example.
sysuse nlsw88
asdocx list industry age race married grade south in 1/20, replace label

Crystal Reports breaking groups by data

I have Visual Studio 2015 and I have an existing Crystal Report that has three groups based on technology. It's sorted alphabetically within each technology group. Something like this. (Abbreviated data)
Technology 1 = Phone
IPhone
Android
Technology 2 = Social Media
Facebook
Snapchat
Technology 3 = VOIP
Skype
When the technology changes it prints a new header (without skipping to a new page) then lists the details.
The report works fine, but it needs to be changed. They want Technology 1 and 3
grouped together, followed by Technology 2.
I'm new to Chrystal and there are no experts here to ask and I've googled it for a day and still haven't solved the issue. Seems an expert would fix this easy.
I've tried to use the designer but the closest I've come to the result I want is I can get it to print ALL three technologies one after the other in the correct order. I.e. 1, 3, 2, but the only time it prints the second header is if the report breaks on a new page, NOT if the technology changes in the middle of the page.
I've been trying to create a formula at the group level that would check to see if the Technology = 1 or 3, print it's header and rows, ELSE Technology = 2, print it's header and rows.
When I try to create a formula I can't see any of the table data, just report elements. I tried to start with something like this:
If {table.Technology = 1}
But table doesn't exist in the formula options. It doesn't show up in intellisense.
I've read through this question and this other question, but I need the report to break on identifying the group field value, not just the fact that the group data changed.
What am I missing? Any help or suggestions is appreciated.

Document Core Pack not printing correct template

I am using DCP with MS CRM to print documents based on templates. I have multiple templates for different business units. I follow the code during debugging and the Guid is pointing to the correct template. It goes to the printer and prints out the wrong template.
Things I have looked at;
I know its damn near impossible but have two templates fluked the
same Guid? No
Does the correct template have the wrong
information. No
I don't understand why its happening. Right up to the point of printing, the Guid IS the correct Guid for the correct template. When I go to the printer, wrong template with the right merged feilds. And the template is attached to the order. (Which is also wrong)
== UPDATE ==
Looking into the database, there are 2 templates with the same name. However only 1 of them shows in the list in Word so I can not see the content of the other. Still looking for solution.
There were two templates in the database. One of them was inactive and one active. My code was selecting ALL templates with that name and giving back the first or default one.
I changed the code to only select active templates. This solved my problem.

Visual Studio Unexpectedly Adding Feature on Load

I have a SharePoint 2010 solution in Visual Studio 2013. Every time I close and reopen Visual Studio, a new feature is added to the solution with one list inside it. The list was removed from another feature that it should be in. It is always the same list. As soon as I open the solution this pops up in the Output window before I do anything...
A new feature Feature2 has been added to the project Solution
C:\Code\Solution\Package\Package.package (0,0): Added Feature2 to Package
What is causing this?
I have tried the following:
Recreated the solution and copied all files over - No change
Checked the package and project manifest. - Everything looks okay.
Loaded the project every different way, including unload and reload command. - No change
Recreated the list it likes to isolate into its own feature - No change
Recreated the feature the list should be in but it keeps moving to this new feature - No change
Added a new list and put it after the problem list in the feature - VS then created 3 new features! It took 3 lists out of my feature and put one in each of its own features. I guess I made it angry.
If the lists in the same feature have the same Type ID, the tooling will move the lists into a newly created feature, because the Type must be unique within a feature. You can check the documentation on the ListTemplate element for more information.
It is because features cannot contain list templates that have identical values for Type. This is explained here: https://msdn.microsoft.com/en-us/library/office/ms462947.aspx
Type
Optional Integer.
Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions. For a list of the default list template types, see SPListTemplateType.
You will probably find that your Elements.xml file for your list templates contains the same value for Type.
To fix this, you will need to edit the Elements.xml files of the list template and the list instance.
Change the Type of the ListTemplate xml element to a unique integer.
Change the TemplateType of the ListInstance xml element to the same integer
I have started to choose numbers over 1000 to avoid conflicts (Although 1100, 1200, 1220 and 1221 are system types)

SSRS error on preview : "The size necessary to buffer the XML content exceeded the buffer quota" hides original error

I understand that there is definitely something wrong with my report (e.g. columns missmatcch) and I need to correct it but what I see is the WCF error message that hides actual problem and exactly this hiding irritates me much more than original problem: columns missmatch.
I guess we need to adjust the WCF 'buffer size' and we will get original problem message. But where is the config file?
Text search of "system.serviceModel" in the C:\Program Files (x86)\Microsoft Visual Studio 10.0 doesn't bring good idea...
P.S. Since this is just preview of report I do not think that it is SSRS configuration problem. Problem localised somewhere in DevStudio process or int the DevStudio's internal web server process ...
P.P.S Please help me too improve the question. I see that responders doesn't understand what kind of help I need.
I have encountered multiple "flavors" of this bug in SSRS Preview. It seems the renderer for Preview mode is quite fragile.
There is a simple way to solve this. Ignore the error and attempt to upload the RDL file to your reporting server. The uploader will happily tell you exactly what is wrong with your file - it will tell you exactly what field has a problem and what that problem is. If there are multiple errors, you will get told each and every field and the error associated with each one.
I can create this bogus XML buffer error with any of the following:
Add a new Tablix, start to connect it to a dataset, then cancel out.
Copy/paste some text into a textbox from a MS Word document where one or more lines have a negative right indent (right column end is outside page margin).
Connect a dataset with a varchar(8000) returned value.
Please Check if any of your report items are referencing fields that are not in existing dataset scope.
This indeed worked for me.
See Below link for more information:
http://connect.microsoft.com/SQLServer/feedback/details/742913/ssdt-reporting-services-designer-error
I have seen this error when adding a new field to an existing dataset by clicking "Refresh Fields".
The dataset source was a stored procedure. The result was only a few of original fields showed up in the dataset field list and not the new field. If I tried to preview the report I get XML buffer error.
Workaround was to not refresh fields but hit add new field and type the new field name into the dataset properties field last.
Worked fine after that.
I got this error again today.
I had created a table to hold data to replace two slow queries. I changed some names to clean up the process.
I think the error actually means that there are so many problems with my report that the buffer holding the various error messages isn't large enough which leads to the error message.
The size necessary to buffer the XML content exceeded the buffer quota
Of course this should be an easy fix but Microsoft has said that they will not fix it.
https://connect.microsoft.com/SQLServer/feedback/details/742913/ssdt-reporting-services-designer-error
EDIT: I've updated my answer based on having fixed the issue.
I'm currently experiencing this problem after having changed multiple stored procedures and updating the dataset names in the SSRS report.
And when I try to run the preview I get the exact same error.
As it turns out, after investigating the issue, the problem was that I had changed the name property of my datasets.
There several places in my report where formulas or expressions use the old name properties of the datasets I renamed. After reverting the dataset names back, I managed to get the real errors like missing fields etc. atcual errors came back after I set my dataset name properties back to what they were.
I only changed the name property back to what it was, the stored procedure names were correctly referring to my renamed stored procedures.
I had this problem when after copying and pasting a tablix, it changed CDbl in a formula to Microsoft.ReportingServices.RdlObjectModel.ExpressionParser.VBFunctions.CDbl. I opened up the XML and removed all instances of "Microsoft.ReportingServices.RdlObjectModel.ExpressionParser.VBFunctions." and the report then worked.
For a working report, when I tried to add a column it gave me this error. I edited the .rdl file using notepad++. After SSRS prompt to reload the change from disk, it worked without issues.
I got this error after copying my Custom Code to Visual Studio for hightlighting the code for better readability. Well, Visual Studio added class definitions to the beginning and end of the file. After editing code, I pasted it back to report Custom Code, then got this error. Fix was just to remove class definitions (Public Class Class1 and End Class) from Custom Code. So, check your Custom Code also (if any).
I got this error after adding some new parameters to an existing report.
For some reason when I created the parameters first then modified the Dataset to use the new parameters I got the error, but when I modified the Dataset first then added the parameters second and I did not get the error.
This seemed like very strange behavior to me so I tested it by restoring the report from repository and repeating the process three times with each method, and had identical behavior every time.
I am also facing this problem. I solve this Find and replace
Microsoft.VisualBasic.Interaction.iif ==> iif
Microsoft.ReportingServices.RdlObjectModel.ExpressionParser.VBFunctions.cdbl
==> cdbl
I hope this may helps someone. Thanks
Possible root causes
Parameter name is incorrect(case/order)
Accessing non-existing property.
and many more...
Solution: To get the exact error message are
Deploy SSRS report and find the error : Suggested by "Kim Crosser" already
Remove the section(SSRS/Report content) temporarily you feel is error free to free space in buffer so that you can get actual error message. Later add sections back to the page(removed earlier).
I had the same error message and it was totally caused by my doing. It's a bit embarrassing, but if it helps someone out then great! I had accidentally copied my dataset query that included a small sub select statement within it, which I was using to check parameter/variable values.
Another solution is to open the .rdl file in Report Builder 3.0 (as opposed to Visual Studio) and try to preview it. I found this gave me the details of the error, although if more than one error is present it only shows the first.
I previously binded a TextBox to
Fields!FieldName
and fixed it with
Fields!FieldName.Value
With that said, and with the other answers posted as well, this error happens in different flavors. My issue was fixed after I had the field property "Value" included.

Resources