Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET 2.0 How to see Webform1 from Webform2

Status
Not open for further replies.

joggi

Programmer
Nov 8, 2006
44
YU
I have 2 webforms Form1 and Form2.
Form1 has button Print
Form2 has CrystalReportViewer

I have VB code for Print_click

Datatable=something from database……
……………………………………….

Dim rpt As New ReportDocument
rpt.Load(Server.MapPath("Test.rpt"))
rpt.SetDataSource(datatable)

CrystalReportViewer1.ReportSource = rpt
CrystalReportViewer1.DataBind()

Problem is that Form1 doesn’t see Form2.CrystalReportViewer ( in VB6 I would say Form2.CrystalReportViewer1.ReportSource = rpt).


I make Public Class Form2 but I cannot see that form from Form1.

How to make webforms visible from one to another?

Thanks in advance
 
Is this an ASP.NET question?

____________ signature below ______________
The worst mistake you'll ever make is to do something simply the way you know how while ignoring the way it should be done
 
I miss-read the question. Ignore my post please

____________ signature below ______________
The worst mistake you'll ever make is to do something simply the way you know how while ignoring the way it should be done
 
Create a public property or pass the report in a session variable or cache
 
Thanks, I was thinking about session variable but I didn't know is it a good way to this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top