SSRS Hyperlink expressions - reporting-services

I am wanting to understand if possible to set a conditional hyperlink expression in SSRS within the Action setting.
My code which works currently is
=iif(First(Fields!IsHosted.Value, "ReportServer") = "Y", First(Fields!ServerName.Value, "ReportServer"), Globals!ReportServerUrl) +
"/Pages/ReportViewer.aspx?" + Globals!ReportFolder + "/" +
code.GetTargetReportName("Student Performance Against Goal Drill") +
"&GoalCol=" + Code.URLEncode(Parameters!GoalCol.Value) +
"&SectionCol=" + Code.URLEncode(Parameters!SectionCol.Value) +
"&TargetCol=" + Code.URLEncode(Parameters!TargetCol.Value) +
"&ItemCol=" + Cstr(Fields!Item.Value)
I simply want to say "If field B =0 then do nothing, else use the above. I am not familiar how to wrap this statement in the action.

You can nest IIF() functions:
=IIF(First(Fields!B.Value,"ReportServer") = 0,Nothing,
iif(First(Fields!IsHosted.Value, "ReportServer") = "Y",First(Fields!ServerName.Value, "ReportServer"), Globals!ReportServerUrl) +
"/Pages/ReportViewer.aspx?" + Globals!ReportFolder + "/" +
code.GetTargetReportName("Student Performance Against Goal Drill") +
"&GoalCol=" + Code.URLEncode(Parameters!GoalCol.Value) +
"&SectionCol=" + Code.URLEncode(Parameters!SectionCol.Value) +
"&TargetCol=" + Code.URLEncode(Parameters!TargetCol.Value) +
"&ItemCol=" + Cstr(Fields!Item.Value)
)
I don't know what the dataset structure is but this could help you.

Related

SSRS Hyperlink dual parameters errors

I am trying to pass a hyperlink in SSRS to open a new SSRS report (in pdf) from a text box. It is currently set up and works passing a single parameter :
="http://servername/ReportServer_REPORTS16/Pages/ReportViewer.aspx?%2fdummy%2fDocuments%2fCertificate+of+Insurance+Issued&rs:Command=Render&PolicyNo="
& Parameters!PolicyNo.Value &"&rs:Format=PDF"
However when I add in the second parameter :
="http://servername/ReportServer_REPORTS16/Pages/ReportViewer.aspx?%2fdummy%2fDocuments%2fCertificate+of+Insurance+Issued&rs:Command=Render&PolicyNo="
& Parameters!PolicyNo.Value &"&
Entitled="&Parameters!Entitled.Value &"&rs:Format=PDF"
I get an error message :
The ActionInfo.Action.Hyperlink expression for the text box
‘Textbox48’ contains an error: [BC30277] Type character '&' does not
match declared data type 'Object'.
I've gone through every similar error I've found on google but cant work out where im going wrong.
You need to convert all your values to strings then use the + operator....
Here'a an exmaple from one of my reports that does the same thing.
=IIF(Fields!PackSizeDesc.Value = Nothing, Nothing,
"http://MyServername/ReportServer?/Brand+Value/_sub+SKU+Price+Details"
+ "&CountryID=" + cStr(Fields!CountryID.Value)
+ "&CategoryID=" + cStr(Fields!CategoryID.Value)
+ "&RecordedPeriodID=" + cStr(Parameters!PeriodID.Value)
+ "&TMB=" + cStr(Fields!TrademarkBrandID.Value)
+ "&PriceStage=" + cStr(IIF(Fields!IsActualprice.Value = 1, 10, 11))
+ "&pm=" + cStr(Fields!PackMaterialID.Value)
+ "&pt=" + cStr(Fields!PackTypeID.Value)
+ "&ps=" + cStr(Fields!PackSizeID.Value)
+ "&psu=" + cStr(Fields!PackSizeUnitID.Value)
+ "&upp=" + cStr(Fields!UnitsPerPack.Value)
+ "&rc:Parameters=Collapsed")
Note: The first line just disables the link if there is now value in a particular column. This does not render to PDF but that's not part of your issue.

Since set-cookie has been deprecated is there a way to STILL make it work (compatibility?)

