SSRS Report watermark only on some pages based on expression - ssrs-2012

I have added a background image om my SSRS report which hides/shows based on an expression. It acts as a watermark (Copy) when a job is re-printed.
To clarify, the SSRS report prints job cards. Each job card is on its own page.
I have managed to print a single job card with or without a watermark based on an expression (If my field is " " then the watermark doesn't print, if the field is "Y" the watermark prints).
However, I'm having trouble with printing multiple jobcards with the applicable watermark.
For example, jobs can be batched. So let's say batch number 123 has jobcard x, y and z.
Now my field is populated as "y" for jobcard x but not for y and z. So the watermark is only supposed to print on the first page, not on the second an third because the flag for the second and third is " ".
How do I specify on what pages/jobcards the watermark should print? At the moment, if one job in the batch is flagged, it prints a watermark on ALL of the jobs in that batch.
Help would be much appreciated :)

Related

URI not found in CSV row - import error for AutoML NL

I have been running several independent multi-class NL models on an identical data set (to compare performance to a multi-label model) and had no problems importing the data or running the models. I've just been through the identical preparation process, uploaded the file to the bucket and now get this error on import:
Uri is not found in CSV row ",NotWarm".
Warm and NotWarm are my labels. A sample of the csv is below so you can see the format:
"To ensure you get the best possible service, we stagger the cut-off time for next day delivery from 5pm right up until Midnight.",Warm
You’ll be able to see if Next Day Delivery is still available when you place your order.,NotWarm
"You can choose a home delivery option, which lets you have your order delivered to an address of your choice.",Warm
"Some eligible items also let you choose Click + Collect, where your order is delivered to a local store.",NotWarm
I've double checked all the advice about preparing datasets on the AutoML help pages. The file itself has been encoded in UTF-8 using Notepad++ so there should be nothing amiss with the CSV format. The file is identical to those I've used previously except for the labels.
Has something changed on the AutoML NL process as it was over a month since my last model was created?
Thanks in advance for any guidance.
SOLVED
I tagged all my labels with unique numbers to determine which line of data it was failing on upload. Turned out some blank lines had crept into the file so I was trying to assign a label to a null string. Removed the empty lines and all works. Hopefully this may help someone else.

Labview Saving multiple segments into one file

I am converting an SDK vi provided by a data acquisition card company to suit my needs. The original vi records multiple data segments in the card memory and displays in a waveform graph on the front panel without any saving to file function. I can input "Number of Records" to set how many segments (waveforms) I want to acquire. Once the acquisition is over, I can click on "segment" (a "control" on the front panel to input a number) to view the nth segment. To save all the data segments into one file, I put the "Write Delimited Spreadsheet VI" in this VI, with attache to file and transpose function.
My problem is that once I add the save file function, the VI is only saving one segment if the "Run" is set at "False," and then by clicking the arrow to add one in the "Segment" control on the front panel, the next segment data will be saved in the same file and attach after the previously segment. Or the VI will keep saving data without stopping if the "Run" is set at "True. What I want is when I set the "Number of Records" as X (an integer), the file will save X segments. I tried to add a counter to automatically add one each time and replace the "Segment" input but was not working.
I feel that I am getting very close to what I want but after a week I decided to ask for help. Any comments and suggestions welcome. Thank you.
A counter is needed. Add it to shift register of the While Loop (not the For Loop!).
Add saving of data to the While Loop (move it out from For Loop).
Increase counter (in the While Loop), and save data until the counter reaches Segment’s value.
Let me also give one recommendation: try to change current implementation to some more flexible design pattern (such as State Machine or Producer-Consumer). Currently, your code is quite messy, coupled, etc. - so it could be a challenge to debug it or to add new features. Both of the patterns mentioned can be explored more by looking at the Project Templates (available when you create a new project).

Time-lapse plot, single series, with time delay

I am a complete novice! Apologies if this appears utterly basic.
I have a distribution which changes over time (cycles) and I want to show this (single series) on a dynamic plot. I have achieved it by recording a macro while I change the yvalues (by 1 row at a time) and then adding in a delay as follows:
Application.Wait (Now + TimeValue("00:00:01"))
However, I don't know how to define the yvalues range such that it will jump to the next row (of y values) and display that.
It could be up to 200 cycles.
I would like to use R3C3 type notation to define the y values and a 'for i < 200.....next i' approach, but I have tried and failed several times.
The specific issue I have is demonstrated here; see the C3:M3 changing up to C7:M7: please see attached image.
Code issue
Any tips? Thanks.

Loops within loops in PsychoPy Builder

I am new to programming, and need some help with an experiment I'm constructing in PsychoPy builder. I have made something that works, but I can tell it's inelegant and there must be a better way.
I want to conduct 24 trials. Each trial will show 7 unique images, then 1 image which may or may not be from the 7, and users are then asked to enter y/n if they have seen the image before.
In my current code I have created 24 separate input files, each containing a list of the unique objects. I have created a loop which shows the seven objects in succession. I have then created separate routines for the pre-trial fixation screen (constant for all 24 trials) and the response (probe image and correct answer manually programmed). The code works, but it is very long, and if I wanted to change something in the fixation or the probe/response, I would need to change each of the 24 trials individually.
How can I instead get Builder to create a loop which contains the fixation screen (constant), the trial loop (picking the next seven unique objects (they are named sequentially from 1-168), and then a probe/response which is unique to each trial (I have these in an input file as follows. Probe refers to a number between 1 and 7 which references the position of the image in the sequence shown in the trial.)
TrialNumber Probe CorrAns
1 4 0
2 3 1
3 4 0
4 5 1
5 4 1
...
I hope my question makes sense and I would be grateful for any assistance.
Thanks PsychoPy Beginner.
Yes, you're correct that there is a (much) more efficient way to do this.
First, start with your conditions file (i.e. .csv or .xlsx). You only need one of them. It should have 24 rows (one per trial). It will need 8 columns: 7 to specify the unique images in a trial and an eighth to specify the repeated one.
Second, you need a loop to control the trials. This is connected to the conditions file, and encompasses all of the routines (the pre-trial fixation and the image routine.
Third, you need a second, inner loop, nested within the outer one. This encompasses only the image routine. i.e. the fixation routine will run 24 times (once per outer loop), and the image routine will run 7×24 times (i.e. 7 times per trial). The inner loop is not connected to a conditions file and is simply set to run 7 times.
So note that you no longer have 24 separate routines in Builder but only two (the fixation and image routines). Instead of duplicating routines, you repeat them via the loops.
In the image stimulus image field, you can construct the image name to use on each presentation. e.g. lets say the 8 columns in your conditions file are labelled 'image0', 'image1', etc. Then in the image field, put something like this:
$'image' + str(yourInnerLoopName.thisN)
i.e. on the first iteration within each trial, the image filename would come from column image0, the second from image1, and so on.
I don't know how you are handling the responses, but you will also probably need a ninth column in the conditions file that indicates what the correct response is. The keyboard component can access that to judge whether the response is correct or not.

Counting colour and grayscale print jobs

I'm writing a small application that's supposed to count the number of colour and grayscale jobs going to local printers.
It's meant to cross reference with what the printer records. If there is any non-grayscale elements on the job, the printer records a colour job.
At the moment I'm using the EnumJobs call but I can't get any colour info on it. I'm starting to think I'll have to read the spl files that are spooling to scan it for a colour palette...
I've tried a few print auditing applications and some of them are able to do it.
Any pointers will be much appreciated!

Resources