Use of array in multiple formulas

I need to set up a array that I will use in multiple formulas.
Can I create it as a global or shared value in one formula, set the values of the array and then use that array in another formula.  I don't want to have to reset all the values in the array each time I need to use it.
Do I have to specify "WhilePrintingRecords"?  Also do I have to include the formula that sets up the array on the report.
Thanks
Russ

Hi Russell,
We can use array to create an ordered list and we can use it in other formulas. We can create them global or shared to use in the same report or in the sub report. You can use "WhilePrintingRecordsu2019 only if you want to push the execution of the formula in the last pass of execution otherwise it is not necessay.
To get details about its use open crystal reports help under help menu and type in array in index tab.
Hope this helps,
Regards,
Aditya Joshi

Similar Messages

  • Using An Array Formula within a Pivot Table

    Hello Everyone!
    I've discovered a problem with using the Pivot Table. I wish to add this array formula for Counting Distinct names into a Pivot Table, but within Power Query for Excel 2013, it won't allow me to add an array formula. I need to use slicers for filtering city
    names which I'm not able to with this new restriction. 
    For example, suppose I wish to get (using a slicer) a distinct count of city names in a particular year using the year slicer. I cannot do this as I am not allowed to use array formulas within the Pivot Table which contains names of cities according to years.
    If I use the array formula for counting distinct city names outside the Pivot Table, then I won't be able to use the year slicer in order to get a distinct count of names of cities.
    Is there a way around this problem and how may I be able to resolve it ??
    Appreciate your help. Thanks.
    The problem with being punctual is, there's nobody there to appreciate it !!!

    Hello Everyone!
    I've discovered a problem with using a Pivot Table. I wish to add an array formula for Counting Distinct names into a Pivot Table, but within Power Query for Excel 2013, it won't allow me to add an array formula. I need to use slicers for filtering city names
    which I'm not able to with this new restriction. 
    For example, suppose I wish to get (using a slicer) a distinct count of city names in a particular year using the year slicer. I cannot do this as I am not allowed to use array formulas within the Pivot Table which contains names of cities according to years.
    If I use the array formula for counting distinct city names outside the Pivot Table, then I won't be able to use the year slicer in order to get a distinct count of names of cities.
    Is there a way around this problem and how may I be able to resolve it ??
    Appreciate your help. Thanks.
    The problem with being punctual is, there's nobody there to appreciate it !!!

  • Namedquery using same table field multiple times with the use of a label

    Hi all,
    i'm having some trouble with a namedquery. I'm trying to
    use the following namedquery in Toplink to retrive some
    data out of a database.
    select proj.id
    , proj.code
    , proj.name
    , proj.budget
    , proj.status
    , proj.startdate
    , proj.enddate
    , proj.mdr_id projleader_id
    , med_leader.name projleader
    , proj.mdr_id_valt_onder promanager_id
    , med_promanager.name promanager
    , proj.mdr_id_is_account_from accmanager_id
    , med_accmanager.name accmanager
    from uur_projecten proj
    , uur_medewerkers med_leader
    , uur_medewerkers med_promanager
    , uur_medewerkers med_accmanager
    where ( #p_name is not null or #p_search_string is not null )
    and med_leader.id = proj.mdr_id
    and ( proj.mdr_id = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_valt_onder = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_is_account_van = nvl( #p_name, proj.mdr_id ))
    and (( #p_status is not null
    and substr( proj.status, 1, 1 ) = upper( #p_status ))
    or ( #p_status is null ))
    and ( upper( proj.code ) like upper( '%' || #p_search_string || '%' )
    or upper( proj.name ) like upper( '%' || #p_search_string || '%' ))
    and med_promanager.id = proj.mdr_id_valt_onder
    and med_accmanager.id = proj.mdr_id_is_account_van
    order by decode( substr( proj.status, 1, 1 )
    , 'A', 2, 'T', 3, 'F', 4, 1 ), proj.code desc
    As you all can see the table ‘uur_medewerkers’ is been used trice to
    determine the name for the corresponding ID. I have a Java class with
    the fields for the results and created a Toplink descriptor to map
    the fields to the database fields.
    The problem is that for the 'projleader', 'promanager' and 'accmanager'
    fields the results are null. The reason is probably that Toplink doesn't
    recognize the fields because of the label for the tables.
    Is there a way to make this work?
    Greets, René

    Post Author: quafto
    CA Forum: .NET
    Your query is not too clear so I'll do my best to answer it broadly.
    You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
    You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
    Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
    Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
    Hopefully my comments have given you a few ideas.

  • How to use for loops with Multiple Initializers and Incrementers

    I found that my for loop is printing out wrong, because I am using two for loops. I have searched but all I can find out is you can't use multiple inializers and increments, does anyone know how to get around this? How would I use an array for this?
    Thanks very much for your help.
    import java.util.Random;
    import java.util.Arrays;
    /** Generate numnodes value for random integers in the range 0..499. */
    public final class RandomInteger {
    public static final void main(String... aArgs){
    log("Generating 6 random integers in range 0..499.");
    int numnodes = 6;
    //Randomly generate a number between 0 and 499 for the x and y coordinates for the nodes
    Random randomGenerator = new Random();
    for (int x = 0; x < numnodes; ++x) {
    int randomInt = randomGenerator.nextInt(500);
    Random randomGenerator2 = new Random();
    for (int y = 0;y < numnodes; ++y) {
    int randomInt2 = randomGenerator2.nextInt(500);
    log("Generated : " + randomInt + " " + randomInt2);
    log("Done.");
    }

    Sorry that code works, but I want to use both my x and y coordinates to get a random number from 0 to 499 in both of them, then I want to do some comparisons of the values, then return it to another function. As it stands now, I get the wrong results when I run it, as you can see at the bottom.
    Thanks very much for your help. I have been stumped all mornign on this and have looked everywhere trying to find an example. I don't won't to use math random. I am on a tight deadline to finish and at the rate I am going, I will not complete it.
    /** Generate numnodes value for random integers in
    the range 0..499. */
    public final class RandomInteger {
    public static final void main(String... aArgs){
    log("Generating 6 random integers in range
    0..499.");
    int numnodes = 6;
    //Randomly generate a number between 0 and 499 for
    the x and y coordinates for the nodes
    Random randomGenerator = new Random();
    for (int x = 0; x < numnodes; ++x) {
    int randomInt = randomGenerator.nextInt(500);
    Random randomGenerator2 = new Random();
    for (int y = 0;y < numnodes; ++y) {
    int randomInt2 = randomGenerator2.nextInt(500);
    log("Generated : " + randomInt + " " + randomInt2);
    log("Done.");
    private static void log(String aMessage){
    System.out.println(aMessage);
    Output:
    --------------------Configuration:
    <Default>--------------------
    Generating 6 random integers in range 0..499.
    Generated : 98 254
    Generated : 98 347
    Generated : 98 359
    Generated : 98 25
    Generated : 98 277
    Generated : 98 148
    Generated : 416 401
    Generated : 416 165
    Generated : 416 354
    Generated : 416 169
    Generated : 416 144
    Generated : 416 354
    Generated : 295 158
    Generated : 295 138
    Generated : 295 349
    Generated : 295 324
    Generated : 295 18
    Generated : 295 193
    Generated : 197 451
    Generated : 197 416
    Generated : 197 480
    Generated : 197 33
    Generated : 197 490
    Generated : 197 494
    Generated : 324 412
    Generated : 324 490
    Generated : 324 213
    Generated : 324 386
    Generated : 324 467
    Generated : 324 163
    Generated : 379 180
    Generated : 379 446
    Generated : 379 314
    Generated : 379 52
    Generated : 379 113
    Generated : 379 271
    Done.
    Process completed.

  • How to use an Array

    Morning all,
    I am trying to setup an array of numbers however, by looking at the crystal reports help file, I cannot find out how to set one up.
    I have created a new formula and inserted
    Local NumberVar Array x := MakeArray (1, 2, 3, 4, 5);
    however, it says you cannot set a result to an array.
    I have also looked at the Array help, but Crystal shows a VB syntax instead of Crystal. (How helpful to show VB syntax in CR!)
    My question is how can you use an array in your report that it shows numbers 1-5?
    many thanks
    Kind Regards
    Jehanzeb

    The question is - what you want to do with this array. Your code is correct , beside that you need to return something from formula and that needs to be discrete value.
    Local NumberVar Array x := MakeArray (1, 2, 3, 4, 5);
    "test"

  • Array output from formula node with input variable as array size

    Hi,
    I have created a formula node with an array output called al, but I get an error "you have connected a scalar type to an array with that type".
    I declare the output as follows..
    float64 al[len_as];
    where len_as is an scalar input to the formula node.
    It only works when I put a number as.
    float64 al[5];
    ,but I don't know beforehand how many elements I need, so I cannot use this.
    Please help! This is so stupid.
    Thanks

    Don't define your array in your formula node.
    Initialize the array as the size you want and pass it in as an input into the formula node.
    Are you sure you even need to use a formula node?  Can you implement your formula using all native LabVIEW functions?
    Message Edited by Ravens Fan on 10-07-2009 11:51 PM
    Attachments:
    Example_VI_BD.png ‏3 KB

  • Array Handling in Formula Node

    I have attached a simple VI wherein I want to take an input array, look at its size and use the size of the input array as the size of the output array. The output array needs to be declared. I want to be able to use the size of the input array "N" as the size of the output array too. The size of the input array changes dynamically based on my simulation needs. I dont want to modify the size of the array in the declaration every time I change the array size in simulation.
    I have tried using b[N] instead of b[10] in the formula node. However LV does not seem to accept this and gives me a syntax error. 
    Attachments:
    Array Handling in Formula node.vi ‏8 KB

    AGovi wrote:
     However I require to use complicated formulas such as 
    If a simple formula is easier in G, a complicated formula will also be easier in G.
    Actually, it will scale better.  Since graphical code is 2D, doubling the code will make it only 1.4x (sqrt2) larger in each dimension, while the formula will double in lenght.
    LabVIEW Champion . Do more with less code and in less time .

  • Problems making windchill chart using multidimensional arrays

    Alright i am doing a program for my java class. The book doesnt tell me much and the teacher didnt either cause we had a midterm to take. Alright in this program i have to write a java program that produces a wind chill chart with temperatures from 50 to -50 degrees f in steps of 10 degrees, with wind speeds from 5 to 50mph, in steps of 5mph. The following formula may be useful.
    windchill= ((10.45+6.686112 * sqrt(windspeed)- .447041 * windspeed)/22.034)*(temperature- 91.4) + 91.4
    use for statements in your program and a function to calculate the wind chill factor at a given temperature and wind speed.
    I know im gonna have to use multidimensional arrays to do this problem, unless someone has an easier way to do it. I am really stuck. I have this so far.
    import javax.swing.*;
    public class lab7
    public static void main( String args[] )
    int a[][] = {{5,10,15,20,25,30,35,40,45,50},
    {-50,-40,-30,-20,-10,0,10,20,30,40,50}};
    System.exit(0);
    I am not even sure if that is correct but the major problem is how can i get the program to show a table with the temperature on the x coordinate at the top the wind speed on the y axis and then having the program use those arrays to calculate the windchill and put that in the table. I am really stuck and i was wondering if u guys could give me a little push in the right direction. The book doesnt say much so thats why im asking.
    Thank you everyone.

    I have no clue what i am doing right now. I am so confused it isnt even funny. I am trying something new to see what happens. The decimalformat didnt do anything for me. I have the numbers i just want to be able to put them into a chart. I wish my teacher would actually teach, and the book actually say how to do stuff.
    This is my program:
    import java.text.DecimalFormat;
    public class lab7
    DecimalFormat twoDigits = new DecimalFormat ("0.00");
    static private double windchill(double s, double t) { 
    return (((10.45 + 6.686112 * Math.sqrt(s) - .447041 * s)/(22.034))*(t-91.4) + 91.4);};
    static void print(double s, double t)
    {   System.out.print(" "+windchill(s, t));};
    static private void printRow(double s)
    { // the speed is assumed constant  
    for (double t= -50; t <= 50; t+= 10) // loop over the temperature values
    print(s, t); // print a row value
    System.out.println();};
    static private void printChart()
    {   for (double s= 5; s <= 50; s+= 5)      
    printRow(s);};
    public static void main(String args[])
    for (double t= -50; t <= 50; t+= 10) // loop over the temperature values
    {System.out.print( "   " + t);};
    System.out.println();
    System.out.println();
    for (double s= 5; s<=50; s+= 5)
    {System.out.println(s);};
    printChart();
    I am probably way off and this program is due tomorrow and i am going nuts. I tried to do it during the week and it didnt work out to well.
    Here is what it is outputting.
    C:\cis260>java lab7
    -50.0 -40.0 -30.0 -20.0 -10.0 0.0 10.0 20.0 30.0 40.0 50.
    0
    5.0
    10.0
    15.0
    20.0
    25.0
    30.0
    35.0
    40.0
    45.0
    50.0
    -57.26056937082865 -46.747092046159025 -36.233614721489374 -25.720137396819737
    -15.2066600721501 -4.6931827474804635 5.820294577189159 16.333771901858796 26.84
    7249226528433 37.36072655119807 47.87420387586771
    -82.65748711959239 -70.3479052865236 -58.03832345345484 -45.728741620386074 -33
    .41915978731731 -21.109577954248536 -8.799996121179774 3.5095857118890024 15.819
    167544957764 28.128749378026534 40.4383312110953
    -98.80774164293763 -85.35599188035366 -71.90424211776966 -58.452492355185655 -4
    5.00074259260168 -31.54899283001768 -18.097243067433695 -4.645493304849694 8.806
    256457734293 22.25800622031828 35.70975598290227
    -110.17157107350803 -95.91615586321751 -81.66074065292699 -67.40532544263644 -5
    3.14991023234592 -38.894495022055395 -24.639079811764873 -10.38366460147435 3.87
    17506088161713 18.127165819106693 32.38258102939722
    -118.4766111010257 -103.63385218298993 -88.79109326495416 -73.94833434691841 -5
    9.105575428882645 -44.262816510846875 -29.42005759281112 -14.57729867477535 0.26
    54602432604065 15.108219161296176 29.95097807933194
    -124.60889848734033 -109.33245587861754 -94.05601326989475 -78.77957066117196 -
    63.50312805244914 -48.22668544372635 -32.950242835003564 -17.67380022628076 -2.3
    973576175579723 12.87908499116483 28.15552759988762
    -129.09477971074705 -113.50108949075079 -97.90739927075452 -82.31370905075829 -
    66.72001883076203 -51.12632861076577 -35.53263839076952 -19.93894817077326 -4.34
    5257950777011 11.24843226921925 26.842122489215498
    -132.2771986196876 -116.45844341320333 -100.63968820671906 -84.82093300023479 -
    69.00217779375052 -53.18342258726625 -37.36466738078198 -21.545912174297698 -5.7
    27156967813428 10.09159823867084 25.91035344515511
    -134.39436482483956 -118.42588074953267 -102.45739667422575 -86.48891259891886
    -70.52042852361197 -54.55194444830505 -38.58346037299816 -22.614976297691257 -6.
    646492222384367 9.321991852922537 25.29047592822944
    -135.61971729379445 -119.56457462803812 -103.50943196228181 -87.45428929652547
    -71.39914663076914 -55.34400396501283 -39.288861299256496 -23.233718633500175 -7
    .178575967743839 8.876566698012482 24.931709363768803
    C:\cis260>
    All i want it to do is look like this: im just gonna make numbers in between just say that there is numbers in that whole thing. What am i missing. Thanks everyone so far for everything, i just need a little more and it should be done.
    -50 -40 -30 -20 -10 0 10 20 30 40 50
    5 65 44 55 78 4 45 etc etc etc
    10
    15
    20
    25
    30
    35
    40
    45
    50

  • Would like to use an array of XY Graphs

    I want to display subsets of data on multiple xy graphs, and would like to do this in a For loop. Is there a way to use an array of XY graphs or access them programmatically from the For Loop. I am plotting data and using XY graph properties for cursors, graph colors, visible for each graph.

    Hi All,
    Ben would like to make another suggestions that he does not have time to try out ( to many project, to little time).
    How about using a single XY graph that is "off-screen". Write the data to the graph, adjust its properties as required, then get the "image".
    Do the above for each set of data then combine them in a single Picture control.
    If you track the region where each plot is displayed, you can watch for clicks on the picture, figure out which plot the user clicked on, then move the data for that plot into that single "off-screen" graph before programatically moving that plot such that it over-lays the part of the picture where its image was presented.
    Once this app is whipped up (provided all of this works) you could have as many graphs as you
    want and have the grpahics/cpu horsepower to drive. The user could do everything with this plot as usual.
    Sharing my thoughts,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to use the 'Decision between multiple alternatives' Process variant

    Hi ,
    Can anyone tell me how to use the 'Decision between multiple alternatives' Process variant in BI 7 Process chains ?
    The requuirement is that I have a DSO eg DSO 1 from which i have to load DSO 2 and DSO 3 . Now if the number of Records in DSO 1 are < 100 i will load DSO 2 from DSO 1 else i will load DSO 3 from DSO 1 .
    So in the PC i have used a 'ABAP Program' variant (which counts the number of rows in DSO 1) after loading DSO 1 and  after this 'ABAP Program' Variant , i have used the 'Decision between multiple alternatives' Process variant. Problem is it is giving me only some some system fields in the formula , like sy-datum or sy-timlo , which are of no use here .
    It would be great if i can receive some help here .
    --Devraj

    in RSPC you create a ABAP processing type "ending with specific values".
    We use true or false for things as you specify.
    your abap program should return a true or a false to indicate which of the situations is applicable.
    Is this helpful?
    Marco

  • How do I use your iPhone with multiple iTunes libraries

    Hi, I have my music spread out between 3 seperate Itunes libraries on 3 different profiles on my computer. I have the newest generation Ipod Nano, Ipod Shuffle, and Iphone 4s. My Ipod's are both full, so I've decided to start putting music onto my phone. With my Ipod's, I can plug them into one profile on the computer, download the music on the Itunes library that exists on that profile, then do the same with the other profiles with no issue. However when I try to do this with my phone, It asks me to erase the music I have gotten from one Itunes library and sync with the current library, as soon as I plug it in to a different Itunes on one of the other profiles. I have my Iphone configured with the Manually manage music option, and I still haven't found a way to use my Iphone with multiple music libraries. PLEASE HELP

    http://support.apple.com/kb/PH12113 - If you use manual syncing, you can sync items from more than one iTunes library to your iPod. (You can sync iPod touch, iPhone, and iPad with only one iTunes library.)
    http://support.apple.com/kb/HT1202 - When manually managing content, you can add content from multiple libraries to your iPod or iPad. Even when manually managing music, some content may be available from only one library at time. This includes all content on iPhone and video content on iPod and iPad.
    They seem inconsistent as far as the iPad is concerned but in both articles the iPhone appears to only be able to sync to one library at a time.
    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • How to use user variable in Member Formula

    Hi All
    I have to write a member formula for %linearity quarter for a weekly application.This member will be used in reports and we do not want to do this calculation in reports, hence need to write member formula. The formula is
    Week1 of Q1 forecast / Q1 Total Forecast , Week2 of Q1 Forecast/ Q1 Forecast.............,Week15 of Q2 forecast/ Q2Total Forecast.......and so on.
    According to me it should work in the below mentioned manner , but need help in improvising the formula.
    If(@ismbr("Weeks1") or @ismbr("Weeks2") or @ismbr("Weeks3") or @ismbr("Weeks4") or @ismbr("Weeks5") or @ismbr("Weeks6") or @ismbr("Weeks7") or @ismbr("Weeks8") or @ismbr("Weeks9") or @ismbr("Weeks10") or @ismbr("Weeks11") or @ismbr("Weeks12") or @ismbr("Weeks13") or @ismbr("Weeks14") )
    "Current_Forecast"/"Q1"->"Current_Forecast";......
    If anybody can help in suggesting how can i use user variable in this formula to achieve the required result.
    Thanks

    Hi
    Thanks for the suggestion and it would be a better idea to use ISIDESC as compared to ISMBR.
    I also wanted to ask if in the below mentioned formula if the result of first line is true than will the second line pick the current_forecast value of the respective member of Q1 and divide it by the current_forecast value of Q1.
    IF(@ISIDESC("Q1"))
    "Current_Forecast"/"Q1"->"Current_Forecast";
    Also i need to know how can i write a member formula for week YOY% using user variables.The general formula is
    Week 1 of FY13 - Week 1 of FY12/Weeks 1 of FY12
    Week 2 of FY13 - Week 2 of FY12/Weeks 2 of FY13 and so on till week 53.
    Thanks

  • Relative path for Download directory folder.I created a firefox profile and i wanted to use this profile in multiple machines.I wanted to use a relative path for download directory with respect to the profile folder.I need this on Linux machines

    I have a use case where I need to use different download directories with different firefox profiles.I need to use this profiles in multiple linux machines.
    I need to have a relative path to my download directory with respect to the profile folder.
    Ex: I have a selenium test which opens a website and downloads it to my machine.I want this downloaded file to go into some specific folder relative to this profile folder.How do I do this??

    That is not a practically empty xinitrc - that file only needs one line: exec WM.  Other things are entirely optional, and some of them very useful, but I'd encourage you to stick with the simplest xinitrc that will do what you require.
    Is slim involved?  Probably.  That is the source of many problems.  But to start narrowing this down, I have 3 suggestions:
    1) temporarily (at least) change your inittab to default to runlevel 3 ... actually, is it currently set to 5 or 3? if it is currently 3 that would explain why slim doesn't start.
    2) at a tty in runlevel 3 use "xinit" instead of "startx".  Startx is fine most of the time, but it is essentially just a complex wrapper for xinit.  That complexity can often iadd useful functionality, but it *always* makes troubleshooting more difficult.  So for now just use a vanilla 'xinit'.
    3) remove dbus-launch from your exec line in xinitrc.  This is done by console-kit so it is redundant and potentially problematic.  Further BOTH of these are taken care of by slim, so I'd even suggest getting both a jump start on being ready for slim and simplifying troubleshooting by removing both of them.  Just make that line "exec openbox-session"
    Edit: adding one more:
    4) temporarily switch out openbox-session for openbox.  I suspect the reason feh's setting of the background is getting overridden is due to a script or setting in openbox's autostart settings - many of these are only invoked when "openbox-session" is called, while "openbox" starts *just* the window manager itself.
    Last edited by Trilby (2012-10-03 17:30:36)

  • How do I use an array variable in the assignment target?

    Hi,
    I am creating a BPEL process in which I have to use an array variable. The array variable needs to be initialized based on some condition.
    The issue is I cannot find a way to set the value of the array variable. There are ways to GET the value of an array variable indexing into it.
    But how do I set the value by using the Array variable in the <to> tag?
    Any help is appreciated. I am using BPEL 10.1.2.0.2.
    Thanks.

    You can declare a variable of type integer which will server as your index. Figure out based on some condition in your process which index of array to update. Assign to your integer variable you created.
    And have Assign copy operation like this -
    <copy>
    <from variable="Var_Output_FetchDueDate"
    part="OutputParameters"
    query="/ns18:OutputParameters/ns18:DUEDATE"/>
    <to variable="outputVariable" part="payload"
    query="/client:GetCustomerAccountInformationProcessResponse/client:customer/client:accounts/client:account[$Var_Counter]/client:dueDate"/>
    </copy>
    I have been using this in my processes.

  • Using mathscript to generate multiple digital outputs for switch control

    Hello 
    I am new to this NI LV and a have kind of a basic question. I would like to use Mathscript to generate an array of bolean numbers which will be used to control the Digital I/O lines. I am using NI 6251 USB device and the Mathscript code runs well. But I have a problem using this array to control the Digital output. So I created a simple test programme where I set the DAQ assitant to generate 4 digital outputs(P0.0 ~ P0.3) and it gives error that  ".. number of channels in the data does not match the number of channels in the task..." (see attachment) . How can I solve this problem thank you.
    Attachments:
    K-9.jpg ‏36 KB

    looks like you did not initialize all 4 of the elements in the bool array....

Maybe you are looking for