On an existing web site we have many page using
<meta http-equiv="set-cookie" content="cookiename=value; expires=Fri, 22-Sep-17 08:57:01 GMT; path=/">
Set-cookie has been deprecated in chrome (see below), is there a way to keep compatibility (without change in code) ? At least temporally until correcting every place it's in use...
It seems there is no way to avoid deprecation.
The best on the EXISTING site is to change the meta by a script tag (goal is to minimize change):
REM {update expires date:1 month};
AdjDate := #Adjust(#Now;0;1;0;0;0;0);
Months:="Jan":"Feb":"Mar":"Apr":"May":"Jun":"Jul":"Aug":"Sep":"Oct":"Nov":"Dec";
Days:="Sunday":"Monday":"Tuesday":"Wednesday":"Thursday":"Friday":"Saturday";
Time := #Right("0"+#Text(#Hour(AdjDate));2) + ":" + #Right("0"+#Text(#Minute(AdjDate));2) + ":" + #Right("0"+#Text(#Second(AdjDate));2);
ExpDate := Days[#Weekday(AdjDate)] + ", " + #Right("0"+#Text(#Day(AdjDate));2) + "-" + Months[#Month(AdjDate)] + "-" + #Text(#Year(AdjDate)) + " " + Time + " GMT";
"<script type=\"text/javascript\" id=\"set-cookieJS\">document.cookie = \"" + cookiename + "=" + CartID + "; expires=" + ExpDate + "; path=/\";</script>";
The existing site is in Domino using Formula.

How to send a tile push notification for WP8 from Azure notification hub and C# application?

I am trying to send a tile notification to my WP8 app using a C# Winforms app that has Azure service bus functionality. I have set up the app with the channels needed and have successfully been able to send toast notifications to the app. However, tile notifications have proven to be more difficult. I have been attempting to send them the same way using XML but I am unsure why it is not working on my app. I have the app using channel.BindToShellTile(); along with the other channel logic but I do not think the problem is there as I am able to receive toasts along that same channel. I am currently trying to send this:
string tile = "<?xml version=\"1.0\"?>" +
"<wp:Notification xmlns:wp=\"WPNotification\" Version=\"2.0\">" +
"<wp:Tile Template=\"FlipTile\">" +
"<wp:BackgroundImage Action=\"Clear\">" + "red.png" + "</wp:BackgroundImage>" +
"<wp:Count Action=\"Clear\">" + "1" + "</wp:Count>" +
"<wp:Title Action=\"Clear\">" + "SENDPUSH" + "</wp:Title>" +
"<wp:BackBackgroundImage Action=\"Clear\">" + "blue.png" + "</wp:BackBackgroundImage>" +
"<wp:BackTitle Action=\"Clear\">" + "BackTitle" + "</wp:BackTitle>" +
"<wp:BackContent Action=\"Clear\">" + "Welcome Back!" + "</wp:BackContent>" +
"</wp:Tile>" +
"</wp:Notification>";
and send it by using:
hub.SendMpnsNativeNotificationAsync(tile);
Any help or guidance would be appreciated. Thanks.
I've located the problem. My xml was obviously in error, though I am not sure exactly what the cause of the problem was. Here is working XML if anyone is struggling.
string tile = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<wp:Notification xmlns:wp=\"WPNotification\">" +
"<wp:Tile>" +
"<wp:BackgroundImage>" + backgroundImage + "</wp:BackgroundImage>" +
"<wp:Count>" + count + "</wp:Count>" +
"<wp:Title>" + Title + "</wp:Title>" +
"<wp:BackBackgroundImage>" + backBackgroundImg + "</wp:BackBackgroundImage>" +
"<wp:BackTitle>" + backTitle + "</wp:BackTitle>" +
"<wp:BackContent>" + backContent + "</wp:BackContent>" +
"</wp:Tile> " +
"</wp:Notification>";
hub.SendMpnsNativeNotificationAsync(tile);

Actionscript - call symbol using variable as part of name (increment number) and change x/y position

Looked everywhere for this but can't find anything so I hope someone can help. Maybe there is something online but I am not putting it in the right words....
Using Actionscript I want to change the x and y multiple symbols I have that go up by row number and col number in their names i.e. SP_01_01 - SP_01-10...... SP_02_01... etc
I need to access that symbol using two other variables holding the Number parts of the name and change the x and y values.
Here is what I have tried from what I've searched and thought was corrent
["SP__" + rownum + "_" + colnum].x = xcol;
["SP__" + rownum + "_" + colnum].y = yrow;
Try to call objects in this way:
getChildByName("SP__" + rownum + "_" + colnum).x = xcol;
getChildByName("SP__" + rownum + "_" + colnum).y = yrow;
This way even better:
import flash.display.DisplayObject;
var cell:DisplayObject = getChildByName("SP__" + rownum + "_" + colnum);
cell.x = xcol;
cell.y = yrow;

Basic boolean minimization

I am trying to simplify the following piece of boolean algebra so I can construct the circuit :
A'.B'.C.D + A'.B.C.D' + A'.B.C.D + A.B'.C'.D + A.B'.C.D + A.B.C'.D + A.B.C.D' + A.B.C.D
So far I have gotten it to :
(C.D) + (B.C) + (A.C'.D)
Is this correct?
I want to get the best possible minimization.
The steps I have went through so far are :
A'.B'.C.D + A'.B.C.D' + A'.B.C.D + A+B'+C'+D + A.B'+C+D + A.B.C'.D + A.B.C.D' + A.B.C.D
= A.A'(B'.C.D) + A.A'(B.C.D') + A.A'(B.C.D) + B.B'(A.C'.D)
= (B.C.D) + (B'.C.D) + (B.C.D) + (B.C.D') + (A.C'.D)
= (C.D) + (B.C) + (A.C'.D)
Can I do any more?
Assuming your equation is actually:
X = (A'.B'.C.D) + (A'.B.C.D') + (A'.B.C.D) + (A+B'+C'+D) + (A.B'+C+D) + (A.B.C'.D) + (A.B.C.D') + (A.B.C.D);
I just ran this through Logic Friday and it factored it down to:
X = 1;
So you might want to check your simplification work and/or check that you've given the correct equation.
However I suspect there may be typos in the original equation above, and perhaps it should be:
X = (A'.B'.C.D) + (A'.B.C.D') + (A'.B.C.D) + (A.B'.C'.D) + (A.B'.C.D) + (A.B.C'.D) + (A.B.C.D') + (A.B.C.D);
?
In which case Logic Friday simplifies it to:
X = B.C + A.D + C.D;
The only thing I can see that you could possibly do is distribute the "C" in the left two terms:
(C).(B+D)+(A.C'.D)
Or you could distribute the "D":
(C+A.C').D + (B.C)
Response to Comment: The distributive law is described here: http://www.ee.surrey.ac.uk/Projects/Labview/boolalgebra/. See the information under heading "T3"
Here's another solution (found by brute force):
(a+c).(b+d).(c+d)
for simplifying boolean expressions use karnaugh maps. i think it is very much useful if we less number of variables. but if we have more variables then we can follow methods because this method is not that preferable.