Parallel Arrays
Parallel Arrays
I am creating a report that uses parallel arrays, or a single multidimensional array in the code behind. Does anyone know where I can get a code sample? I've got it started and have one array working, but a sample would help.
Parallel Arrays
Hello.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Maybe you can send us a sample project with arrays and a report template. And, please, describe what you try to achieve.
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Maybe you can send us a sample project with arrays and a report template. And, please, describe what you try to achieve.
Thank you.
Parallel Arrays
I've sent you a project containing the report. In the comments of the "QtyPerItemNumbers" function, in the code tab of the report, I've listed the things I would like to accomplish with this report. I've also listed the values that would be displayed in the report if it was working correctly.
Thank you very much for your help!
Thank you very much for your help!
- Attachments
-
- 1241.Test Array Report 3-5.zip
- (1.94 MiB) Downloaded 359 times
Parallel Arrays
Hello.
Next, I've
- added new sting variable {Variable1}
- changed expression of the GroupHeader6 to {SubParts.ProductsIndex}
- wrote BeforePrint event in GroupHeader6
- wrote BeforePrint event in GroupHeader5 (you can write it in other Band event)
Now, in generated report you can see red string. I guess it is what you want. Therefore now you don't need "QtyPerItemNumbers" function.
Thank you.
First of all you can simplify your report template by minimizing of GroupBands. You can use one GroupBand instead of four using next expressiondjm000111 wrote:I've sent you a project containing the report. In the comments of the "QtyPerItemNumbers" function, in the code tab of the report, I've listed the things I would like to accomplish with this report. I've also listed the values that would be displayed in the report if it was working correctly.
Thank you very much for your help!
Code: Select all
{SubParts.Thickness}{SubParts.Material}{SubParts.Cut_Length}{SubParts.Cut_Width}
- added new sting variable {Variable1}
- changed expression of the GroupHeader6 to {SubParts.ProductsIndex}
- wrote BeforePrint event in GroupHeader6
Code: Select all
Me.Variable1 = Me.Variable1 + " #" + SubParts.Subassembly.Products.ItemNumber + "(" + (Totals.Sum(GroupHeader6, SubParts.Qty)*SubParts.Subassembly.Products.Qty).tostring + ")"
Code: Select all
Me.Variable1 = ""
Now, in generated report you can see red string. I guess it is what you want. Therefore now you don't need "QtyPerItemNumbers" function.
Thank you.
- Attachments
-
- 1244.Test Array Report 3-5 edited.zip
- (1.69 MiB) Downloaded 299 times
Parallel Arrays
Thank you for the solution. I'm having trouble viewing it. I downloaded your edited project, but when I opened it in Visual Studio 2010, I got reference errors. I updated the references, but it still won't compile due to errors.
There are two errors remaining:
1.) The designer cannot process the code at line 25: Me.StiReport_Test1 = New Stimulsoft.Report.StiReport()
2.) 'DataBandsUsedInPageTotals' is not a member of 'Stimulsoft.Report.StiReport'. C:\Users\...\My VB.Net Projects\Test Array Report 3-5\Test Array Report 3-5\Form1.Designer.vb 33 9 Test Array Report 3-5
Can you tell me if you added functionality that would require other configuration changes on my end? Can you think of any reason for the errors?
Also, why am I not able to see the Stimulsoft references in the "Add Reference" box, under the .NET tab? I had to add them manually and from previous experience learned that doing so limits the project somewhat. Any ideas? I have uninstalled Stimulsoft, cleared all Stimulsoft DLLs from the GAC, and reinstalled.
Thanks for you help so far.
There are two errors remaining:
1.) The designer cannot process the code at line 25: Me.StiReport_Test1 = New Stimulsoft.Report.StiReport()
2.) 'DataBandsUsedInPageTotals' is not a member of 'Stimulsoft.Report.StiReport'. C:\Users\...\My VB.Net Projects\Test Array Report 3-5\Test Array Report 3-5\Form1.Designer.vb 33 9 Test Array Report 3-5
Can you tell me if you added functionality that would require other configuration changes on my end? Can you think of any reason for the errors?
Also, why am I not able to see the Stimulsoft references in the "Add Reference" box, under the .NET tab? I had to add them manually and from previous experience learned that doing so limits the project somewhat. Any ideas? I have uninstalled Stimulsoft, cleared all Stimulsoft DLLs from the GAC, and reinstalled.
Thanks for you help so far.
Parallel Arrays
Hello,
For your version (2010.1.700) please simply delete this line of code.
Thank you.
The "DataBandsUsedInPageTotals" object is used in the latest builds of our product.djm000111 wrote:2.) 'DataBandsUsedInPageTotals' is not a member of 'Stimulsoft.Report.StiReport'. C:\Users\...\My VB.Net Projects\Test Array Report 3-5\Test Array Report 3-5\Form1.Designer.vb 33 9 Test Array Report 3-5
Can you tell me if you added functionality that would require other configuration changes on my end? Can you think of any reason for the errors?
For your version (2010.1.700) please simply delete this line of code.
Thank you.
Parallel Arrays
Hello.
Sorry, i attached the wrong project. Please check this project.
Thank you
Sorry, i attached the wrong project. Please check this project.
Thank you
- Attachments
-
- 1252.Test Array Report 3-5 edited.zip
- (1.26 MiB) Downloaded 291 times
Parallel Arrays
Hello.
Thank you.
If there are any problems you can add assemblies from browse tab.djm000111 wrote:Also, why am I not able to see the Stimulsoft references in the "Add Reference" box, under the .NET tab? I had to add them manually and from previous experience learned that doing so limits the project somewhat. Any ideas? I have uninstalled Stimulsoft, cleared all Stimulsoft DLLs from the GAC, and reinstalled.
Thank you.
Parallel Arrays
Thank you for your comments, but I still have a problem. I downloaded the second project and get the following error when I try to run it: "OleDb Exception was unhandled." Alternatively when I try to preview the report from the Report Designer I get an error: "Object reference not set to an instance of an object" and nothing is displayed.
Also, is there important functionality that is used in the "DataBandsUsedInPageTotals" object that is used in your solution to my problem, or is there a work-around to using that object so that I can accomplish the same thing in the report without using it?
Thank you,
Also, is there important functionality that is used in the "DataBandsUsedInPageTotals" object that is used in your solution to my problem, or is there a work-around to using that object so that I can accomplish the same thing in the report without using it?
Thank you,
Parallel Arrays
Hello.
in Form1.Designer.vb.
Thank you.
Please correct the path to the database by editing OleDb connection.djm000111 wrote:Thank you for your comments, but I still have a problem. I downloaded the second project and get the following error when I try to run it: "OleDb Exception was unhandled." Alternatively when I try to preview the report from the Report Designer I get an error: "Object reference not set to an instance of an object" and nothing is displayed.
Please comment this stringdjm000111 wrote:Also, is there important functionality that is used in the "DataBandsUsedInPageTotals" object that is used in your solution to my problem, or is there a work-around to using that object so that I can accomplish the same thing in the report without using it?
Code: Select all
Me.StiReport_Test1.DataBandsUsedInPageTotals = Nothing
Thank you.