Aug 13, 2004 #1 redeemasp Programmer Joined Jun 1, 2004 Messages 63 Location GB I'm able to make a shared variable of a data field , e.g. command.jobid, but can you make running totals shared? thanks
I'm able to make a shared variable of a data field , e.g. command.jobid, but can you make running totals shared? thanks
Aug 16, 2004 #21 GJParker Programmer Joined Jul 4, 2002 Messages 1,614 Location GB you should replace {Table.DicId} with your own database field, ther field you are using to create the Div id group you mention above. Basically this line does 2 things shared numbervar array shdselling [DistinctCount(Table.DivID})]; shared numbervar array shdselling - creates a shared variable called shdselling [DistinctCount(Table.DivID})]; - assigns a value for the size of the array = to the number of div id's in the report. Gary Parker MIS Data Analyst Manchester, England Upvote 0 Downvote
you should replace {Table.DicId} with your own database field, ther field you are using to create the Div id group you mention above. Basically this line does 2 things shared numbervar array shdselling [DistinctCount(Table.DivID})]; shared numbervar array shdselling - creates a shared variable called shdselling [DistinctCount(Table.DivID})]; - assigns a value for the size of the array = to the number of div id's in the report. Gary Parker MIS Data Analyst Manchester, England
Aug 16, 2004 Thread starter #22 redeemasp Programmer Joined Jun 1, 2004 Messages 63 Location GB Getting a subscript error (shd be between 1 and size of array) I assume the size of the array isn't coming into the report. I then defines the array as 100 / shared numbervar array shdSellingNew [100]; //define shared selling variable shared stringvar array shdDividNew [100]; //define shared div variable Still I get an error. Upvote 0 Downvote
Getting a subscript error (shd be between 1 and size of array) I assume the size of the array isn't coming into the report. I then defines the array as 100 / shared numbervar array shdSellingNew [100]; //define shared selling variable shared stringvar array shdDividNew [100]; //define shared div variable Still I get an error.
Aug 16, 2004 #23 GJParker Programmer Joined Jul 4, 2002 Messages 1,614 Location GB Try this syntax Code: //@DeclareVariables whileprintingrecords; Local Numbervar ArraySize := DistinctCount({Table.DivID}); shared numbervar array shdselling; Redim shdselling [ArraySize] shared stringvar array DivID; Redim DivID [ArraySize] Shared NumberVar intCount :=1 Gary Parker MIS Data Analyst Manchester, England Upvote 0 Downvote
Try this syntax Code: //@DeclareVariables whileprintingrecords; Local Numbervar ArraySize := DistinctCount({Table.DivID}); shared numbervar array shdselling; Redim shdselling [ArraySize] shared stringvar array DivID; Redim DivID [ArraySize] Shared NumberVar intCount :=1 Gary Parker MIS Data Analyst Manchester, England