MVC 5 How to pass ViewBag value to crystal report as parameter? - asp.net-mvc-5

Hi I am working with MVC 5 and crystal report but i have small problem :
in controller I called string Fname
in view I see it by #ViewBage.fname = Fname
the result for example Hussain as student name.
in crystal report parameter :
rp.SetParameterValue("Fname","Hussain");
The report is working fine
but I want to replace "Hussain" with ViewBage value I tried ("Fname", Fname) not working.
("Fname", ViewBage.fname) not working
so please help how I can pass ViewBag value to crystal report parameter??

You must use the parameter name as it is known within Crystal as the first argument.
Open the report in Crystal Designer. Find out what is the parameter name.

Related

RSV-VAL-0034 Failed to validate the variable 01. CRX-API-0016 The expression input string is empty: """" IBM

I am using Version 11.1.2fp2 IBM Cognos. I have many simple case statements that do not validate. The Report Runs. The report produces the expected output of data.
The error is RSV-VAL-0034 Failed to validate the variable 01. CRX-API-0016 The expression input string is empty: """".
CASE
WHEN [Grant Agency TRACCD FRGBIL FOBTEXT with Budgets].[REAUTH_SDE_LAWS] IS MISSING
THEN ''
ELSE TRIM([Grant Agency TRACCD FRGBIL FOBTEXT with Budgets].[reauth_law_chapter])
END
Kindly, I have attached a screen shot with the Do you have any insights?
The CRX error family is usually linked to variable or report expressions, which means it's probably not tied to the data item case statement. Given the report runs it may also indicate the report expression is not actually used anywhere.
Please have a look at: https://www.ibm.com/support/pages/crx-api-0016-report-upgrade
The "Validate" button in the Data Item Expression dialog doesn't validate that expression. It validates the entire report. It is often misleading because the message displayed may have nothing to do with the expression you are looking at.
Here's what to do.
Close the Data Item Expression dialog.
Click on the More button in the top right (the 3 dots arranged vertically).
Select Validate report.
Select the first item in the Validation response.
Click Select.
If Cognos chooses to be nice to you, it will navigate to and highlight the offending object.
#dougp mentioned, an unprocessable variable from cognos is just what happened. Sometimes it might get hard to find the variable itself. One way of finding it is to get the xml definition and the search for the the declared variable.
Reimporting the report won’t overwrite until you choose the saving location.
The root cause is the variable "Boolean1" was never used by the report. The variable "Boolean1" was not tied to the data item in the case statement. I created the variable "Boolean1" and forgot about it. I did not use the variable "Boolean1" in the report. I found the variable "Boolean1" and removed it. Now my validation of the report expressions works fine. I value your insights.

How can I update a column value for a Sharepoint item using a CAML query in UiPath?

I'm currently working on an automation project that uses Sharepoint to store invoices. I have used the Sharepoint package for UiPath to do the uploading; now, I'm trying to set a column/metadata value for an already uploaded PDF in Sharepoint. To do this, I am using the 'Update list item' activity that takes a dictionary of the metadata to update and a CAML query string that it uses to search for the item (I am using the invoice number as a reference). However, it's not working; no error, it just simply doesn't update anything.
Is there a mistake in my setup of this activity (see screenshot below) or is it just not possible to use this activity to update Sharepoint metadata? If I can't use this activity, how would I build an HTTP request to achieve this / is an HTTP Request activity the best way to go?
I should note that the PDFs I'm trying to update are stored within folders which have the structure /SupplierInvoice/<SupplierName>/<Year>/<Month>/<invoice>.pdf
The problem is that the string delimitators are messing with your query, you should use Chr(34) to simulate the substrings. Using this will most likely solve your problem as it did to me:
In this case I'm updating those that match the "Title" column in Sharepoint (that is a Text Type) with "your_variant_value" that is a a variable string
" <FieldRef
Name="+Chr(34)+"Title"+Chr(34)+"/><Value
Type="+Chr(34)+"Text"+Chr(34)+">"+your_variable_value+"
"

