|
Have you looked at Crystal Reports, it comes with the new version of Visual Studio, and should be able to do most if not all of what you want.. The security aspect will probably have to be handeled by your Web Application. We do something similar to waht you are trying to do but we just use a common call interface to stored procedures in the database that display results in a datagrid, and have table that links reports and user id's so we can control on a per user basis what reports they get to run. We're looking to upgrade to using Crystal reports but havnt had time to yet, If you dont like CR i'm sure there are dozens of 3rd Party apps that do similar things.
|
|
|
|
|
What's happening instance object reference an instance Singleton class ?
Garbage collector destroy my instance page behind yes or no after use ?, because instance page behind always reference an instance singleton object.
Thanks for your help.
Example :
In my class Page Behind, i reference
----------------------------------------------------------------------------------------
public partial class MyPageBehind : Page
{
protected MyBusinessLayerClassSingleton objSingleton = MyBusinessLayerClassSingleton.GetInstance();
protected void Page_Load(object sender, EventArgs e)
{ ..... }
}
----------------------------------------------------------------------------------------
Other example with An user instance object
public class Member : User
{
protected MyBusinessLayerClassSingleton objSingleton = MyBusinessLayerClassSingleton.GetInstance();
public string SName {get; set;}
public string SStreet { get; set; }
public Membre()
{ .... }
}
|
|
|
|
|
ducretpatrick wrote: Garbage collector destroy my instance page behind yes or no after use ?, because instance page behind always reference an instance singleton object.
I can't really determine which instance it is that you mean...
The instance of the MyPageBehind class will be up for collection when the request has been handled.
The instance of the singleton will never be collected. The singleton class has a static reference to the instance once you have created it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
The singleton, once initialized, will last as long as the application domain - so until the worker process is recycled.
|
|
|
|
|
Hi,
I have 2 tables one contain QuestionID and Questions and another table contains multiple choices against each question. Here is the sample data
Table1 -
QuestionID QuestionDesc
1 How many Data Stewards exist today?
2 Is there a DG Executive Sponsor?
Table2 -
QuestionID QuestionsAnswerChoices
1 0-5
1 6-10
1 11-20
2 Yes
2 No
Now I need to dynamically read these two tables and disaplay in a Webpage ina question answer patterns where user can choose their answer and save once completed. Somewhat it should look like as follows:
How many Data Stewards exist today? <optionbutton> 0-5 <optionbutton> ...
Is there a DG Executive Sponsor? (optionButton)Yes (optionButton) No
Save/Submit
As questions might be keep changing needs dynamically displayed ona web page. Any help would be really appreciated.
Regards
|
|
|
|
|
I dont know if any new controls will handle this better, but I'd imagine that a good ol fashioned asp:Repeater control may do what you want, unfortunatly i cant think of an efficient way of dynamically binding the answers to the radiobuttonlist, the only way i can think of is using the ItemDataBound event of the repeater to bind each radiobuttonlist based on the question id that was just used by the reader to display the question. Hope this helps, if you have any further questions lemme know
|
|
|
|
|
select table1.QuestionID,table1.QuestionDesc,Table2.QuestionsAnswerChoices <br />
from Table1,Table2<br />
where Table1.QuestionID = Table2.QuestionID
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Hi; sorry my english is bad.
I have a gridview with the following structure (manage students grades )
N_inscription matiere1 mat2 mat3 mat4 AvgModule1 valid mat4 mat5 mat6 AvgMoymod2 valid avgsemestre
I try to conclude the state of validation for each semester based on critere on the marks and avgmod and then display it in the column valid.
Is this possible knowing that I have not stored the averages of modules in the data base .how? .
thanks
|
|
|
|
|
I'm going to try to sum up what you said then give you a possible solution or two, what i think you want is to do some calculations on a few columns of data in row and display the results of your calculations in another column.
If i am correct there are 2 ways to do this.
1. You can use the ItemDataBound event in the control you are using(i assume a datagrid) and get the value of each cell e.item.cells[number].ToString() and do the caclumations for each row in the asp.net codebehind, not exactly the best solution.
2. You can do the calculations in the SQL query
SELECT {your values}, CASE WHEN {your calculations meet some condtion} THEN 1 ELSE 0 (or whatever values you want) END AS Valid ..{rest of sql query here}
I would recomend using method 2 ina view if possible then selecting from that view in your code, so if the criteria changes you just have to make a database change and dont have to worry about code changes and putting a new build out.
I hope this is helpful, if you have any more questions feel free to ask. if it was helpful at all please rate the response..makes me feel smarter, and/or give better answers.
|
|
|
|
|
Thanks very much SomeGuyThatIsMe;
I will try your answer and if I have another question excuse me to ask it.
merci encore.
|
|
|
|
|
Hi;
Yes it's very helpful Thanks SomeGuyThatIsMe.
merciiiiiiiiiiiii
|
|
|
|
|
I am having difficulty checking out a document using a SharePoint web part. I am using the default security credentials (System.Net.SystemNetworkCredentials) but I get an error saying that I am unable to check out the document.
I own the document in question and can check documents out through the standard web part supplied by the SharePoint server to access the document repository.
I use the same code in a desktop application and can check out documents but fail when trying to check them out using a web part.
I suspect that the SharePoint Service is getting the network credentials from the ASP.NET web page which is owned by the SharePoint server and not my network credentials like when I execute the code from a desktop application I wrote as a prototype.
Does anyone know how I can substitute a user’s network credentials for the default network credentials from a SharePoint web part?
The code I use is below.
SharePoint.Document_Lists.Lists doc = new SharePoint.Document_Lists.Lists();<br />
// SharePoint.Document_Lists is a web reference to http://.../_vti_bin/lists.asmx
<br />
doc.PreAuthenticate = true;<br />
doc.Credentials = System.Net.CredentialCache.DefaultCredentials;<br />
<br />
if (doc.CheckOutFile(oDocName.ToString(), oTrue.ToString(), mod_date))<br />
{<br /> process document here
<br />
}<br />
else<br />
{<br /> error message issued here
<br />
}
|
|
|
|
|
Hi all,
i have problem with UdpatePanel.My Application is Localised.we are using Multiple languages.and based on the selection the AjaxCalendarControl changes if i not use "Update Panel" if i use the Upate Panel then the calendar wont changes. Please help me. i have use the Update Panel and the CalendarControl should be changes to according the language selection.
Thanks in Advance..;)
Murali
|
|
|
|
|
Hi,
If the AjaxCalenderControl the UpdatePanel then we needs update contents in the updatepanel otherwise they are not updated after selection of language because u r language selection control outside the updatepanel try to put both controls in one place or AsynchronousPostbackTrigger
|
|
|
|
|
hi
i have a data list in my asp page and there is a label control in it
i'd like to show 2 values from my database (Views & ViewsAll columns) in its text property and i used this code:
<asp:Label ID="lblView" runat="server" Text='<%# Eval("Views,ViewsAll", "{0} ({1})") %>'> </asp:Label>
but an error happened
does anyone know wut did i do wrong?
thanks alot
|
|
|
|
|
What's the error ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Views,ViewsAll'
|
|
|
|
|
Well that helps. Those fields are not in your data source.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how can i seperate them? i guess it thinks there must be a single column with this name "Views,ViewsAll"
i tried this one "'Views','ViewsAll'" but it also didnt work.
|
|
|
|
|
You can use two Eval statements
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i tried this one:
Text='<%# Eval("Views", "{0}") %><%# Eval("ViewsAll", " ({0})") %>'
but it also didnt worked!
how can i use 2 eval statements in here?
|
|
|
|
|
You can only have 1 databinding expression ( <%# xxx %> ) so you have to concatenate it thusly:
Text='<%# Eval("Views") + Eval("ViewsAll","({0})") %>'
or another way (which I personally prefer) is to let a code behing method deal with it:
Text='<%# FormatViews(Eval("Views"),Eval("ViewsAlL")) %>'
and then in code behind
protected string FormatViews(object views, object viewsAll)
{
return String.Format("{0} ({1})",views,viewsAll);
}
|
|
|
|
|
thank you so much i used first solution but the second one gave me a great hint to overcome some of my other problems!
|
|
|
|
|
Text='<%# Eval("Views", "{0}") Eval("ViewsAll", " ({0})") %>'
is what I would try. Have you not worked out that' it didn't work' is useless ? I need to know what happened, what went wrong ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thank you christian it worked fine also the other guy suggest a way to deal with it in code behind
thanks anyway, i learned a lot from you in this forum
|
|
|
|