|
Have you specified an xPath to tell your datagrid which nodes to display from the XML doc? By default, datagrids show tag values and not the text within them.
Nila Fridley
|
|
|
|
|
Hi Nila,
Thanks for your help.But I am new in this xml field.If you can explain with a small example it will be a great help to me.
You know the xml file structure of my file.let say, i want to read first two value. can you pz explain using xpath?
Thanks
|
|
|
|
|
Hi Robin,
Sorry for getting back to you so late... if you are trying to capture EVEN_ID and EVENT_STATUS then you need xPath that reads something like this:
/ROW[position()<3]
However, if you want to capture CUST_ID and TBGID then your xPath should be as follows:
/ROW/CITY[position()<3]
xPath is pretty simple; it is the query language of XML, and there are may articles and tutorials available over the Internet in that subject. Just go to google.com and make a search for "xPath tutorial", you'll get a million hits! One site that I like the best is: http://www.w3.org/TR/xpath[^]
Hope that helped you
Nila
|
|
|
|
|
While using the Crystal Report SDK and Business Objects Enterprise XI R2 on a web site that is not hosted on the same machine as the Business Objects server all attempts to retrieve a report from any binding senario available from business objects all fail. A sample block of code for any who are curious.
<br />
string temp=null;<br />
string sampleReportName = "Report1.rpt <br />
SessionMgr sessionMgr = new SessionMgr();<br />
EnterpriseSession enterpriseSession;<br />
EnterpriseService enterpriseService;<br />
EnterpriseService RasService;<br />
InfoStore infoStore;<br />
nfoObjects infoObjects;<br />
InfoObject infoObject;<br />
<br />
ReportAppFactory reportAppFactory;<br />
ReportClientDocument reportClientDocument;<br />
enterpriseSession = sessionMgr.Logon (UserName,password,"BOHost","secEnterprise");<br />
<br />
try<br />
{ <br />
enterpriseService = enterpriseSession.GetService("BOHost","InfoStore");<br />
//the code dies here if it is hosted on a server other then the B.O. server<br />
RasService = enterpriseSession.GetService("BOHost",","RASReportFactory");<br />
<br />
infoStore = new InfoStore(enterpriseService);<br />
infoObjects = infoStore.Query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME Like '" + sampleReportName +"'");<br />
<br />
infoObject = infoObjects[1];<br />
temp = infoObject.ID.ToString();<br />
<br />
reportAppFactory = (ReportAppFactory)RasService.Interface;<br />
reportClientDocument = reportAppFactory.OpenDocument(infoObject.ID,0);<br />
CrystalReportViewer1.ReportSource = reportClientDocument;<br />
}<br />
catch(Exception et)<br />
{<br />
temp =et.Message;<br />
enterpriseSession.Logoff(); <br />
}<br />
enterpriseSession.Logoff();<br />
I wish those dead beats at Business Objects would spend more time fixing their buggy products then going around advertising to all the idiot managers who think this product is the answer to all their problems. We have a saying for this in America that the French don't understand, its called "False Advertising" Thanks again. I will try to stop complaining.
nothing
|
|
|
|
|
In My App, we are reading data from database into a dataView and then binding it to repeater control.
now we want to implement column sort for repeater control.
i know, we can sort data by using dataview sort method.
my question is for each and every time user clicks on repeater column, do we need to make a database call to get data.
Is there some efficient way to store default dataview somewhere, before binding to repeater?
how far it is safe, to use session variable, viewstate variable etc?
Or is there any other alternative?
Thanks
MK
-- modified at 11:27 Monday 24th July, 2006
|
|
|
|
|
Part of it depends on the type of data. Is it sensitive? Session variables are an easy route but they expire after 20 minutes (unless you change the default setting). I'm not as familiar with viewstates as I either use a session variable or a query string.
|
|
|
|
|
Web Services can't return unknown(generic) types, a web service should explain it self all the time.
It means that what you are doing is not a good a idea
<br />
<WebMethod()> Public Function Test(ByVal sl() as TestList ) As String<br />
Return sL(1).Value.ToString<br />
End Function<br />
From application AppTest:
<br />
Dim param() As New ArrayList<br />
param.Add(New TestList("N1", "V1", "T1", "S1"))<br />
param.Add(New TestList("N2", "V2", "T2", "S2"))<br />
Response.Write( ws.Test(parm.ToArray( GetType(TestList) ) ) )<br />
I am assuming implicit convertion on of the Array with the array list but you can cast that array to any type you want before passing it to the web service.
Greetings ,
FMD
|
|
|
|
|
Thanks for your reply.
When I tried your code and got the following error:
error BC30311: Value of type 'System.Collections.Generic.List(Of AppTest.ParmList)' cannot be converted to 'Integer'
By the way, on both webservice and application side I have a generic class TestList. It's not unknow type.
Thanks.
|
|
|
|
|
I have some questions 4 u.
What? What r u doing?
Do u know VB.NET? Do u know Web Services?
|
|
|
|
|
Can I ask u a Q?
What r u doing here???
|
|
|
|
|
Hi,
I am having a strange issue.If any body can hel that would be great.
I am loading an asc file in another ascx file by
ctl=me.loadcontrol("abc.ascx")
and it is showing in a place holder like
plceholder.controls.add(ctl)
It is working in some site but it is not loading in some sites..
Why it is like that...I am very confused..
Thanks much..
RPM..
|
|
|
|
|
Hi
I have a RadioButtonList Control and I dont have any Item selected.
Is there an instruction that validates if you selected an Item or Not from this RadioButtonList Control???
I would expect something like this in VB:
RadioButtonList1.AnyItemSelected=True
Any ideas??
Thanx ¡¡
|
|
|
|
|
Armando, you need to test your radio button list items using a foreach statement... Im more confortable with C#, if you are a VB person try to convert the below code to VB syntax
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
foreach (ListItem li in RadioButtonList1.Items)
{
if (li.Selected == true)
{
//execute some instruction
}
}
}
}
Le me know if you are still confused
Nila Fridley
|
|
|
|
|
I'm trying to instantiate a class by name.
The class is in my projects namespace and located in a file in the App_Code folder.
Basically I am calling :
Type tip = Type.GetType("PortalModuleControl");
where PortalModuleControl is the mentioned class;
But tip returns null.
Isn't Type.GetType supposed to look for the definition of the class in the current assembly?
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Yes what you are doing is not right...
Here is a the rith way:
<br />
Type type = Type.GetType("MyNameSpace.TheWholeThing.MyClassName, MyNameSpace");<br />
MyAssemblyName issually is the same as the namespace, for instance but not always:
<br />
namespace TQU.Demo{<br />
public class Test2{<br />
<br />
}<br />
}<br />
<br />
namespace TestingTypes<br />
{<br />
class Class1<br />
{<br />
<br />
<br />
[STAThread]<br />
static void Main(string[] args)<br />
{<br />
Type type = Type.GetType("TQU.Demo.Test2, TestingTypes");<br />
}<br />
}<br />
}<br />
Greetings
FDM
|
|
|
|
|
Type type = Type.GetType("myNameSpace.PortalModuleControl, myNameSpace");
doesn't work either.
I have only one namespace in my application.
I'm dealing with an ASP.NET application. Are there some restrictions regarding this?
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Type type = Type.GetType("myNameSpace.PortalModuleControl, MyAssemblyName");
Can you tell me if your namespace is the same as your assembly name.
What's your assembly name?
|
|
|
|
|
Hmm, I'm guessing it is. My Asp.Net application is running using the ASP.NET Development server which from my understanding acts like IIS and precompiles the code while running. I tried deploying the application but there's no DLL in the bin folder
Anyway, from my understanding the assembly doesn't need to be specified when you use Type.GetType . Only when you use Assembly.GetType
Am I wrong?
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Buddy u got all wrong.
If you don't see the dll in your bin directory it is because either you did not compile it
or you are getting a compilation error.
ASP.NET does not compile the ASP.NET code in runtime, .NET compiles IL in runtime.
If you want to see the your assembly name right click the project and click properties, there are some tabs there one of them will have the assembly name.
Greetings
|
|
|
|
|
Felipe Dalorzo wrote: If you don't see the dll in your bin directory it is because either you did not compile it
or you are getting a compilation error.
I wish that was it. Unfortunately something goes wrong. Meaning the project builds, it runs, but when I publish it, the directory that I choose to publish to is empty. I have tried all options in the publish dialog and the result is the same.
Aparently others are experiencing this, too. No I just need to have a solution that aparently others didn't find
Felipe Dalorzo wrote: ASP.NET does not compile the ASP.NET code in runtime
The App_Code folder and its special status in a web application allows you to store classes that will automatically be compiled at run time.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Hi all
From last 30 days i have been searching for a tool or any mechanism through which I could print reports in my asp.net 1.1 application in a proper format.
I tried Crystal reports but in this one can print report only by exporting them into pdf .. and obviously its not a solution.
what I want is if I print a report (say have 1000 records) then the data grid header should be shown on all pages, instead of only on first page.
|
|
|
|
|
cdotpal wrote: one can print report only by exporting them into pdf .. and obviously its not a solution
What do you mean by this? Is it that you don't want to do any conversion before your reports are printable?
cdotpal wrote: then the data grid header should be shown on all pages, instead of only on first page.
This is possible without getting any reporting tools. If you just want people to be able to print out data from your web application, then look at this[^]. You can modify your data grid a bit and add some styles to get the header to print on every page.
Logifusion[^]
|
|
|
|
|
thanks dustin, I havent got the solution yet but thanks for the useful information.
|
|
|
|
|
Try MS reporting services which can export in PDF, Excel, xml etc.....
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
I'm trying to play around with Lightbox (http://www.huddletogether.com/projects/lightbox2/). Anyway, I'm working on an existing site with a single master page. I attempt to add the following to my page:
<script type="text/javascript" src="~/js/prototype.js" runat="server"></script>
<script type="text/javascript" src="~/js/scriptaculous.js?load=effects" runat="server"></script>
<script type="text/javascript" src="~/js/lightbox.js" runat="server"></script>
Now, I get hundreds of build errors. If I take these links back out, they go away. I've found that it is because of the runat=server attribute (because if I take it out and use the "../" syntax, things work again). Now, I'd like to be able to reference these scripts using the "~/" syntax that is common in ASP.NET, but I can't figure out how to make that happen without build errors. Any ideas? It's not a particularly big deal, but I think it's important for me to understand WHY it doesn't work.
Thanks,
Will
|
|
|
|