Set parameter value in SSRS report in sharepoint integrated mode with dropdown

I have a SSRS report, deployed in sharepoint integrated mode. It has a parameter ProjectId which is associated with a dataset means it has a drop down where the user can select any project.
I want to pass the parameter value from URL. When the parameter was not associated with a dataset, means it was a textbox. I was able to set the parameter value using rp: in URL but when I associate it with dataset it stop working.
Can anyone help me for this.
Try to check Query String (URL) Filter web part for this.
You could check below similar thread.
http://www.epmpartners.com.au/blog/connect-query-string-web-part-to-ssrs-report-viewer-web-part/

How do I get System.Rev to show in an Excel TFS-linked table?

The TFS Rev field (System.Rev) shows up fine in my VS Work Item Query "Choose Columns" dialog and in the results grid. I export this query to Excel (creating an Excel TFS-linked table) and I see all other fields EXCEPT Rev.
I tried explicitly adding Rev to the Requirements WIT definition form so it would be present. That fixed access to a custom field, but no change to Rev field.
Configurations tried:
PASS: TFS2010 + VS2010, VS2012 - VS works just as expected (Rev works like other fields).
PASS: TWA (TFS Web Access 2010) shows Rev field just fine.
FAIL: Excel2013, Excel2010 (each on different computer) - Both don't show Rev field in "Choose Column" dialog nor in the table generated. Other fields are fine.
FAIL: SmartWord4TFS + Word2013 - Rev field missing. Other fields are fine.
I've searched for a long time with absolutely zero hits for Rev or "System.Rev" being a special case in Excel or other Office plug-ins. Please enlighten me! :-).
I get the same problem with my TFS2015+Excel 2013. I already submitted one feedback on the Microsoft Connect site, hope we can get some help there: https://connect.microsoft.com/VisualStudio/feedback/details/1893312

SharePoint 2013 TaxonomyFieldType in custom list has IsTermSetValid = False

I'm using Visual Studio 2012 to create a custom Site Column of type TaxonomyFieldType, a custom content type that uses it, and a custom list that uses the content type.
Everything appears to deploy fine. If I look at my custom site column it appears to reference the proper termset correctly. I can create a new list in the web UI that uses my custom content type just fine. However, my custom list created using the Visual Studio 2012 List template always shows my taxonomy field as disabled on the new form. Here are the other things I've witnessed about it:
In the web UI of SharePoint, if I go to the list properties and drill into my taxonomy site column I notice it shows that it isn't mapped to a termset. Keep in mind that if I do the same thing in Site Settings for my content type it appears correct. I can do the same thing for the web UI created custom list and everything is fine (editable in the new form and the field has the termset defined).
If I use powershell to dump out the info for the site column itself it has a valid termset.
If I use powershell to dump out the info for the field in the VS2012 created list it shows emtpy guid for the SspId, TermSetId, and TextField. It also shows IsTermSetValid = False.
If I use powershell to dump out the info for the field in the SharePoint web UI created list it shows the correct guid for the SspId, TermSetId, and TextField. It also shows IsTermSetValid = True.
Does anyone know why I seem to be having this behavior for the VS 2012 create custom list? Any help is appreciated.
Okay, so I'm going to answer my own question. Hopefully this will help someone else in the future.
My issue was that when creating a sample list for my content type (described in original question post), using the SharePoint UI, the needed Note field was getting added. Even if I had this right in my original TaxonomyFieldType declaration, I would have also ran into issues with my field values not showing up in the search refiners later on when I got to that part. Thankfully Ari Bakker has written a very detail explanation of what all you need to do in order to create your custom TaxonomyFieldType derived field, a custom content type to use it, a list definition, and a list instance. Just follow the details in the article: http://www.sharepointconfig.com/2011/03/the-complete-guide-to-provisioning-sharepoint-2010-managed-metadata-fields/

Resources