|
Hello All;
I have got a task regarding parameter passing to Crystal Report via Crystal Report, I would like to find best way to achieve it.
Imagine that I have got parameterized and non reports-parameterized. I am developing a report manager that will enable users to subscribe to the reports and schedule them with their parameters. I have got a subscription web page with the list of reports. When a user wants to subscribe to a report and schedule it, if there is no parameter in the report, it is fine but if there is any parameter that needs to be passed to the report(which we can find from rpt file), user should be able to enter these parameters values via a panel in the page. and I will save those parameters' values to the database.
Effectively, I need to create a parameter entry panel to get the parameters and save them to the database with their type, value and so on, then I need to use these parameters programmatically for exporting reports to the different file formats.
Basically, I must develop parameter entry panel run time in accordance with the parameter types that the corresponding report has.
Does anyone have any idea what the best way is to achieve it?
Thanks for your help from now on and please ask for further clarification if needed/
Kind Regards.
|
|
|
|
|
Mesut KOSUCU wrote: Does anyone have any idea what the best way is to achieve it?
Of course by code. Just generate the Dynamic Html from your code to get values for your parameters.
This is no big deal.
If you create an object of Textbox and render it to the client, it will be added to the page. Even you can create custom html using StringBuilder and paste any container control to produce the same output.
Dont worry about all these, just start your coding. You will definitely find the wayout yourself.
Cheers.
|
|
|
|
|
Dear Abhishek
Thanks for your reply, I appreciated really.
But the problem is I could not figure out, if the parameters are primitive types, this is fine I can use the way you have told.
I there any way to get list of the parameter values of a parameter of a report via code behind? Why I need to do is that, for instance, let's say reports need EmployeeID for generating report, then I will have to create a dynamic dropdown list and populated with the employees. So, that would be good if there is any way to get possible values of a parameter via c#. or will I have to do it statically?
What would you think about it? thanks for your help.
Cheers.
|
|
|
|
|
I think you need to somewhat figure out what are the parameters that it should be passed.
Other than premitive types how could you send data. I dont know if a complex type could be send as parameters to crystal report, but AFAIK it cant be.
I think the better way to create a list of all the available Reports that the crystal Report viewer might load and generate the parameters based on what is loading. If you know what data to be passed, you can easily generate the interface.
|
|
|
|
|
Hi,
I am looking for the “Software Project Management Templates” such as the following. Sorry!! In our organization we don’t have these, yet.
1. Issue Log
2. Risk Register
3. Change Log
May I know where I could get these templates as well as other standard “Software Project Management Templates”?
Many Thanks,
Regards.
Anusha.
|
|
|
|
|
What do you mean by 'template' ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Why Dont You Perpare one ..!And make it available to all
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
hello
I am new in ASP.NET , and im going to create a simple website , but just need to use SQL as database to store datas.
i couldn't find information about how to start to connect to Database .
I installed SQL2005 express , and Web Matrix , i first created a new project , then i clicked "Data"-->>"SQL...", after it told me can not connect to SQL server , may i know whether i am in a right step ?
Thanks!
|
|
|
|
|
|
Thanks!
|
|
|
|
|
Dear All,
In download data module of my application(with asp.net2.0/sqlserver2005)one of the function is returning a datareader object having 7 hundererd thousands plus record. It returns the datareader without an exception but when i am iterating through the datareader to take its values to a string bulider type varible to write a csv file, it throws an 'System.OutOfMemoryException' due to huge records. I can not filter the record as it is required to write a csv file of the whole data. how can i avoide this error and improve the efficency of the system so that it takes less resources. The compilation debug is set to false. Also when there a few hundered thousand records the download is working ok. Thanks in advance for the help form any esteemed member.
Thanks,
Safvi
|
|
|
|
|
public static string WriteCSVFilebyDataReader(SqlDataReader SqlDataReaderObject)
{
StringBuilder strResult = new StringBuilder();
try
{
for (int i = 0; i < SqlDataReaderObject.FieldCount; i++)
{
strResult.Append("\" " + SqlDataReaderObject.GetName(i) + " \",");
}
strResult.Append("\n");
if (SqlDataReaderObject.HasRows)
{
while (SqlDataReaderObject.Read())
{
for (int j = 0; j < SqlDataReaderObject.FieldCount; j++)
{
strResult.Append("\"" +SqlDataReaderObject.GetValue(j).ToString() + "\",");
}
strResult.Append("\n");
//SqlDataReaderObject.NextResult();
}
}
}
catch (Exception ex)
{
throw ex;
}
return strResult.ToString();
}
|
|
|
|
|
When you use a datareader, data is not fetched from the database until you use the Read() method to read the next row, therefore you may not receive an error when you open the datareader. The problem seems to be with StringBuilder. You can split the result into batches of say 10000 rows and then write them. For example, open the csv file write 10000 rows, close it, then append the next 10000 rows and so on. You could do this using a loop counter. Each batch would use a new StringBuilder instance to write to the csv file.
|
|
|
|
|
Hi everyone,
Please read the xml file below. Thanks.
(1). Given id="100" and quantity=2. id="100" exists in the xml file. Then update quantity (i.e., 1+2 = 3) in the xml file.
(2). Given id="300" and quantity=1. id="300" does not exist in the xml file,
then insert this new record (i.e., <item id="300"><itemName>Bike</itemName><price>150.99</price><quantity>1</quantity></item>)
into the xml file.
(3). Given id="200". id="200" exist, then delete this record (<item id="200"><itemName>Car</itemName><price>99.99</price><quantity>1</quantity></item>)
<products>
<item id="100">
<itemName>Car</itemName>
<price>99.99</price>
<quantity>1<quantity>
</item>
<item id="200">
<itemName>Car</itemName>>
<price>99.99</price>
<quantity>1</quantity>
</item>
</products>
iam writing code in vb.net but i cont
please help me,
Can I have some sample code
Thanks,
modified on Tuesday, November 3, 2009 9:26 AM
|
|
|
|
|
|
|
pramodgorityala wrote: Can I have some sample code
Let's save you some time and trouble. Give us the email address of your teacher and we'll send the solution direct to him.
|
|
|
|
|
Welcome to the ASP.NET forum....
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all,
I have an asp.net page ,contains 3 textboxes ,1 dropdownlis,1 button.
I have written the code for inserting data to the database inn the button click event.Its working properly,and cleared the textbox datas.
But after inserting the datas, I clear the texts in the textboxes and set visible=false.
Afetr this I tried to refresh the page,the above textbox values are again inserted into the database.
If somebody knows about this ,pls help me.
Thanks and Regards
Denny
|
|
|
|
|
TextBox.Text=""; to clear data in text box...
|
|
|
|
|
I have done already but still prob
|
|
|
|
|
The postback data won't be cleared and when you refresh, it will be resend. To work around this, consider redirecting the page after insert.
Response.Redirect("success.aspx")
Best wishes,
Navaneeth
|
|
|
|
|
but sir,i have a grid in that page and i want to show the values in the grid
|
|
|
|
|
This is the way ASP.NET postback works. When you refresh, your browser submits the same page with the same postback information. The only way you can avoid it is by redirecting it to a different page.
|
|
|
|
|