Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Saturday, March 24, 2012

PLEASE HELP ! URGENT ! repeater errors !

I now get the following error with my repeater...
short desc. of problem. I want to display hyperlinks with a repeater,
but add "link not available" and disable the hyperlink if the field in
DB is null.

as it is now i get:

"Compilation Error"
"Compiler Error Message: BC30201: Expression expected"

in the compiler output i get "error BC30545: Property access must
assign to the property or use its value."

at the line: Container.DataItem("SubjectName") & ": link not
available",
and i also get "error BC30205: End of statement expected" at the same
line...

can anyone see what i'm doing wrong ?

everything was working fine until i tried to add the conditional
statements (iif...)

this is my code in the itemtemplate of the repeater (except the html
tables etc)

<asp:HyperLink NavigateUrl='<%# "http://" &
Container.DataItem("Dep_WebsiteURL") %>'text='<%#
iif(Container.DataItem("Dep_WebsiteURL") is dbnull.value,
Container.DataItem("SubjectName") & ": link not available",
Container.DataItem("SubjectName")) %>'enabled='<%#
iif(Container.DataItem("Dep_WebsiteURL") is dbnull.value, false,
true)%>'Runat="server" Target="_blank" ID="Hyperlink1" /
thanks a lot...I'm kind of in a hurry here...

FredrikFredrik why don't you try doing it in your CodeBehind ?

*** Sent via Developersdex http://www.developersdex.com ***
Howdy everyone !!!
Please disregard this message ! I have solved the problem !
Thanks alot, especially "london calling" who provided me with a better
solution !!

Thanks

PLEASE HELP = odd TextChanged behavior

I have 2 TextBox controls on a webform. Both perform a procedure when the
TextChanged event is fired. The page should reload and display a new value
in another textbox. Both are WebControls.

The first Textbox performs the appropriate action.

The SECOND does not fire TextChanged until AFTER I click the Submit button.
It does not fire when I change the text and lose the control focus. Both
code blocks for the event handlers are IDENTICAL.

Anyone know why?Just to make sure:

have you set the autopostback flag to true?

Seb.
Just to make sure:

have you set the autopostback flag to true?

Seb.
heh... *sheepish grin*

"Seb" <anonymous@.discussions.microsoft.com> wrote in message
news:073501c39869$48c82490$a501280a@.phx.gbl...
> Just to make sure:
> have you set the autopostback flag to true?
> Seb.
heh... *sheepish grin*

"Seb" <anonymous@.discussions.microsoft.com> wrote in message
news:073501c39869$48c82490$a501280a@.phx.gbl...
> Just to make sure:
> have you set the autopostback flag to true?
> Seb.

Friday, March 16, 2012

please help me to solve my provblem..its very urgent

i have a button in my webform. whenever i click that button it should display the crystal report designer window so that the end user can design his own report...
i don't know how to display crystal report designer window at runtime in asp.net.please help me...

please please help me...its very very urgent

Hello Niranjana,

A CrystalReportViewer needs a CrystalReportSource in order to function. So, in the scenario you outlined above, you'd need to dynamically add both to the page. In VB.NET, this would look something like the following:

 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim crs As New CrystalDecisions.Web.CrystalReportSource crs.ID = "CrystalReportSource1" crs.Report.FileName = "CrystalReport1.rpt" form1.Controls.Add(crs) Dim crv As New CrystalDecisions.Web.CrystalReportViewer crv.Height = New Unit("200px") crv.Width = New Unit("200px") crv.AutoDataBind = True crv.ReportSourceID = "CrystalReportSource1" form1.Controls.Add(crv) End Sub

HTH,
Clay


sir,

thank you so much for ur information.

but my problem is different. I need to design the crystal report at runtime... ie one end user be able to design his crystal report.. ie adding fields ,formatting crystal reports all those things...

if u have any idea please help me sir

thanks & regards

nisha


Hi nish,

I dont whether its possible to enable the users to design his own reports... But try the below logic...

1. You need to list all of the fileds available in the reports...

2. Create the query which fetches the data from the table for the fields selected by the user and empty for unselected fileds. (initially you need to design the reports with all the fields)

3. suppress the fields in crystal reports if the field value is empty.

I hope the above will help you...


that i can do sir,i have already listed all the fields of a table in a listbox and use that to create crystal report...

my problem is really different...the end user should able to design his own crystal reports.

at runtime the designer should come. can we use any Report Designer Component(RDC) in asp.net...i am not getting an exact idea from net also. if u can please help me sir...


Hi nish,

Sorry I dont know whether its possible or not... I think its not available in Crystal reports... but may be in some other third party report tools...


anyway..thank you sir..

Please Help Select Statement Issue

I am trying to use a datagrid to display the data when the user enters a number into a textbox.

Below is my code:

Dim theVal As Integer = cInt(major.text , Integer)

' major is the name of the textbox

SELECT * FROM glmaster WHERE glmaster.major = theVal

When I put a number ie. 1000 where theVal is in the select statement, the datagrid displays the correct data. But as soon as I put a variable there I get an error.

Try "SELECT * FROM glmaster WHERE glmaster.major =" + theVal.ToString