Showing posts with label rdlc. Show all posts
Showing posts with label rdlc. Show all posts

Monday, March 26, 2012

parameter is missing a value error

I am trying to populate a report "rdlc" file within a reportviewer control in a webpage. It works fine when is ran as a RDL file as a report services solution. Now that I created my datasource that will populate my report, I get an error "The 'beg_date' parameter is missing a value", which is a field that is specified back from the result of the procedure. Anyone know how to approach this?

Private connAs String Protected Sub Page_Load(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles Me.Load conn = System.Configuration.ConfigurationManager.ConnectionStrings("ESQLConn").ConnectionString()End Sub Protected Sub Button1_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles Button1.Click AddReportDataset()End Sub Private Sub AddReportDataset()Dim ds1As ReportDataSource =New ReportDataSource("DataSource1", sd1())Dim ds2As ReportDataSource =New ReportDataSource("DataSource2", sd2())Dim ds3As ReportDataSource =New ReportDataSource("DataSource3", sd3())Me.rptViewer.LocalReport.DataSources.Add(ds1)Me.rptViewer.LocalReport.DataSources.Add(ds2)Me.rptViewer.LocalReport.DataSources.Add(ds3)End Sub Private Function sd1()As SqlDataSourceDim compnameAs ControlParameter =New ControlParameter compname.DefaultValue =Me.txtCompany.Text.ToStringDim begdateAs ControlParameter =New ControlParameter begdate.DefaultValue =Me.txtBegDate.Text.ToStringDim enddateAs ControlParameter =New ControlParameter enddate.DefaultValue =Me.txtEndDate.Text.ToStringDim sqldsAs New SqlDataSource sqlds.ConnectionString = conn sqlds.SelectCommand ="csp_rpt_ef0115_db" sqlds.SelectCommandType = SqlDataSourceCommandType.StoredProcedure sqlds.SelectParameters.Add(compname) sqlds.SelectParameters.Add(begdate) sqlds.SelectParameters.Add(enddate)Return sqldsEnd Function Private Function sd2()As SqlDataSourceDim sqldsAs New SqlDataSource sqlds.ConnectionString = conn sqlds.SelectCommand ="SELECT DISTINCT RTRIM(Act_Type) + ISNULL(Act_Sub_Type,'') AS Type FROM AR_Act" sqlds.SelectCommandType = SqlDataSourceCommandType.Text Return sqlds End Function Private Function sd3() As SqlDataSource Dim sqlds As New SqlDataSource sqlds.ConnectionString = conn sqlds.SelectCommand = "select Item from dbo.Pick_Items with (nolock)
where fPick_Name='asxdbLocations" sqlds.SelectCommandType = SqlDataSourceCommandType.TextReturn sqldsEnd Function

hello,

you seem to be commenting some of you code out by using ' instead of "

See your original post and look at the text in green which is commented out. Could this be the problem?

Regards

Marco

|||

use those link it might help you http://www.c-sharpcorner.com/UploadFile/asif.blog/DynamicDataGrouping08042006115320AM/DynamicDataGrouping.aspx

Monday, February 20, 2012

Page Setup button in Report Viewer object

I have develop a Windows Form Application that have a Report Viewer object
that rendering a report .rdlc.
I have a problem with the PageSetup Button. The button for set the layout of
the page. If I click that button the type of the page is on Letter format and
i must always set the margin on A4 format of the page before print the
report. But that appends in someone PC...unfortunately it appends on the PC
of the client (in the driver of the printer the page layout is set to A4).
How I can resolve that problem?
Another problem is the set of the margin in PageSetup Button.
If I click on 'Page setup' button the margins left & right are not what I
set on the rdlc file at design time (0,5cm) they are 2 mm
If I click OK on the 'Page Setup' form the Report margins change to the
margins from 'Page setup'
If I open ''Page setup' again the margin settings are now less than
previously set and clicking OK results in the report margins changing again
The margin change from 2 to 0,8 -> from 0,8 to 0,3 -> from 0,3 to 0,1 ->
from 0,1 to 0.
I have Visual Studio 2005 service pack 1Are you doing the 'ChangeService' voodoo that needs to be done to save the
report?
Check 'www.gotreportviewer.com' for an example at what you are doing.
I am no expert at SSRS myself.. just started my fight with it last week so...
- Tanmay
"Marco82bg" wrote:
> I have develop a Windows Form Application that have a Report Viewer object
> that rendering a report .rdlc.
> I have a problem with the PageSetup Button. The button for set the layout of
> the page. If I click that button the type of the page is on Letter format and
> i must always set the margin on A4 format of the page before print the
> report. But that appends in someone PC...unfortunately it appends on the PC
> of the client (in the driver of the printer the page layout is set to A4).
> How I can resolve that problem?
> Another problem is the set of the margin in PageSetup Button.
> If I click on 'Page setup' button the margins left & right are not what I
> set on the rdlc file at design time (0,5cm) they are 2 mm
> If I click OK on the 'Page Setup' form the Report margins change to the
> margins from 'Page setup'
> If I open ''Page setup' again the margin settings are now less than
> previously set and clicking OK results in the report margins changing again
> The margin change from 2 to 0,8 -> from 0,8 to 0,3 -> from 0,3 to 0,1 ->
> from 0,1 to 0.
> I have Visual Studio 2005 service pack 1