Wednesday, March 28, 2012
Property page giving error
I just deployed a report on a report Server from my Dev m/c...
The Report is running fine except the Property page for the Rpeort shows
the following error
"Unable to generate a temporary class (result=1). error CS1514: { expected
error CS1001: Identifier expected error CS1031: Type expected error CS1519:
Invalid token '{' in class, struct, or interface member declaration error
CS1514: { expected error CS1001: Identifier expected error CS1031: Type
expected error CS1519: Invalid token '{' in class, struct, or interface
member declaration "
I am Using MS RS version 8.00.743.00, My Resporting server is Win 2000 and
My Dev mc is Win XP.
BTW just found a bug with this version of the MSRS as the name of the rdl
file should not contain "Attachment" Key word else the Report can be deployed
but cant be viewed.
any Idea on above issue will be highly aprreciated.
siajDoes this happens to that particular report only?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"siaj" <siaj@.discussions.microsoft.com> wrote in message
news:069A7DCF-3388-40B6-A2E0-51219071C613@.microsoft.com...
> Hi ,
> I just deployed a report on a report Server from my Dev m/c...
> The Report is running fine except the Property page for the Rpeort shows
> the following error
> "Unable to generate a temporary class (result=1). error CS1514: { expected
> error CS1001: Identifier expected error CS1031: Type expected error
> CS1519:
> Invalid token '{' in class, struct, or interface member declaration error
> CS1514: { expected error CS1001: Identifier expected error CS1031: Type
> expected error CS1519: Invalid token '{' in class, struct, or interface
> member declaration "
> I am Using MS RS version 8.00.743.00, My Resporting server is Win 2000 and
> My Dev mc is Win XP.
> BTW just found a bug with this version of the MSRS as the name of the rdl
> file should not contain "Attachment" Key word else the Report can be
> deployed
> but cant be viewed.
> any Idea on above issue will be highly aprreciated.
> siaj
>
>|||No it happens to all the Reports I deploy......
any suggestions will be highly appreciated..
siaj...
"Lev Semenets [MSFT]" wrote:
> Does this happens to that particular report only?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "siaj" <siaj@.discussions.microsoft.com> wrote in message
> news:069A7DCF-3388-40B6-A2E0-51219071C613@.microsoft.com...
> > Hi ,
> > I just deployed a report on a report Server from my Dev m/c...
> >
> > The Report is running fine except the Property page for the Rpeort shows
> > the following error
> > "Unable to generate a temporary class (result=1). error CS1514: { expected
> > error CS1001: Identifier expected error CS1031: Type expected error
> > CS1519:
> > Invalid token '{' in class, struct, or interface member declaration error
> > CS1514: { expected error CS1001: Identifier expected error CS1031: Type
> > expected error CS1519: Invalid token '{' in class, struct, or interface
> > member declaration "
> >
> > I am Using MS RS version 8.00.743.00, My Resporting server is Win 2000 and
> > My Dev mc is Win XP.
> >
> > BTW just found a bug with this version of the MSRS as the name of the rdl
> > file should not contain "Attachment" Key word else the Report can be
> > deployed
> > but cant be viewed.
> >
> > any Idea on above issue will be highly aprreciated.
> >
> > siaj
> >
> >
> >
> >
>
>|||Please check this related posting:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=41317637-24ab-414b-a650-6d1bb7e55085&sloc=en-us
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"siaj" <siaj@.discussions.microsoft.com> wrote in message
news:38566414-72A9-4F5F-881D-290172AECBDC@.microsoft.com...
> No it happens to all the Reports I deploy......
> any suggestions will be highly appreciated..
> siaj...
>
> "Lev Semenets [MSFT]" wrote:
>> Does this happens to that particular report only?
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "siaj" <siaj@.discussions.microsoft.com> wrote in message
>> news:069A7DCF-3388-40B6-A2E0-51219071C613@.microsoft.com...
>> > Hi ,
>> > I just deployed a report on a report Server from my Dev m/c...
>> >
>> > The Report is running fine except the Property page for the Rpeort
>> > shows
>> > the following error
>> > "Unable to generate a temporary class (result=1). error CS1514: {
>> > expected
>> > error CS1001: Identifier expected error CS1031: Type expected error
>> > CS1519:
>> > Invalid token '{' in class, struct, or interface member declaration
>> > error
>> > CS1514: { expected error CS1001: Identifier expected error CS1031: Type
>> > expected error CS1519: Invalid token '{' in class, struct, or interface
>> > member declaration "
>> >
>> > I am Using MS RS version 8.00.743.00, My Resporting server is Win 2000
>> > and
>> > My Dev mc is Win XP.
>> >
>> > BTW just found a bug with this version of the MSRS as the name of the
>> > rdl
>> > file should not contain "Attachment" Key word else the Report can be
>> > deployed
>> > but cant be viewed.
>> >
>> > any Idea on above issue will be highly aprreciated.
>> >
>> > siaj
>> >
>> >
>> >
>> >
>>
Monday, March 26, 2012
Properties in many reports
one place and have all of the reports read from it. Properties like page
size, margins, font size, etc.
Is that possible?Create a standard template and copy it at ProjectItems\ReportProject search
for this directory default should be where your projects are stored. Once you
copy any one creating a report will select the template. So we can maintain a
standard.
Amarnath
"David" wrote:
> I have many reports in a project and I want to set some of the properties in
> one place and have all of the reports read from it. Properties like page
> size, margins, font size, etc.
> Is that possible?
>|||You can store these values in a table you reference via a dataset and then
use an expression to set the format values from the fields in the dataset.
Using parameters for the reportname and the user, you could allow users to
personalize individual reports.
"David" wrote:
> I have many reports in a project and I want to set some of the properties in
> one place and have all of the reports read from it. Properties like page
> size, margins, font size, etc.
> Is that possible?
>sql
Friday, March 23, 2012
Prompt page in SSRS
Hi,
I checked in SQL Server Reporting Services and it has the option to create only the reports. How do I create any prompt page from SSRS? Is it possible to do it? Thank You.
Regards,
Das.
What do you mean by prompt page ? Asking for some parameters before rendering the report ? That can be done by clicking in the background of the report and navigating through report parameters.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Tuesday, March 20, 2012
Prohibiting Auto Page Breaks while printing
please reply as soon as possibleWhat happens if you set the page top/bottom margin sizes to zero (in the File.Page Setup menu) and suppress the page headers/footers?|||thanx man i have checked it and i think it will work i shall implement it a day after tomorrow coz i don have printer here right now
thanx a lot bro
PROGRAMTICALLY ACCESS SQLDATASOURCE !
I am trying to acces an SQLDatasource in the code page, I have the following code but get the error as below, any one help please
The SQLDataSource returns 1 value named [ShippingRegion], I think that has somethjing to do with it ??!!
dsShippingRegion.Select(DataSourceSelectArguments.Empty)
If myReader.ReadThen
If Convert.IsDBNull(myReader("ShippingRegion"))Then
Beep()
Else
Beep()
EndIf
EndIf
System.InvalidCastException was unhandled by user code
Message="Unable to cast object of type 'System.Data.DataView' to type 'System.Data.IDataReader'."
Source="App_Web_rd5quiy1"
StackTrace:
at admin_administer_shop_productaddnew.Page_Load(Object sender, EventArgs e) in E:\Web Development\WebSites\AJAX_sirs2hers\admin\administer_shop\productaddnew.aspx.vb:line 25
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
dsShippingRegion.Select(DataSourceSelectArguments.Empty)
In the SqlDataSource markup, set DataSourceMode="DataReader". If the DataSourceMode is DataSet (or is not set, since DataSet is the default), a DataView object is returned from Select, which is what you're seeing. If the DataSourceMode is DataReader, an IDataReader object is returned. Seehttp://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.select.aspx for more details.
Hope that helps.
Aaron
|||Aaron
this is the code for adding a product, what and where would i place to retrieve the returned value from the SPROC, insert is marked at the bottom with HERE IS THE INSERT
Thanks for the help, changed datasourcemode as above
Steve
ProtectedSub Button1_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Button1.Click
If Trim(FCKeditor1.Value) =""Then
Dim AlertMSG ="Please enter product description"
ShrekGlobal.GlobalFunctions.CreateMessageAlert(Me, AlertMSG,"strKey1")ExitSub
EndIf
Dim UploadImageAsBoolean =True
dsProduct.InsertParameters.Clear()
Dim ShopIDAsNew ControlParameter("ShopID","hfShopID","Value")
dsProduct.InsertParameters.Add(ShopID)
Dim CategoryIDAsNew ControlParameter("CategoryID","ddlCategories","SelectedValue")dsProduct.InsertParameters.Add(CategoryID)
Dim ModelNumberAsNew ControlParameter("ModelNumber","txtModelNumber","Text")dsProduct.InsertParameters.Add(ModelNumber)
Dim ModelNameAsNew ControlParameter("ModelName","txtModelName","Text")dsProduct.InsertParameters.Add(ModelName)
Dim UnitCostAsNew ControlParameter("UnitCost","txtUnitCost","Text")dsProduct.InsertParameters.Add(UnitCost)
Dim StockAsNew ControlParameter("Stock","txtStock","Text")dsProduct.InsertParameters.Add(Stock)
Dim ProductDescriptionAsNew ControlParameter("ProductDescription","FCKeditor1","Value")dsProduct.InsertParameters.Add(ProductDescription)
Dim ImageFilenameAsString
If ddlMainImage.SelectedIndex = 0Then
ImageFilename =""
Else
ImageFilename =String.Format("{0}.jpg", ddlMainImage.SelectedValue)EndIf
dsProduct.InsertParameters.Add("ProductImage", ImageFilename)Dim ShippingIDUK1AsNew ControlParameter("ShippingID1","ddlUKShipping1","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDUK1)
Dim ShippingAmountUK1AsNew ControlParameter("ShippingAmount1","txtUKShipping1","Text")dsProduct.InsertParameters.Add(ShippingAmountUK1)
Dim ShippingIDUK2AsNew ControlParameter("ShippingID2","ddlUKShipping2","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDUK2)
Dim ShippingAmountUK2AsNew ControlParameter("ShippingAmount2","txtUKShipping2","Text")dsProduct.InsertParameters.Add(ShippingAmountUK2)
Dim ShippingIDUK3AsNew ControlParameter("ShippingID3","ddlUKShipping3","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDUK3)
Dim ShippingAmountUK3AsNew ControlParameter("ShippingAmount3","txtUKShipping3","Text")dsProduct.InsertParameters.Add(ShippingAmountUK3)
Dim ShippingIDUK4AsNew ControlParameter("ShippingID4","ddlUKShipping4","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDUK4)
Dim ShippingAmountUK4AsNew ControlParameter("ShippingAmount4","txtUKShipping4","Text")dsProduct.InsertParameters.Add(ShippingAmountUK4)
Dim ShippingIDUK5AsNew ControlParameter("ShippingID5","ddlUKShipping5","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDUK5)
Dim ShippingAmountUK5AsNew ControlParameter("ShippingAmount5","txtUKShipping5","Text")dsProduct.InsertParameters.Add(ShippingAmountUK5)
Dim ShippingIDInt1AsNew ControlParameter("ShippingID6","ddlIntShipping1","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDInt1)
Dim ShippingAmountInt1AsNew ControlParameter("ShippingAmount6","txtIntShipping1","Text")dsProduct.InsertParameters.Add(ShippingAmountInt1)
Dim ShippingIDInt2AsNew ControlParameter("ShippingID7","ddlIntShipping2","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDInt2)
Dim ShippingAmountInt2AsNew ControlParameter("ShippingAmount7","txtIntShipping2","Text")dsProduct.InsertParameters.Add(ShippingAmountInt2)
Dim ShippingIDInt3AsNew ControlParameter("ShippingID8","ddlIntShipping3","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDInt3)
Dim ShippingAmountInt3AsNew ControlParameter("ShippingAmount8","txtIntShipping3","Text")dsProduct.InsertParameters.Add(ShippingAmountInt3)
Dim ShippingIDInt4AsNew ControlParameter("ShippingID9","ddlIntShipping4","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDInt4)
Dim ShippingAmountInt4AsNew ControlParameter("ShippingAmount9","txtIntShipping4","Text")dsProduct.InsertParameters.Add(ShippingAmountInt4)
Dim ShippingIDInt5AsNew ControlParameter("ShippingID10","ddlIntShipping5","SelectedValue")dsProduct.InsertParameters.Add(ShippingIDInt5)
Dim ShippingAmountInt5AsNew ControlParameter("ShippingAmount10","txtIntShipping5","Text")dsProduct.InsertParameters.Add(ShippingAmountInt5)
'Dim ProductImage As New ControlParameter("ProductImage", "siProductImage", "NewFileName")
'dsProduct.InsertParameters.Add(ProductImage)
Try
dsProduct.Insert() HERE IS THE INSERT
Dim xAsInteger
For x = 1To 8
'Dim SaveDirectory As String = String.Format("{0}\", Server.MapPath(TemporarySaveDirectory), x)
MsgBox(ddlCategories.SelectedValue)
Dim ProductIDAsInteger = 1Dim SaveDirectoryAsString =String.Format("~\shopping_mall\images\shops\{0}\{1}\{2}\", Session("ShopID"), ddlCategories.SelectedValue, ProductID)
If ShrekGlobal.GlobalFunctions.FileMove(String.Format("{0}.jpg", x), Server.MapPath(TemporarySaveDirectory), Server.MapPath(SaveDirectory))Then
Beep()
Else
Beep()
EndIf
Next
'siProductImage.TemporarySaveDirectory = String.Format("~\shopping_mall\images\shops\{0}\{1}", hfShopID.Value, ddlCategories.SelectedValue)
'siProductImage.Upload()
ClearPage()
Catch exAs Exception'UploadImage = False
DeleteImage(0)
MsgBox(String.Format("{0} ~ {1}","Error", ex.Message.ToString()))'_lblInfo1.Text = sb.ToString
' Consider customizing the message for the EmailNotSentPanel in the ShowAds page.
'Beep()
'_lblInfo1.Text = Now + " :: " + sb.ToString
EndTry
'If UploadImage Then
'Dim TemporarySaveDirectory As String
'aveDirectory ='End If
EndSub
|||Try this article:http://aspnet.4guysfromrolla.com/articles/050207-1.aspx
Hope that helps.
Aaron
Monday, March 12, 2012
Programming report viewer at run time
that works. It has an image control in the upper left hand of the page
header. I would like to be able to change that graphic depending on a sql
table setting as the web form loads,
Does anyone know of a good detailed example of how to do this?
I have tried this and it does NOT work:
Dim myImage1 As New Image
myImage1 = Me.ReportViewer1.FindControl("Image1")
myImage1.ImageUrl = "Images/small_info_logo.jpg"
Thanks
ChuckOn Apr 20, 9:58 pm, ChuckT <Chu...@.discussions.microsoft.com> wrote:
> I have a report that works. It has been added to a webform (dot net 2.0)
> that works. It has an image control in the upper left hand of the page
> header. I would like to be able to change that graphic depending on a sql
> table setting as the web form loads,
> Does anyone know of a good detailed example of how to do this?
> I have tried this and it does NOT work:
> Dim myImage1 As New Image
> myImage1 = Me.ReportViewer1.FindControl("Image1")
> myImage1.ImageUrl = "Images/small_info_logo.jpg"
> Thanks
> Chuck
Instead of setting the ImageUrl in the web form, set it in the report
itself. You should be able to provide an Expression value for the
ImageUrl in the report builder - just point it to a dataset (possibly
using the Iif() function if the url is not stored in the database
records).
- Tokes|||Great idea, thank you very much. Plus it is a simplier implementation
Chuck
"Tokes" wrote:
> On Apr 20, 9:58 pm, ChuckT <Chu...@.discussions.microsoft.com> wrote:
> > I have a report that works. It has been added to a webform (dot net 2.0)
> > that works. It has an image control in the upper left hand of the page
> > header. I would like to be able to change that graphic depending on a sql
> > table setting as the web form loads,
> >
> > Does anyone know of a good detailed example of how to do this?
> >
> > I have tried this and it does NOT work:
> > Dim myImage1 As New Image
> > myImage1 = Me.ReportViewer1.FindControl("Image1")
> > myImage1.ImageUrl = "Images/small_info_logo.jpg"
> >
> > Thanks
> >
> > Chuck
> Instead of setting the ImageUrl in the web form, set it in the report
> itself. You should be able to provide an Expression value for the
> ImageUrl in the report builder - just point it to a dataset (possibly
> using the Iif() function if the url is not stored in the database
> records).
> - Tokes
>|||Actually that will not work. If you use any external pointer the designer
imports the garphic at design time. I am hoping to get a run time interrface
that loads the graphic based on a table value.
"ChuckT" wrote:
> Great idea, thank you very much. Plus it is a simplier implementation
> Chuck
> "Tokes" wrote:
> > On Apr 20, 9:58 pm, ChuckT <Chu...@.discussions.microsoft.com> wrote:
> > > I have a report that works. It has been added to a webform (dot net 2.0)
> > > that works. It has an image control in the upper left hand of the page
> > > header. I would like to be able to change that graphic depending on a sql
> > > table setting as the web form loads,
> > >
> > > Does anyone know of a good detailed example of how to do this?
> > >
> > > I have tried this and it does NOT work:
> > > Dim myImage1 As New Image
> > > myImage1 = Me.ReportViewer1.FindControl("Image1")
> > > myImage1.ImageUrl = "Images/small_info_logo.jpg"
> > >
> > > Thanks
> > >
> > > Chuck
> >
> > Instead of setting the ImageUrl in the web form, set it in the report
> > itself. You should be able to provide an Expression value for the
> > ImageUrl in the report builder - just point it to a dataset (possibly
> > using the Iif() function if the url is not stored in the database
> > records).
> >
> > - Tokes
> >
> >|||On Apr 21, 11:12 am, ChuckT <Chu...@.discussions.microsoft.com> wrote:
> Actually that will not work. If you use any external pointer the designer
> imports the garphic at design time. I am hoping to get a run time interrface
> that loads the graphic based on a table value.
That shouldn't be the case if you're setting the Url to an
expression... also check that the image control is not set to
'embedded'?
- Tokes
> "ChuckT" wrote:
> > Great idea, thank you very much. Plus it is a simplier implementation
> > Chuck
> > "Tokes" wrote:
> > > On Apr 20, 9:58 pm, ChuckT <Chu...@.discussions.microsoft.com> wrote:
> > > > I have a report that works. It has been added to a webform (dot net 2.0)
> > > > that works. It has an image control in the upper left hand of the page
> > > > header. I would like to be able to change that graphic depending on a sql
> > > > table setting as the web form loads,
> > > > Does anyone know of a good detailed example of how to do this?
> > > > I have tried this and it does NOT work:
> > > > Dim myImage1 As New Image
> > > > myImage1 = Me.ReportViewer1.FindControl("Image1")
> > > > myImage1.ImageUrl = "Images/small_info_logo.jpg"
> > > > Thanks
> > > > Chuck
> > > Instead of setting the ImageUrl in the web form, set it in the report
> > > itself. You should be able to provide an Expression value for the
> > > ImageUrl in the report builder - just point it to a dataset (possibly
> > > using the Iif() function if the url is not stored in the database
> > > records).
> > > - Tokes
Programmatically Specify SqlDataSource Parameters
I have a GridView bound to a SqlDataSource. On page load I would like to programmatically specify a SelectParameter value based on the role of the user. This SelectParameter will be used in my WHERE clause. The closest post I can find ishttp://forums.asp.net/thread/1233258.aspx but no answer was posted.
What code would I use to modify a SelectParameters value? Is it possible to reference a parameter by name (SqlDataSource1.SelectParameters["usertype"]) or does it have to be by index? (SqlDataSource1.SelectParameters[0])
Alternatively, perhaps I'm going about this in the wrong way, is there a better way to have dynamic GridView content based on the role of the user?
Thank you very much for your help.
Yes, you can set the value of a select parameters by name, for exampleSqlDataSource1.SelectParameters["usertype"].DefaultValue ="role"|||
Both parameter name and index are working here.
protected
void Page_Load(object sender,EventArgs e){
SqlDataSource1.SelectParameters[0].DefaultValue=
"yourvalue";or
SqlDataSource1.SelectParameters["usertype"].DefaultValue="yourvalue";
}
|||You can also set the value in the SqlDataSource_Selecting event via the e parameter:
Private Sub SqlDataSource1_Selecting(stuff)
e.command.paramter("param1").value=something
end sub
Programmatically Saving As PDF?
Ok. So I have this ASP.NET page and I've programmatically taken a report from the report server and rendered it in PDF. Now I would like to take this a step further and save the report as a pdf document on the local machine.
So at this point I have a byte array representing the document, now how would I save this as a pdf on the local machine? I'm unaware of an ASP Response method to allow this and I'm unaware of a SSRS ReportingService method, but as I said I'm unaware...
Any ideas, thoughts, resources are all welcome.
Well, the answer was actually quite easy to implement as the code below shows...
using (FileStream stream = File.OpenWrite(resultByte))
{
stream.Write(resultByte, 0, resultByte.length);
}
For those that may be interested in the full implementation then check out this article at http://www.codeproject.com/sqlrs/PDFUsingSQLRepServices.asp?df=100.
Friday, March 9, 2012
Programmatically hiding chart on the report page.
dataset.
I tied to assign an expression to Visible.Hidden property of the chart like
that "=First(Fields.Visible.value)" WHERE I assigned 0 or 1 to the 'Visible'
column of my dataset. It did not work. Is there a way to do that?
Thank you,The result of the Visibility.Hidden expression has to be a boolean value and
not an integer value.
Try this instead:
=(0 = First(Fields.Visible.value))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Simon Gold" <SimonGold@.discussions.microsoft.com> wrote in message
news:A7C5B8B9-5D26-43EE-B82B-0EAF7418AA7F@.microsoft.com...
>I need to show or hide a chart on my my report based on the result of the
> dataset.
> I tied to assign an expression to Visible.Hidden property of the chart
> like
> that "=First(Fields.Visible.value)" WHERE I assigned 0 or 1 to the
> 'Visible'
> column of my dataset. It did not work. Is there a way to do that?
> Thank you,
>
Wednesday, March 7, 2012
Programmatically Alter a Report on Report Server
I am looking at altering a report on report server programmatically from a
web page.
Is this possible, has someone done this?
Thanks
PonnuIf your ASP/Perl program can handle RDL file with XML format. Technically,
You can do it.
Ponnu wrote:
>Hi,
>I am looking at altering a report on report server programmatically from a
>web page.
>Is this possible, has someone done this?
>Thanks
>Ponnu
--
I am a frog enjoying the sunshine on waikiki beach. Do you want to join me?!
Message posted via http://www.sqlmonster.com|||Hi WaikikiFrog,
I am using ASP.Net,
how could I read a report present in Report Server?
and once read, I could modify it, then how to put it back onto the Report
Server?
I would greatly appreciate your suggestions\guidance on this
Thanks
Ponnu
"WaikikiFrog via SQLMonster.com" <u19654@.uwe> wrote in message
news:6c79610a3e0cd@.uwe...
> If your ASP/Perl program can handle RDL file with XML format. Technically,
> You can do it.
>
> Ponnu wrote:
>>Hi,
>>I am looking at altering a report on report server programmatically from a
>>web page.
>>Is this possible, has someone done this?
>>Thanks
>>Ponnu
> --
> I am a frog enjoying the sunshine on waikiki beach. Do you want to join
> me?!
> Message posted via http://www.sqlmonster.com
>|||This is a very bad idea. Although technically possible you cannot do what
you want with the server based product for all practical purposes. The RDL
is shared by everyone running the report. If you read the report in (which
should be possible using the web services api) you then deploy it. That rdl
is used for everyone. Understanding and modifying the rdl is non-trivial
(the specificiation can be found here:
http://www.microsoft.com/sql/technologies/reporting/rdlspec.mspx)
You will have performance problems and (as I noted above) anyone else
running the report will get the new report.
But, if you absolutely have to, instead you should get the new reportviewer
controls that ship with VS 2005. There is an asp.net 2.0 control and a
winform control. You can use this in local mode. In local mode no server is
used. You give the control the report and the data and it renders it. Again,
it is non-trivial if you have any sort of complex report.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ponnu" <someone@.somewhere.com> wrote in message
news:ugJhRPzOHHA.324@.TK2MSFTNGP06.phx.gbl...
> Hi WaikikiFrog,
> I am using ASP.Net,
> how could I read a report present in Report Server?
> and once read, I could modify it, then how to put it back onto the Report
> Server?
> I would greatly appreciate your suggestions\guidance on this
> Thanks
> Ponnu
> "WaikikiFrog via SQLMonster.com" <u19654@.uwe> wrote in message
> news:6c79610a3e0cd@.uwe...
>> If your ASP/Perl program can handle RDL file with XML format.
>> Technically,
>> You can do it.
>>
>> Ponnu wrote:
>>Hi,
>>I am looking at altering a report on report server programmatically from
>>a
>>web page.
>>Is this possible, has someone done this?
>>Thanks
>>Ponnu
>> --
>> I am a frog enjoying the sunshine on waikiki beach. Do you want to join
>> me?!
>> Message posted via http://www.sqlmonster.com
>|||Hi Bruce,
Thanks for the suggestion.
This is what I am trying to do, you might be able to help me out
I already have some reports designed using Report Designer(SSRS 2005) and
deployed to report server. I need to provide options for the end users to
change the order of columns in the report using a ASP.Net web page. So I
thought I will use a report viewer control to preivew the report in web page
and a grid(showing the list of columns) using which you could change the
order of columns. I then should be able to make this change in the report in
the report server.
I can't use Report Builder because Report Builder will not open\render the
reports designed in Report Designer even though the reverse is possible. For
more details please refer to this link
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=595894&SiteID=1
So all I need is to be able to read a report from report server and make the
changes in the order of columns and deploy it back to report server.
I would greatly appreciate your help in this.
Thanks
Ponnu
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:OCE6mTzOHHA.4372@.TK2MSFTNGP04.phx.gbl...
> This is a very bad idea. Although technically possible you cannot do what
> you want with the server based product for all practical purposes. The RDL
> is shared by everyone running the report. If you read the report in (which
> should be possible using the web services api) you then deploy it. That
> rdl is used for everyone. Understanding and modifying the rdl is
> non-trivial (the specificiation can be found here:
> http://www.microsoft.com/sql/technologies/reporting/rdlspec.mspx)
> You will have performance problems and (as I noted above) anyone else
> running the report will get the new report.
> But, if you absolutely have to, instead you should get the new
> reportviewer controls that ship with VS 2005. There is an asp.net 2.0
> control and a winform control. You can use this in local mode. In local
> mode no server is used. You give the control the report and the data and
> it renders it. Again, it is non-trivial if you have any sort of complex
> report.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ponnu" <someone@.somewhere.com> wrote in message
> news:ugJhRPzOHHA.324@.TK2MSFTNGP06.phx.gbl...
>> Hi WaikikiFrog,
>> I am using ASP.Net,
>> how could I read a report present in Report Server?
>> and once read, I could modify it, then how to put it back onto the Report
>> Server?
>> I would greatly appreciate your suggestions\guidance on this
>> Thanks
>> Ponnu
>> "WaikikiFrog via SQLMonster.com" <u19654@.uwe> wrote in message
>> news:6c79610a3e0cd@.uwe...
>> If your ASP/Perl program can handle RDL file with XML format.
>> Technically,
>> You can do it.
>>
>> Ponnu wrote:
>>Hi,
>>I am looking at altering a report on report server programmatically from
>>a
>>web page.
>>Is this possible, has someone done this?
>>Thanks
>>Ponnu
>> --
>> I am a frog enjoying the sunshine on waikiki beach. Do you want to join
>> me?!
>> Message posted via http://www.sqlmonster.com
>>
>|||Read up on web services. Report Manager itself uses web services with Report
Server.
The effort to do this is large. You would be better off to have the users
export it to Excel if they want a different order of the columns.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ponnu" <someone@.somewhere.com> wrote in message
news:udQrnX0OHHA.3872@.TK2MSFTNGP06.phx.gbl...
> Hi Bruce,
> Thanks for the suggestion.
> This is what I am trying to do, you might be able to help me out
> I already have some reports designed using Report Designer(SSRS 2005) and
> deployed to report server. I need to provide options for the end users to
> change the order of columns in the report using a ASP.Net web page. So I
> thought I will use a report viewer control to preivew the report in web
> page and a grid(showing the list of columns) using which you could change
> the order of columns. I then should be able to make this change in the
> report in the report server.
> I can't use Report Builder because Report Builder will not open\render the
> reports designed in Report Designer even though the reverse is possible.
> For more details please refer to this link
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=595894&SiteID=1
> So all I need is to be able to read a report from report server and make
> the changes in the order of columns and deploy it back to report server.
> I would greatly appreciate your help in this.
> Thanks
> Ponnu
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:OCE6mTzOHHA.4372@.TK2MSFTNGP04.phx.gbl...
>> This is a very bad idea. Although technically possible you cannot do what
>> you want with the server based product for all practical purposes. The
>> RDL is shared by everyone running the report. If you read the report in
>> (which should be possible using the web services api) you then deploy it.
>> That rdl is used for everyone. Understanding and modifying the rdl is
>> non-trivial (the specificiation can be found here:
>> http://www.microsoft.com/sql/technologies/reporting/rdlspec.mspx)
>> You will have performance problems and (as I noted above) anyone else
>> running the report will get the new report.
>> But, if you absolutely have to, instead you should get the new
>> reportviewer controls that ship with VS 2005. There is an asp.net 2.0
>> control and a winform control. You can use this in local mode. In local
>> mode no server is used. You give the control the report and the data and
>> it renders it. Again, it is non-trivial if you have any sort of complex
>> report.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ponnu" <someone@.somewhere.com> wrote in message
>> news:ugJhRPzOHHA.324@.TK2MSFTNGP06.phx.gbl...
>> Hi WaikikiFrog,
>> I am using ASP.Net,
>> how could I read a report present in Report Server?
>> and once read, I could modify it, then how to put it back onto the
>> Report Server?
>> I would greatly appreciate your suggestions\guidance on this
>> Thanks
>> Ponnu
>> "WaikikiFrog via SQLMonster.com" <u19654@.uwe> wrote in message
>> news:6c79610a3e0cd@.uwe...
>> If your ASP/Perl program can handle RDL file with XML format.
>> Technically,
>> You can do it.
>>
>> Ponnu wrote:
>>Hi,
>>I am looking at altering a report on report server programmatically
>>from a
>>web page.
>>Is this possible, has someone done this?
>>Thanks
>>Ponnu
>> --
>> I am a frog enjoying the sunshine on waikiki beach. Do you want to join
>> me?!
>> Message posted via http://www.sqlmonster.com
>>
>>
>|||Hi Bruce,
Can't go for excel option because, in our application the users in admin
role will make the changes so that the others users could download in
whatever format they want(preferably PDF)
If there is any link\resource relating to reading a report from Report
Server using a webservice and deploying it back again, please let me know.
In the meanwhile I will investigate how this Report Manager actually
downloads and uploads reports to Report Server.
Thanks
Ponnu
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:O55xfC2OHHA.4244@.TK2MSFTNGP04.phx.gbl...
> Read up on web services. Report Manager itself uses web services with
> Report Server.
> The effort to do this is large. You would be better off to have the users
> export it to Excel if they want a different order of the columns.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ponnu" <someone@.somewhere.com> wrote in message
> news:udQrnX0OHHA.3872@.TK2MSFTNGP06.phx.gbl...
>> Hi Bruce,
>> Thanks for the suggestion.
>> This is what I am trying to do, you might be able to help me out
>> I already have some reports designed using Report Designer(SSRS 2005) and
>> deployed to report server. I need to provide options for the end users to
>> change the order of columns in the report using a ASP.Net web page. So I
>> thought I will use a report viewer control to preivew the report in web
>> page and a grid(showing the list of columns) using which you could change
>> the order of columns. I then should be able to make this change in the
>> report in the report server.
>> I can't use Report Builder because Report Builder will not open\render
>> the reports designed in Report Designer even though the reverse is
>> possible. For more details please refer to this link
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=595894&SiteID=1
>> So all I need is to be able to read a report from report server and make
>> the changes in the order of columns and deploy it back to report server.
>> I would greatly appreciate your help in this.
>> Thanks
>> Ponnu
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:OCE6mTzOHHA.4372@.TK2MSFTNGP04.phx.gbl...
>> This is a very bad idea. Although technically possible you cannot do
>> what you want with the server based product for all practical purposes.
>> The RDL is shared by everyone running the report. If you read the report
>> in (which should be possible using the web services api) you then deploy
>> it. That rdl is used for everyone. Understanding and modifying the rdl
>> is non-trivial (the specificiation can be found here:
>> http://www.microsoft.com/sql/technologies/reporting/rdlspec.mspx)
>> You will have performance problems and (as I noted above) anyone else
>> running the report will get the new report.
>> But, if you absolutely have to, instead you should get the new
>> reportviewer controls that ship with VS 2005. There is an asp.net 2.0
>> control and a winform control. You can use this in local mode. In local
>> mode no server is used. You give the control the report and the data and
>> it renders it. Again, it is non-trivial if you have any sort of complex
>> report.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ponnu" <someone@.somewhere.com> wrote in message
>> news:ugJhRPzOHHA.324@.TK2MSFTNGP06.phx.gbl...
>> Hi WaikikiFrog,
>> I am using ASP.Net,
>> how could I read a report present in Report Server?
>> and once read, I could modify it, then how to put it back onto the
>> Report Server?
>> I would greatly appreciate your suggestions\guidance on this
>> Thanks
>> Ponnu
>> "WaikikiFrog via SQLMonster.com" <u19654@.uwe> wrote in message
>> news:6c79610a3e0cd@.uwe...
>> If your ASP/Perl program can handle RDL file with XML format.
>> Technically,
>> You can do it.
>>
>> Ponnu wrote:
>>Hi,
>>I am looking at altering a report on report server programmatically
>>from a
>>web page.
>>Is this possible, has someone done this?
>>Thanks
>>Ponnu
>> --
>> I am a frog enjoying the sunshine on waikiki beach. Do you want to
>> join me?!
>> Message posted via http://www.sqlmonster.com
>>
>>
>>
>
Saturday, February 25, 2012
Programmatic insert into SQL database
I have a page with over 20 Textbox and DDL controls and an upload in various Divs and Panels (Ajax enabled) that are used for gathering user data. Some of the fields are mandatory and some optional.
In the Code behind (VB- I am a complete novice) On the submit button click event, I iterate through the controls in the page and build an array with information from the controls that have data in them, (filtering out the non-filled textboxes, and DDLs).
All this works well, and I get an array called 'myInfo' with the columns with the control ID, and control values 'rvalue' (as string), with the number of rows equal to the filled textboxes and DDLs.
I then step through the array and build a string with 'name=values' of all the rows in the myinfo array and email this as a message:
ThisMessage = ""
NoOfControls = myInfo.GetLength(0)
For i = 0 To NoOfControls - 1
ThisMessage = ThisMessage & myInfo(i).ID.ToString & "=" & myInfo(i).rvalue.ToString & "; "
Next
SendMail(email address, ThisMessage)
I also want to add this information to a database, appended by the IP address and datetime.now.
Dim evdoDataSource As New SqlDataSource()
evdoDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("SQLConnectionStringCK").ToString
evdoDataSource.InsertCommandType = SqlDataSourceCommandType.Text
Dim InsertMessage As String = """INSERT INTO evdoData ("
NoOfControls = myInfo.GetLength(0)
Dim k As Integer
For k = 0 To NoOfControls - 1
InsertMessage = InsertMessage & myInfo(k).ID.ToString & ", "
Next
InsertMessage = InsertMessage & "IPNo, DateEntered) VALUES ("
For k = 0 To NoOfControls - 1
InsertMessage = InsertMessage & "@." & myInfo(k).ID.ToString & ", "
Next
InsertMessage = InsertMessage & ", @.IPNo, @.DateEntered" & ")"""
evdoDataSource.InsertCommand = InsertMessage
I then similarly iterate through and do the insertparameters.
Now here is the rub- (My all too often DUH moment!)
When I look at the insertmessage in debug (and to be sure- I also show the insert string on a temporary debug label on the page), The insertmessage looks fine:
"INSERT INTO EvdData (FirstName, Age, Email, Phone, Country, City, IPNo, DateEntered) VALUES (@.FirstName, @.Age, @.Email, @.Phone, @.Country, @.City, , @.IPNo, @.DateEntered)"
However when the above code(evdoDataSource.InsertCommand = InsertMessage) is run, I get an error - the message with the error is:
The identifier that starts with 'INSERT INTO ModelData (FirstName, Age, Email, Phone, Country, City, IPNo, DateEntered) VALUES (@.FirsteName, @.Age, @.Email, @.Phone,' is too long. Maximum length is 128
EH? When I actually copy the InsertMessage from the debug window and paste it manually after the command "evdoDataSource.InsertCommand = " It works, and I get the data inserted into the table..
-It would seem that I am probably missing something obvious in my complete "noviceness" . HELP! (oh and thanks a bunch in anticipation)
_____________________________________________________________________________________________________________________
Its Easy --------When you know How. Meanwhile Aaaaaaaaah .
Remove the double-quotes around the insert statement.
Dim InsertMessageAs String ="INSERT INTO evdoData (" NoOfControls = myInfo.GetLength(0)Dim kAs Integer For k = 0To NoOfControls - 1 InsertMessage = InsertMessage & myInfo(k).ID.ToString &", "Next InsertMessage = InsertMessage &"IPNo, DateEntered) VALUES ("For k = 0To NoOfControls - 1 InsertMessage = InsertMessage &"@." & myInfo(k).ID.ToString &", "Next InsertMessage = InsertMessage &", @.IPNo, @.DateEntered)" |||
In the post the you have an extra comma in your insert statement after @.City and before @.IPNo
INSERT INTO EvdData (FirstName, Age, Email, Phone,Country, City, IPNo, DateEntered) VALUES (@.FirstName, @.Age, @.Email,@.Phone, @.Country, @.City, , @.IPNo, @.DateEntered)
You may want to change
InsertMessage = InsertMessage & ", @.IPNo, @.DateEntered" & ")"""
to
InsertMessage = InsertMessage & "@.IPNo, @.DateEntered" & ")"""
First, don't use " (double quotes) in your query, instead use ' (single quote) if and when needed. If at all you have to use double quotes then prefer setting QUOTED_IDENTIFIER OFF for the connection object. This sounds bit tricky, right?
kj@.zqtech.com:
"INSERT INTO EvdData (FirstName, Age, Email, Phone, Country, City, IPNo, DateEntered) VALUES (@.FirstName, @.Age, @.Email, @.Phone, @.Country, @.City, , @.IPNo, @.DateEntered)"
Second, did you notice that there are 2 , (comma) between @.city and @.IPNO or this is just by mistake when you were pasting your code in the post ?
Hope this will help.
|||Thanks Guys. It was the combination of both things. No quotations required and also the extra comma. (Silly look on my face at this point).
Moral of the story:
1. Coding problems are like magician's tricks: one problem is a slight of hand to take your attention away from another. 2. Beware of taking error messages too literally. -
Programing: RENDER METHOD and PAGE COUNTS for HTML Rendering
successfully render reports in image and PDF formats. I am having a problem
with HTML rendering. we understand how to (and are able to) render HTML
reports as a single "section" (i.e. page) or to generate all sections in a
single call. I am not sure how to ask the RS web service to tell me the
total number of "sections" (pages) in an HTML rendered report. Can anyone
help with this? we know it must be straight forward but have not found how.
thanks.
dlrThere is no direct way of determining number of pages
returned by the render method.
But when you call the render method you can see that the
method returns streamIds.
Your first page comes as as the byte array and the
remaining pages have streamIds associated.
So the number of pages is basically : StreamIds.Length+1
>--Original Message--
>We understand how to use the Render method of the RS web
service. And can
>successfully render reports in image and PDF formats. I
am having a problem
>with HTML rendering. we understand how to (and are able
to) render HTML
>reports as a single "section" (i.e. page) or to generate
all sections in a
>single call. I am not sure how to ask the RS web service
to tell me the
>total number of "sections" (pages) in an HTML rendered
report. Can anyone
>help with this? we know it must be straight forward but
have not found how.
>thanks.
>dlr
>
>.
>|||beg to differ. When I render using and IMAGE format I get StreamIDs (and
thus a page count as StreamIDs + 1) but when I render using an HTML format
StreamIDs are always null!
(I have no image links in the report).
what saz's you now?
thanks.
dlr
"Ravi" <ravikantkv@.rediffmail.com> wrote in message
news:84c401c495d0$4572bca0$a301280a@.phx.gbl...
> There is no direct way of determining number of pages
> returned by the render method.
> But when you call the render method you can see that the
> method returns streamIds.
> Your first page comes as as the byte array and the
> remaining pages have streamIds associated.
> So the number of pages is basically : StreamIds.Length+1
> >--Original Message--
> >We understand how to use the Render method of the RS web
> service. And can
> >successfully render reports in image and PDF formats. I
> am having a problem
> >with HTML rendering. we understand how to (and are able
> to) render HTML
> >reports as a single "section" (i.e. page) or to generate
> all sections in a
> >single call. I am not sure how to ask the RS web service
> to tell me the
> >total number of "sections" (pages) in an HTML rendered
> report. Can anyone
> >help with this? we know it must be straight forward but
> have not found how.
> >
> >thanks.
> >
> >dlr
> >
> >
> >.
> >
programatically get values from sqldatasource
Hi All,
I am having problems getting values out of an sqldatasource.
I have 2 on the page, i am using one to insert into a table and the other to get a couple of values from another table for the insert.
the datasource i am trying to get the values from does a select with a querystring filter i need to grab a couple of fields out of it trhen do the insert on the other datasiource with a button click.
The insert is fine, i just don't know how to get the values out of the first 'select source'
Any pointers or suggestions most appreciated.
Cheers
I have figured this out.
I am doing the whole lot in the page load event handler and assigning the values to sessions then inserting the sesion variables in the iteminserting event handler for the formview
ProtectedSub Page_Load(ByVal senderAsObject,ByVal eAs System.EventArgs)HandlesMe.LoadDim dvAs DataView = _
CType(get_LocData.Select(DataSourceSelectArguments.Empty), DataView)ForEach drAs DataRowIn dv.Table.Rows
Session("LocMan") = dr("LocManID").ToString()Session("LocID") = dr("ID").ToString()
Session("Status") ="New"
Next
EndSub
ProtectedSub FormView1_ItemInserting(ByVal SenderAsObject,ByVal eAs FormViewInsertEventArgs)Handles FormView1.ItemInsertinge.Values("LocMan") = (Session("LocMan"))
e.Values("Status") ="new"
e.Values("LocationID") = (Session("LocID"))EndSub
|||
Don't use an SqlDataSource for that.
using (SqlConnection conn = new SqlConnection("your connectionstring"))
{
SqlCommand cmd = new SqlCommand("SELECT ... FROM ... WHERE someColumn = @.someParameter", conn);
cmd.Parameters.AddWithValue("@.someParameter", Request.QueryString["yaddayadda"]);
conn.Open();
using (SqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
{
col1=reader["col1"]; //Here you need to cast the value to the proper type, or use e.g reader.GetString(0) if it's a string
col2=reader["col2"];
}
}
}
But if you're selecting values just to insert them, you should be able to do it without retrieving the values in the first place. Please give us more details.
Monday, February 20, 2012
Programatically deploying reports
Hi All,
I want to programatically deploy the report in VS2005 environment,ie.from an asp.net page if i click deploy report Button ,the report should be deployed into the report server automatically.So that i can view the report in report server.
the input to the asp page would be the.rdl file...
If anyone could help then it would be good.
thankyou.
See the sample here:
http://www.codeproject.com/sqlrs/SQLReportDeploy.asp
Jens K. Suessmeyer
http://www.sqlserver2005.de
|||Jens,
Thanks for the link! I posted a similar question twice in the past couple of weeks without a response and now I have one!
|||I was tired watching the Reporting Services groups, but now I am planning to visit it more regulary. :-)Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||
Another way of doing this can be found out at
http://sqlblog.com/blogs/rhundhausen/archive/2006/12/26/deploy-rdl-files-to-multiple-sql-server-2005-reporting-services-servers.aspx
check it out this really works.