Click here to Skip to main content
15,922,696 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionNative Compiler for VB Pin
rkinning13-Dec-16 15:39
rkinning13-Dec-16 15:39 
AnswerRe: Native Compiler for VB Pin
Dave Kreskowiak13-Dec-16 17:39
mveDave Kreskowiak13-Dec-16 17:39 
GeneralRe: Native Compiler for VB Pin
rkinning14-Dec-16 5:40
rkinning14-Dec-16 5:40 
GeneralRe: Native Compiler for VB Pin
Dave Kreskowiak14-Dec-16 6:55
mveDave Kreskowiak14-Dec-16 6:55 
AnswerRe: Native Compiler for VB Pin
Eddy Vluggen14-Dec-16 6:19
professionalEddy Vluggen14-Dec-16 6:19 
JokeRe: Native Compiler for VB Pin
Richard Deeming14-Dec-16 7:27
mveRichard Deeming14-Dec-16 7:27 
AnswerRe: Native Compiler for VB Pin
Gerry Schmitz14-Dec-16 12:34
mveGerry Schmitz14-Dec-16 12:34 
QuestionSubreportProcessingEventArgs, getting the type to complete a CType for a DataSet in a report writer Pin
jkirkerx13-Dec-16 9:11
professionaljkirkerx13-Dec-16 9:11 
This is that FoxPro project that I'm working on, and creating a sub report for a report; while using the event handler for SubReportProcessing.

So I have this dataset that I pass to the RDLC file which is a list of invoices for the month. Each invoice has items that I'm using a sub report for. So I made an event handler for it. I have the data already, and perhaps it would be easier to just write another function to load the data in the event handler instead.

But I just can't get this last part in my event handler, it's so foreign to me.

This is the dataset below that has my invoice items, that I add to LocalReport and is passed to the RDLC. so I have a dataset that is ready to go in "ds_invoice_items"
Dim ds_items As New DataSet()
ds_items.DataSetName = "ds_invoice_items"
ds_items.Tables.Clear()
ds_items.Tables.Add(table_Items)
ds_items.Tables(0).TableName = "tablix_invoice_items"

'Write the datasource to the report canvas
rv_Canvas.LocalReport.DataSources.Clear()
rv_Canvas.LocalReport.DataSources.Add(New ReportDataSource("ds_salesRep", ds_salesRep.Tables(0)))
rv_Canvas.LocalReport.DataSources.Add(New ReportDataSource("ds_salesRep_invoices", ds_invoices.Tables(0)))
rv_Canvas.LocalReport.DataSources.Add(New ReportDataSource("ds_invoice_bAddress", ds_bAddress.Tables(0)))
rv_Canvas.LocalReport.DataSources.Add(New ReportDataSource("ds_invoice_sAddress", ds_sAddress.Tables(0)))
rv_Canvas.LocalReport.DataSources.Add(New ReportDataSource("ds_invoice_items", ds_items.Tables(0)))
rv_Canvas.LocalReport.DisplayName = p_salesRepName & " Invoices"
AddHandler rv_Canvas.LocalReport.SubreportProcessing, AddressOf Me.SetSubDataSource

This is my event handler. The first and 2nd line works. It's the 3rrd line.

My Question is:
I know List(Of model_invoice_items) is wrong. I can't figure out what to replace it with.
Do I get the type, or hard code the type, I don't even know what the type is.
Private Sub SetSubDataSource(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)

<pre>
Dim mainSource = CType(sender, LocalReport).DataSources("ds_invoice_items")
Dim FINVNO = Integer.Parse(e.Parameters("FINVNO").Values.First)

Dim subSource = CType(mainSource.Value, List(Of model_invoice_items)).Single(Function(m) m.FINVNO = FINVNO)
e.DataSources.Add(New ReportDataSource("ds_invoice_items", subSource))

End Sub

21st Century Globalism has become Socialism on a planetary scale, in which the unequal treaties of the past have come back into play.

AnswerRe: SubreportProcessingEventArgs, getting the type to complete a CType for a DataSet in a report writer Pin
Richard Deeming13-Dec-16 9:41
mveRichard Deeming13-Dec-16 9:41 
GeneralRe: SubreportProcessingEventArgs, getting the type to complete a CType for a DataSet in a report writer Pin
jkirkerx13-Dec-16 10:39
professionaljkirkerx13-Dec-16 10:39 
GeneralRe: SubreportProcessingEventArgs, getting the type to complete a CType for a DataSet in a report writer Pin
Richard Deeming14-Dec-16 0:49
mveRichard Deeming14-Dec-16 0:49 
QuestionINI - read multiline! Pin
User 989707411-Dec-16 2:15
User 989707411-Dec-16 2:15 
AnswerRe: INI - read multiline! Pin
Afzaal Ahmad Zeeshan11-Dec-16 2:50
professionalAfzaal Ahmad Zeeshan11-Dec-16 2:50 
GeneralRe: INI - read multiline! Pin
User 989707411-Dec-16 5:21
User 989707411-Dec-16 5:21 
GeneralRe: INI - read multiline! Pin
Richard MacCutchan11-Dec-16 6:42
mveRichard MacCutchan11-Dec-16 6:42 
GeneralRe: INI - read multiline! Pin
User 989707411-Dec-16 7:15
User 989707411-Dec-16 7:15 
GeneralRe: INI - read multiline! Pin
Richard MacCutchan11-Dec-16 7:32
mveRichard MacCutchan11-Dec-16 7:32 
GeneralRe: INI - read multiline! Pin
User 989707411-Dec-16 7:34
User 989707411-Dec-16 7:34 
GeneralRe: INI - read multiline! Pin
User 989707412-Dec-16 0:28
User 989707412-Dec-16 0:28 
GeneralRe: INI - read multiline! Pin
Richard Deeming12-Dec-16 1:13
mveRichard Deeming12-Dec-16 1:13 
GeneralRe: INI - read multiline! Pin
User 989707412-Dec-16 1:18
User 989707412-Dec-16 1:18 
GeneralRe: INI - read multiline! Pin
User 989707412-Dec-16 6:40
User 989707412-Dec-16 6:40 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen12-Dec-16 7:44
professionalEddy Vluggen12-Dec-16 7:44 
GeneralRe: INI - read multiline! Pin
User 989707412-Dec-16 8:31
User 989707412-Dec-16 8:31 
GeneralRe: INI - read multiline! Pin
Eddy Vluggen12-Dec-16 8:44
professionalEddy Vluggen12-Dec-16 8:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.