Click here to Skip to main content
15,921,905 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to add mouseover event on Hyperlink in a gridview? Pin
N a v a n e e t h19-Mar-08 20:13
N a v a n e e t h19-Mar-08 20:13 
GeneralRe: How to add mouseover event on Hyperlink in a gridview? Pin
rahul.net1119-Mar-08 20:39
rahul.net1119-Mar-08 20:39 
GeneralRe: How to add mouseover event on Hyperlink in a gridview? Pin
Laddie19-Mar-08 22:39
Laddie19-Mar-08 22:39 
Generalexport crystal report in excel in asp.net(urgent) Pin
Milind Panchal19-Mar-08 19:01
Milind Panchal19-Mar-08 19:01 
GeneralRe: export crystal report in excel in asp.net(urgent) Pin
Anoop Brijmohun19-Mar-08 20:32
Anoop Brijmohun19-Mar-08 20:32 
GeneralRe: export crystal report in excel in asp.net(urgent) Pin
Vasudevan Deepak Kumar20-Mar-08 21:50
Vasudevan Deepak Kumar20-Mar-08 21:50 
GeneralReport Problem Pin
Usharva19-Mar-08 18:29
Usharva19-Mar-08 18:29 
GeneralGenerate and render reports to PDF in a loop using ReportViewer in VS2005 Pin
SlamDunk2319-Mar-08 17:15
SlamDunk2319-Mar-08 17:15 
Hi,

I am trying to achive the following. Have a loop which goes through a list of suppliers for each supplier a report is created to show their orders (but the report does not need to be displayed on the screen) the report is then rendered into a pdf and emailed to the supplier.

This is what i have done. I have created a local report using the wizard. Created the data set then created the data source for the reportviewer control as an objectdatasource. Placed a loop inside the page load. Inside the loop i have set the paramerter for the objectdatasource to the name of the supplier.

Now if i dont use a loop and just display the report it will display correctly for the supplier that i set in the code and if i place the code to render to pdf and email inside a button it all works fine.

But i need to make it all automatic so on my page load i created a loop that first sets the supplier paramerter then calls the function to render to pdf and then email the report. But it gives an error when i try to render the report saying that the datasource for the report has not been set. I tried the code from the net that resets the reports clears it out of the page collection then creates a new reportviewer control and assign it the dataset but it does not work. I am thinking that because i am not displaying the report and trying to render it to pdf before it can get the date it is giving an error. I am pasting the code that i have tried any ideas ???

Me.ApplianceFax.Reset()
Dim oldViewer As Microsoft.Reporting.WebForms.ReportViewer

Dim oldIndex As New Int32
oldViewer = Me.ApplianceFax

Dim coll As New ControlCollection(Me)

coll = oldViewer.Parent.Controls

oldIndex = coll.IndexOf(oldViewer)

Dim ReportViewer1 As New Microsoft.Reporting.WebForms.ReportViewer
' Set Processing Mode

ReportViewer1.LocalReport.ReportPath = "Report2.rdlc"

ReportViewer1.ProcessingMode = ProcessingMode.Local

' Set reportviewer size

ReportViewer1.Height = New Unit("550px")
ReportViewer1.Width = New Unit("100%")

'ReportViewer1.ID = "ApplianceFax"

' Set default values

ReportViewer1.ShowExportControls = False

ReportViewer1.ShowBackButton = False

ReportViewer1.SizeToReportContent = True

' Reset the control collection position

coll.AddAt(oldIndex, ApplianceFax)

coll.Remove(oldViewer)




Me.ObjectDataSource1.SelectParameters("Supplier").DefaultValue = Supplier


ReportViewer1.LocalReport.DataSources.Clear()

ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("dsApplianceFaxTableAdapters.sp_ApplianceFaxReportTableAdapter", Me.ObjectDataSource1))
ReportViewer1.LocalReport.Refresh()
GeneralRe: Generate and render reports to PDF in a loop using ReportViewer in VS2005 Pin
sidbaruah19-Mar-08 20:36
sidbaruah19-Mar-08 20:36 
Questionhow to export data to powerpoint using vs2005 Pin
27185324119-Mar-08 16:21
27185324119-Mar-08 16:21 
AnswerRe: how to export data to powerpoint using vs2005 Pin
sidbaruah19-Mar-08 21:47
sidbaruah19-Mar-08 21:47 
GeneralParse the selected value from ddl and fill another ddl with information + NHibernate + C# Pin
Thommie.h19-Mar-08 11:16
Thommie.h19-Mar-08 11:16 
GeneralRe: Parse the selected value from ddl and fill another ddl with information + NHibernate + C# Pin
Marco van der Linden19-Mar-08 11:50
Marco van der Linden19-Mar-08 11:50 
GeneralRe: Parse the selected value from ddl and fill another ddl with information + NHibernate + C# Pin
Thommie.h20-Mar-08 5:40
Thommie.h20-Mar-08 5:40 
GeneralRe: Parse the selected value from ddl and fill another ddl with information + NHibernate + C# Pin
Marco van der Linden20-Mar-08 6:06
Marco van der Linden20-Mar-08 6:06 
GeneralRe: Parse the selected value from ddl and fill another ddl with information + NHibernate + C# [modified] Pin
Thommie.h20-Mar-08 7:29
Thommie.h20-Mar-08 7:29 
Questionget data from gridview row before delete ? Pin
C. L. Phillip19-Mar-08 11:09
C. L. Phillip19-Mar-08 11:09 
AnswerRe: get data from gridview row before delete ? Pin
C. L. Phillip20-Mar-08 4:12
C. L. Phillip20-Mar-08 4:12 
QuestionUsing Certificates with c# and ASP.NET Pin
sfog19-Mar-08 11:08
sfog19-Mar-08 11:08 
GeneralCross post - please ignore Pin
pmarfleet19-Mar-08 11:14
pmarfleet19-Mar-08 11:14 
QuestionBusiness Logic and the current context Pin
Adriann19-Mar-08 11:08
Adriann19-Mar-08 11:08 
GeneralRe: Business Logic and the current context Pin
AlexeiXX319-Mar-08 15:41
AlexeiXX319-Mar-08 15:41 
GeneralRe: Business Logic and the current context Pin
Adriann20-Mar-08 6:58
Adriann20-Mar-08 6:58 
GeneralRe: Business Logic and the current context Pin
Adriann23-Mar-08 6:25
Adriann23-Mar-08 6:25 
QuestionHow to re-use one SqlDataSource for mutiple grids with different parameters Pin
Brady Kelly19-Mar-08 7:58
Brady Kelly19-Mar-08 7:58 

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.